MyGUI  3.2.0
MyGUI_IBItemInfo.h
Go to the documentation of this file.
00001 
00006 /*
00007     This file is part of MyGUI.
00008 
00009     MyGUI is free software: you can redistribute it and/or modify
00010     it under the terms of the GNU Lesser General Public License as published by
00011     the Free Software Foundation, either version 3 of the License, or
00012     (at your option) any later version.
00013 
00014     MyGUI is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public License
00020     along with MyGUI.  If not, see <http://www.gnu.org/licenses/>.
00021 */
00022 #ifndef __MYGUI_ITEM_INFO_H__
00023 #define __MYGUI_ITEM_INFO_H__
00024 
00025 #include "MyGUI_Prerequest.h"
00026 
00027 namespace MyGUI
00028 {
00029 
00030     // структура информации об отображении элемента
00032     struct MYGUI_EXPORT IBDrawItemInfo
00033     {
00034 
00035         IBDrawItemInfo() :
00036             index(ITEM_NONE),
00037             update(false),
00038             select(false),
00039             active(false),
00040             drag(false),
00041             drop_accept(false),
00042             drop_refuse(false)
00043         {
00044         }
00045 
00046         IBDrawItemInfo(size_t _index, size_t _select, size_t _active, size_t _accept, size_t _refuse, bool _update, bool _drag) :
00047             index(_index),
00048             update(_update),
00049             select(_index == _select),
00050             active(_index == _active),
00051             drag(_drag),
00052             drop_accept(_index == _accept),
00053             drop_refuse(_index == _refuse)
00054         {
00055         }
00056 
00058         size_t index;
00060         bool update;
00062         bool select;
00064         bool active;
00066         bool drag;
00068         bool drop_accept;
00070         bool drop_refuse;
00071     };
00072 
00073     struct MYGUI_EXPORT IBNotifyItemData
00074     {
00075         enum NotifyItem
00076         {
00077             MousePressed,
00078             MouseReleased,
00079             KeyPressed,
00080             KeyReleased
00081         };
00082 
00083         IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
00084             index(_index),
00085             notify(_notify),
00086             x(_x),
00087             y(_y),
00088             id(_id),
00089             code(KeyCode::None),
00090             key(0)
00091         {
00092         }
00093 
00094         IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
00095             index(_index),
00096             notify(_notify),
00097             x(0),
00098             y(0),
00099             id(MouseButton::None),
00100             code(_code),
00101             key(_key)
00102         {
00103         }
00104 
00105         IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
00106             index(_index),
00107             notify(_notify),
00108             x(0),
00109             y(0),
00110             id(MouseButton::None),
00111             code(_code),
00112             key(KeyCode::None)
00113         {
00114         }
00115 
00117         size_t index;
00119         NotifyItem notify;
00121         int x;
00123         int y;
00125         MouseButton id;
00127         KeyCode code;
00129         Char key;
00130     };
00131 
00132 } // namespace MyGUI
00133 
00134 #endif // __MYGUI_ITEM_INFO_H__