MyGUI  3.0.1
MyGUI_IBItemInfo.h
Go to the documentation of this file.
1 
7 /*
8  This file is part of MyGUI.
9 
10  MyGUI is free software: you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  MyGUI is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
22 */
23 #ifndef __MYGUI_ITEM_INFO_H__
24 #define __MYGUI_ITEM_INFO_H__
25 
26 #include "MyGUI_Prerequest.h"
27 
28 namespace MyGUI
29 {
30 
31  // структура информации об отображении элемента
34  {
35 
37  index(ITEM_NONE),
38  update(false),
39  select(false),
40  active(false),
41  drag(false),
42  drop_accept(false),
43  drop_refuse(false)
44  {
45  }
46 
47  IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag) :
48  index(_index),
49  update(_update),
50  select(_index == _select),
51  active(_index == _active),
52  drag(_drag),
53  drop_accept(_index == _accept),
54  drop_refuse(_index == _refuse)
55  {
56  }
57 
59  size_t index;
61  bool update;
63  bool select;
65  bool active;
67  bool drag;
72  };
73 
75  {
77  {
81  KeyReleased
82  };
83 
84  IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
85  index(_index), notify(_notify), x(_x), y(_y), id(_id), code(KeyCode::None), key(0) { }
86 
87  IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
88  index(_index), notify(_notify), x(0), y(0), id(MouseButton::None), code(_code), key(_key) { }
89 
90  IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
91  index(_index), notify(_notify), x(0), y(0), id(MouseButton::None), code(_code), key(KeyCode::None) { }
92 
94  size_t index;
98  int x;
100  int y;
107  };
108 
109 } // namespace MyGUI
110 
111 #endif // __MYGUI_ITEM_INFO_H__