ScummVM API documentation
visual_container.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef ULTIMA_SHARED_GFX_VISUAL_CONTAINER_H
23#define ULTIMA_SHARED_GFX_VISUAL_CONTAINER_H
24
25#include "ultima/shared/gfx/visual_item.h"
26#include "ultima/shared/core/message_target.h"
27
28namespace Ultima {
29namespace Shared {
30namespace Gfx {
31
33 DECLARE_MESSAGE_MAP;
34 bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
35 bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
36 bool MouseMoveMsg(CMouseMoveMsg *msg);
37 bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
38 bool MouseWheelMsg(CMouseWheelMsg *msg);
39 bool MouseDragMsg(CMouseDragMsg *msg);
40private:
41 VisualItem *_mouseFocusItem;
42private:
46 VisualItem *handleMouseMsg(CMouseMsg *msg);
47public:
48 CLASSDEF;
49 VisualContainer(TreeItem *parent = nullptr) : VisualItem(parent), _mouseFocusItem(nullptr) {}
50 VisualContainer(const Rect &r, TreeItem *parent = nullptr) :
51 VisualItem(r, parent), _mouseFocusItem(nullptr) {}
52 VisualContainer(const Common::String &name, TreeItem *parent = nullptr) :
53 VisualItem(name, parent), _mouseFocusItem(nullptr) {}
54 VisualContainer(const Common::String &name, const Rect &r, TreeItem *parent = nullptr) :
55 VisualItem(name, r, parent), _mouseFocusItem(nullptr) {}
56 ~VisualContainer() override {}
57
61 void draw() override;
62
66 void setDirty(bool dirty = true) override;
67
71 bool isDirty() const override;
72};
73
74} // End of namespace Gfx
75} // End of namespace Shared
76} // End of namespace Ultima
77
78#endif
Definition: str.h:59
Definition: messages.h:182
Definition: messages.h:192
Definition: messages.h:215
Definition: messages.h:162
Definition: messages.h:152
Definition: messages.h:136
Definition: messages.h:202
Definition: visual_container.h:32
void setDirty(bool dirty=true) override
Definition: visual_item.h:39
Definition: tree_item.h:50
Definition: rect.h:536