MyGUI: MyGUI_IBItemInfo.h Source File

MyGUI 3.2.2

MyGUI_IBItemInfo.h
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #ifndef MYGUI_ITEM_INFO_H_
8 #define MYGUI_ITEM_INFO_H_
9
10 #include "MyGUI_Prerequest.h"
11
12 namespace MyGUI
13 {
14
15 // структура информации об отображении элемента
17 struct MYGUI_EXPORT IBDrawItemInfo
18 {
19
20 IBDrawItemInfo() :
21 index(ITEM_NONE),
22 update(false),
23 select(false),
24 active(false),
25 drag(false),
26 drop_accept(false),
27 drop_refuse(false)
28 {
29 }
30
31 IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag) :
32 index(_index),
33 update(_update),
34 select(_index == _select),
35 active(_index == _active),
36 drag(_drag),
37 drop_accept(_index == _accept),
38 drop_refuse(_index == _refuse)
39 {
40 }
41
43 size_t index;
45 bool update;
47 bool select;
49 bool active;
51 bool drag;
53 bool drop_accept;
55 bool drop_refuse;
56 };
57
58 struct MYGUI_EXPORT IBNotifyItemData
59 {
60 enum NotifyItem
61 {
62 MousePressed,
63 MouseReleased,
64 KeyPressed,
65 KeyReleased
66 };
67
68 IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
69 index(_index),
70 notify(_notify),
71 x(_x),
72 y(_y),
73 id(_id),
74 code(KeyCode::None),
75 key(0)
76 {
77 }
78
79 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
80 index(_index),
81 notify(_notify),
82 x(0),
83 y(0),
84 id(MouseButton::None),
85 code(_code),
86 key(_key)
87 {
88 }
89
90 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
91 index(_index),
92 notify(_notify),
93 x(0),
94 y(0),
95 id(MouseButton::None),
96 code(_code),
97 key(KeyCode::None)
98 {
99 }
100
102 size_t index;
104 NotifyItem notify;
106 int x;
108 int y;
110 MouseButton id;
112 KeyCode code;
114 Char key;
115 };
116
117 } // namespace MyGUI
118
119 #endif // MYGUI_ITEM_INFO_H_
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:31
MyGUI::IBNotifyItemData::NotifyItem
NotifyItem
Definition: MyGUI_IBItemInfo.h:60
MyGUI::IBNotifyItemData::MouseReleased
Definition: MyGUI_IBItemInfo.h:63
MyGUI::IBNotifyItemData::key
Char key
Definition: MyGUI_IBItemInfo.h:114
MyGUI::IBNotifyItemData::index
size_t index
Definition: MyGUI_IBItemInfo.h:102
MyGUI::IBDrawItemInfo::drop_accept
bool drop_accept
Definition: MyGUI_IBItemInfo.h:53
MyGUI::ITEM_NONE
const size_t ITEM_NONE
Definition: MyGUI_Macros.h:17
MyGUI::IBNotifyItemData::id
MouseButton id
Definition: MyGUI_IBItemInfo.h:110
MyGUI::IBNotifyItemData::y
int y
Definition: MyGUI_IBItemInfo.h:108
MyGUI::IBNotifyItemData::notify
NotifyItem notify
Definition: MyGUI_IBItemInfo.h:104
MyGUI::MouseButton
Definition: MyGUI_MouseButton.h:15
MyGUI::IBNotifyItemData::MousePressed
Definition: MyGUI_IBItemInfo.h:62
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key)
Definition: MyGUI_IBItemInfo.h:79
MyGUI_Prerequest.h
MyGUI::IBDrawItemInfo::index
size_t index
Definition: MyGUI_IBItemInfo.h:43
MyGUI::IBDrawItemInfo::IBDrawItemInfo
IBDrawItemInfo()
Definition: MyGUI_IBItemInfo.h:20
MyGUI::IBDrawItemInfo
Definition: MyGUI_IBItemInfo.h:17
MyGUI::IBDrawItemInfo::select
bool select
Definition: MyGUI_IBItemInfo.h:47
MyGUI::IBDrawItemInfo::update
bool update
Definition: MyGUI_IBItemInfo.h:45
MyGUI::IBDrawItemInfo::active
bool active
Definition: MyGUI_IBItemInfo.h:49
MyGUI::IBNotifyItemData::code
KeyCode code
Definition: MyGUI_IBItemInfo.h:112
MyGUI::IBNotifyItemData::KeyPressed
Definition: MyGUI_IBItemInfo.h:64
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::Char
unsigned int Char
Definition: MyGUI_Types.h:51
MyGUI::IBDrawItemInfo::drag
bool drag
Definition: MyGUI_IBItemInfo.h:51
MyGUI::IBNotifyItemData::x
int x
Definition: MyGUI_IBItemInfo.h:106
MyGUI::IBNotifyItemData
Definition: MyGUI_IBItemInfo.h:58
MyGUI
Definition: MyGUI_ActionController.h:14
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code)
Definition: MyGUI_IBItemInfo.h:90
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id)
Definition: MyGUI_IBItemInfo.h:68
MyGUI::IBDrawItemInfo::drop_refuse
bool drop_refuse
Definition: MyGUI_IBItemInfo.h:55
MyGUI::KeyCode
Definition: MyGUI_KeyCode.h:15