MyGUI 3.5.3
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#include "MyGUI_KeyCode.h"
12#include "MyGUI_MouseButton.h"
13#include "MyGUI_Types.h"
14
15namespace MyGUI
16{
17
19 struct MYGUI_EXPORT IBDrawItemInfo
20 {
21 IBDrawItemInfo() :
22 index(ITEM_NONE),
23 update(false),
24 select(false),
25 active(false),
26 drag(false),
27 drop_accept(false),
28 drop_refuse(false)
29 {
30 }
31
32 IBDrawItemInfo(
33 size_t _index,
34 size_t _select,
35 size_t _active,
36 size_t _accept,
37 size_t _refuse,
38 bool _update,
39 bool _drag) :
40 index(_index),
41 update(_update),
42 select(_index == _select),
43 active(_index == _active),
44 drag(_drag),
45 drop_accept(_index == _accept),
46 drop_refuse(_index == _refuse)
47 {
48 }
49
51 size_t index;
53 bool update;
55 bool select;
57 bool active;
59 bool drag;
61 bool drop_accept;
63 bool drop_refuse;
64 };
65
66 struct MYGUI_EXPORT IBNotifyItemData
67 {
68 enum NotifyItem
69 {
70 MousePressed,
71 MouseReleased,
72 KeyPressed,
73 KeyReleased
74 };
75
76 IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
77 index(_index),
78 notify(_notify),
79 x(_x),
80 y(_y),
81 id(_id),
82 code(KeyCode::None),
83 key(0)
84 {
85 }
86
87 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
88 index(_index),
89 notify(_notify),
90 x(0),
91 y(0),
92 id(MouseButton::None),
93 code(_code),
94 key(_key)
95 {
96 }
97
98 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
99 index(_index),
100 notify(_notify),
101 x(0),
102 y(0),
103 id(MouseButton::None),
104 code(_code),
105 key(KeyCode::None)
106 {
107 }
108
110 size_t index;
112 NotifyItem notify;
114 int x;
116 int y;
118 MouseButton id;
120 KeyCode code;
122 Char key;
123 };
124
125} // namespace MyGUI
126
127#endif // MYGUI_ITEM_INFO_H_
#define MYGUI_EXPORT
unsigned int Char
Definition MyGUI_Types.h:49
constexpr size_t ITEM_NONE