MyGUI: MyGUI_IBItemInfo.h Source File

MyGUI 3.4.2

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

- File List
- Globals

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
18 // структура информации об отображении элемента
20 struct MYGUI_EXPORT IBDrawItemInfo
21 {
22
23 IBDrawItemInfo() :
24 index(ITEM_NONE),
25 update(false),
26 select(false),
27 active(false),
28 drag(false),
29 drop_accept(false),
30 drop_refuse(false)
31 {
32 }
33
34 IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag) :
35 index(_index),
36 update(_update),
37 select(_index == _select),
38 active(_index == _active),
39 drag(_drag),
40 drop_accept(_index == _accept),
41 drop_refuse(_index == _refuse)
42 {
43 }
44
46 size_t index;
48 bool update;
50 bool select;
52 bool active;
54 bool drag;
56 bool drop_accept;
58 bool drop_refuse;
59 };
60
61 struct MYGUI_EXPORT IBNotifyItemData
62 {
63 enum NotifyItem
64 {
65 MousePressed,
66 MouseReleased,
67 KeyPressed,
68 KeyReleased
69 };
70
71 IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
72 index(_index),
73 notify(_notify),
74 x(_x),
75 y(_y),
76 id(_id),
77 code(KeyCode::None),
78 key(0)
79 {
80 }
81
82 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
83 index(_index),
84 notify(_notify),
85 x(0),
86 y(0),
87 id(MouseButton::None),
88 code(_code),
89 key(_key)
90 {
91 }
92
93 IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
94 index(_index),
95 notify(_notify),
96 x(0),
97 y(0),
98 id(MouseButton::None),
99 code(_code),
100 key(KeyCode::None)
101 {
102 }
103
105 size_t index;
107 NotifyItem notify;
109 int x;
111 int y;
113 MouseButton id;
115 KeyCode code;
117 Char key;
118 };
119
120} // namespace MyGUI
121
122#endif // MYGUI_ITEM_INFO_H_
MyGUI_KeyCode.h
MyGUI_MouseButton.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_Types.h
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::Char
unsigned int Char
Definition MyGUI_Types.h:50
MyGUI::ITEM_NONE
const size_t ITEM_NONE
Definition MyGUI_Macros.h:18
MyGUI::IBDrawItemInfo
Definition MyGUI_IBItemInfo.h:21
MyGUI::IBDrawItemInfo::index
size_t index
Definition MyGUI_IBItemInfo.h:46
MyGUI::IBDrawItemInfo::drop_refuse
bool drop_refuse
Definition MyGUI_IBItemInfo.h:58
MyGUI::IBDrawItemInfo::select
bool select
Definition MyGUI_IBItemInfo.h:50
MyGUI::IBDrawItemInfo::update
bool update
Definition MyGUI_IBItemInfo.h:48
MyGUI::IBDrawItemInfo::drag
bool drag
Definition MyGUI_IBItemInfo.h:54
MyGUI::IBDrawItemInfo::drop_accept
bool drop_accept
Definition MyGUI_IBItemInfo.h:56
MyGUI::IBDrawItemInfo::IBDrawItemInfo
IBDrawItemInfo()
Definition MyGUI_IBItemInfo.h:23
MyGUI::IBDrawItemInfo::active
bool active
Definition MyGUI_IBItemInfo.h:52
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:34
MyGUI::IBNotifyItemData
Definition MyGUI_IBItemInfo.h:62
MyGUI::IBNotifyItemData::y
int y
Definition MyGUI_IBItemInfo.h:111
MyGUI::IBNotifyItemData::key
Char key
Definition MyGUI_IBItemInfo.h:117
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id)
Definition MyGUI_IBItemInfo.h:71
MyGUI::IBNotifyItemData::id
MouseButton id
Definition MyGUI_IBItemInfo.h:113
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key)
Definition MyGUI_IBItemInfo.h:82
MyGUI::IBNotifyItemData::code
KeyCode code
Definition MyGUI_IBItemInfo.h:115
MyGUI::IBNotifyItemData::NotifyItem
NotifyItem
Definition MyGUI_IBItemInfo.h:64
MyGUI::IBNotifyItemData::KeyPressed
@ KeyPressed
Definition MyGUI_IBItemInfo.h:67
MyGUI::IBNotifyItemData::MousePressed
@ MousePressed
Definition MyGUI_IBItemInfo.h:65
MyGUI::IBNotifyItemData::MouseReleased
@ MouseReleased
Definition MyGUI_IBItemInfo.h:66
MyGUI::IBNotifyItemData::notify
NotifyItem notify
Definition MyGUI_IBItemInfo.h:107
MyGUI::IBNotifyItemData::index
size_t index
Definition MyGUI_IBItemInfo.h:105
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code)
Definition MyGUI_IBItemInfo.h:93
MyGUI::IBNotifyItemData::x
int x
Definition MyGUI_IBItemInfo.h:109
MyGUI::KeyCode
Definition MyGUI_KeyCode.h:16
MyGUI::MouseButton
Definition MyGUI_MouseButton.h:16