MyGUI_IBItemInfo.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_ITEM_INFO_H_
#define MYGUI_ITEM_INFO_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_KeyCode.h"
#include "MyGUI_MouseButton.h"
#include "MyGUI_Types.h"
namespace MyGUI
{
// структура информации об отображении элемента
struct MYGUI_EXPORT IBDrawItemInfo
{
IBDrawItemInfo() :
index(ITEM_NONE),
update(false),
select(false),
active(false),
drag(false),
drop_accept(false),
drop_refuse(false)
{
}
IBDrawItemInfo(
size_t _index,
size_t _select,
size_t _active,
size_t _accept,
size_t _refuse,
bool _update,
bool _drag) :
index(_index),
update(_update),
select(_index == _select),
active(_index == _active),
drag(_drag),
drop_accept(_index == _accept),
drop_refuse(_index == _refuse)
{
}
size_t index;
bool update;
bool select;
bool active;
bool drag;
bool drop_accept;
bool drop_refuse;
};
struct MYGUI_EXPORT IBNotifyItemData
{
enum NotifyItem
{
MousePressed,
MouseReleased,
KeyPressed,
KeyReleased
};
IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id) :
index(_index),
notify(_notify),
x(_x),
y(_y),
id(_id),
code(KeyCode::None),
key(0)
{
}
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key) :
index(_index),
notify(_notify),
x(0),
y(0),
id(MouseButton::None),
code(_code),
key(_key)
{
}
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code) :
index(_index),
notify(_notify),
x(0),
y(0),
id(MouseButton::None),
code(_code),
key(KeyCode::None)
{
}
size_t index;
NotifyItem notify;
int x;
int y;
MouseButton id;
KeyCode code;
Char key;
};
} // namespace MyGUI
#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
constexpr size_t ITEM_NONE
Definition MyGUI_Macros.h:19
MyGUI::IBDrawItemInfo::index
size_t index
Definition MyGUI_IBItemInfo.h:52
MyGUI::IBDrawItemInfo::drop_refuse
bool drop_refuse
Definition MyGUI_IBItemInfo.h:64
MyGUI::IBDrawItemInfo::select
bool select
Definition MyGUI_IBItemInfo.h:56
MyGUI::IBDrawItemInfo::update
bool update
Definition MyGUI_IBItemInfo.h:54
MyGUI::IBDrawItemInfo::drag
bool drag
Definition MyGUI_IBItemInfo.h:60
MyGUI::IBDrawItemInfo::drop_accept
bool drop_accept
Definition MyGUI_IBItemInfo.h:62
MyGUI::IBDrawItemInfo::IBDrawItemInfo
IBDrawItemInfo()
Definition MyGUI_IBItemInfo.h:22
MyGUI::IBDrawItemInfo::active
bool active
Definition MyGUI_IBItemInfo.h:58
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:33
MyGUI::IBNotifyItemData::y
int y
Definition MyGUI_IBItemInfo.h:117
MyGUI::IBNotifyItemData::key
Char key
Definition MyGUI_IBItemInfo.h:123
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, int _x, int _y, MouseButton _id)
Definition MyGUI_IBItemInfo.h:77
MyGUI::IBNotifyItemData::id
MouseButton id
Definition MyGUI_IBItemInfo.h:119
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code, Char _key)
Definition MyGUI_IBItemInfo.h:88
MyGUI::IBNotifyItemData::code
KeyCode code
Definition MyGUI_IBItemInfo.h:121
MyGUI::IBNotifyItemData::NotifyItem
NotifyItem
Definition MyGUI_IBItemInfo.h:70
MyGUI::IBNotifyItemData::KeyReleased
@ KeyReleased
Definition MyGUI_IBItemInfo.h:74
MyGUI::IBNotifyItemData::KeyPressed
@ KeyPressed
Definition MyGUI_IBItemInfo.h:73
MyGUI::IBNotifyItemData::MousePressed
@ MousePressed
Definition MyGUI_IBItemInfo.h:71
MyGUI::IBNotifyItemData::MouseReleased
@ MouseReleased
Definition MyGUI_IBItemInfo.h:72
MyGUI::IBNotifyItemData::notify
NotifyItem notify
Definition MyGUI_IBItemInfo.h:113
MyGUI::IBNotifyItemData::index
size_t index
Definition MyGUI_IBItemInfo.h:111
MyGUI::IBNotifyItemData::IBNotifyItemData
IBNotifyItemData(size_t _index, NotifyItem _notify, KeyCode _code)
Definition MyGUI_IBItemInfo.h:99
MyGUI::IBNotifyItemData::x
int x
Definition MyGUI_IBItemInfo.h:115
MyGUI::KeyCode
Definition MyGUI_KeyCode.h:16
MyGUI::MouseButton
Definition MyGUI_MouseButton.h:16