MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_IBItemInfo.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_ITEM_INFO_H__
23 #define __MYGUI_ITEM_INFO_H__
24
25 #include "MyGUI_Prerequest.h"
26
27 namespace MyGUI
28 {
29
30 // структура информации об отображении элемента
32 struct MYGUI_EXPORT IBDrawItemInfo
33 {
34
35 IBDrawItemInfo() :
36 index(ITEM_NONE),
37 update(false),
38 select(false),
39 active(false),
40 drag(false),
41 drop_accept(false),
42 drop_refuse(false)
43 {
44 }
45
46 IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag) :
47 index(_index),
48 update(_update),
49 select(_index == _select),
50 active(_index == _active),
51 drag(_drag),
52 drop_accept(_index == _accept),
53 drop_refuse(_index == _refuse)
54 {
55 }
56
58 size_t index;
60 bool update;
62 bool select;
64 bool active;
66 bool drag;
68 bool drop_accept;
70 bool drop_refuse;
71 };
72
73 struct MYGUI_EXPORT IBNotifyItemData
74 {
75 enum NotifyItem
76 {
77 MousePressed,
78 MouseReleased,
79 KeyPressed,
80 KeyReleased
81 };
82
83 IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
84 index(_index),
85 notify(_notify),
86 x(_x),
87 y(_y),
88 id(_id),
89 code(KeyCode::None),
90 key(0)
91 {
92 }
93
94 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
95 index(_index),
96 notify(_notify),
97 x(0),
98 y(0),
99 id(MouseButton::None),
100 code(_code),
101 key(_key)
102 {
103 }
104
105 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
106 index(_index),
107 notify(_notify),
108 x(0),
109 y(0),
110 id(MouseButton::None),
111 code(_code),
112 key(KeyCode::None)
113 {
114 }
115
117 size_t index;
119 NotifyItem notify;
121 int x;
123 int y;
125 MouseButton id;
127 KeyCode code;
129 Char key;
130 };
131
132 } // namespace MyGUI
133
134 #endif // __MYGUI_ITEM_INFO_H__
MyGUI::IBNotifyItemData::x
int x
Definition: MyGUI_IBItemInfo.h:121
MyGUI::IBNotifyItemData::MousePressed
Definition: MyGUI_IBItemInfo.h:77
MyGUI_Prerequest.h
MyGUI::IBDrawItemInfo::drag
bool drag
Definition: MyGUI_IBItemInfo.h:66
MyGUI::IBNotifyItemData::code
KeyCode code
Definition: MyGUI_IBItemInfo.h:127
MyGUI::IBNotifyItemData::MouseReleased
Definition: MyGUI_IBItemInfo.h:78
MyGUI::KeyCode
Definition: MyGUI_KeyCode.h:30
MyGUI::IBNotifyItemData::notify
NotifyItem notify
Definition: MyGUI_IBItemInfo.h:119
MyGUI::IBDrawItemInfo::drop_refuse
bool drop_refuse
Definition: MyGUI_IBItemInfo.h:70
MyGUI::ITEM_NONE
const size_t ITEM_NONE
Definition: MyGUI_Macros.h:32
MyGUI::IBDrawItemInfo::select
bool select
Definition: MyGUI_IBItemInfo.h:62
MyGUI::IBNotifyItemData::NotifyItem
NotifyItem
Definition: MyGUI_IBItemInfo.h:75
MyGUI::IBDrawItemInfo::IBDrawItemInfo
IBDrawItemInfo()
Definition: MyGUI_IBItemInfo.h:35
MyGUI::MouseButton
Definition: MyGUI_MouseButton.h:30
MyGUI::IBDrawItemInfo
Definition: MyGUI_IBItemInfo.h:32
MyGUI::IBNotifyItemData
Definition: MyGUI_IBItemInfo.h:73
MyGUI::IBNotifyItemData::key
Char key
Definition: MyGUI_IBItemInfo.h:129
MyGUI::IBDrawItemInfo::active
bool active
Definition: MyGUI_IBItemInfo.h:64
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id)
Definition: MyGUI_IBItemInfo.h:83
MyGUI::Char
unsigned int Char
Definition: MyGUI_Types.h:66
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key)
Definition: MyGUI_IBItemInfo.h:94
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code)
Definition: MyGUI_IBItemInfo.h:105
MyGUI::IBNotifyItemData::id
MouseButton id
Definition: MyGUI_IBItemInfo.h:125
MyGUI::IBNotifyItemData::KeyPressed
Definition: MyGUI_IBItemInfo.h:79
MyGUI::IBNotifyItemData::index
size_t index
Definition: MyGUI_IBItemInfo.h:117
MyGUI::IBDrawItemInfo::update
bool update
Definition: MyGUI_IBItemInfo.h:60
MyGUI::IBNotifyItemData::y
int y
Definition: MyGUI_IBItemInfo.h:123
MyGUI::IBDrawItemInfo::drop_accept
bool drop_accept
Definition: MyGUI_IBItemInfo.h:68
MyGUI::IBDrawItemInfo::IBDrawItemInfo
IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag)
Definition: MyGUI_IBItemInfo.h:46
MyGUI::IBDrawItemInfo::index
size_t index
Definition: MyGUI_IBItemInfo.h:58