MyGUI  3.2.0
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  // структура информации об отображении элемента
33  {
34 
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;
71  };
72 
74  {
76  {
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;
121  int x;
123  int y;
130  };
131 
132 } // namespace MyGUI
133 
134 #endif // __MYGUI_ITEM_INFO_H__
const size_t ITEM_NONE
Definition: MyGUI_Macros.h:32
#define MYGUI_EXPORT
IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id)
unsigned int Char
Definition: MyGUI_Types.h:66
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key)
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code)
IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag)