#include <MyGUI_ItemBox.h>
Data Structures | |
struct | ItemDataInfo |
Public Types | |
typedef RTTIBase | Base |
typedef ItemBox | RTTIBase |
Public Member Functions | |
virtual const std::string & | getTypeName () const |
virtual bool | isType (const std::type_info &_type) const |
template<typename Type > | |
bool | isType () const |
ItemBox () | |
size_t | getItemCount () |
Get number of items. | |
void | insertItemAt (size_t _index, Any _data=Any::Null) |
Insert an item into a array at a specified position. | |
void | addItem (Any _data=Any::Null) |
Add an item to the end of a array. | |
void | removeItemAt (size_t _index) |
Remove item at a specified position. | |
void | removeAllItems () |
Remove all items. | |
void | redrawItemAt (size_t _index) |
Redraw at a specified position. | |
void | redrawAllItems () |
Redraw all items. | |
size_t | getIndexSelected () |
Get index of selected item (ITEM_NONE if none selected). | |
void | setIndexSelected (size_t _index) |
Select specified _index. | |
void | clearIndexSelected () |
Clear item selection. | |
void | setItemDataAt (size_t _index, Any _data) |
Replace an item data at a specified position. | |
void | clearItemDataAt (size_t _index) |
Clear an item data at a specified position. | |
template<typename ValueType > | |
ValueType * | getItemDataAt (size_t _index, bool _throw=true) |
Get item data from specified position. | |
void | setItemBoxAlignVert (bool _value) |
bool | getItemBoxAlignVert () |
size_t | getIndexByWidget (WidgetPtr _widget) |
WidgetPtr | getWidgetDrag () |
WidgetPtr | getWidgetByIndex (size_t _index) |
void | resetDrag () |
virtual void | setPosition (const IntPoint &_value) |
virtual void | setSize (const IntSize &_value) |
virtual void | setCoord (const IntCoord &_value) |
void | setPosition (int _left, int _top) |
void | setSize (int _width, int _height) |
void | setCoord (int _left, int _top, int _width, int _height) |
virtual void | _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, WidgetPtr _parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name) |
void | setPosition (const IntCoord &_coord) |
void | setPosition (int _left, int _top, int _width, int _height) |
size_t | getItemIndexSelected () |
void | setItemSelectedAt (size_t _index) |
void | clearItemSelected () |
void | insertItem (size_t _index, Any _data=Any::Null) |
void | setItemData (size_t _index, Any _data) |
void | deleteItem (size_t _index) |
void | deleteAllItems () |
size_t | getItemSelect () |
void | resetItemSelect () |
void | setItemSelect (size_t _index) |
WidgetPtr | getWidgetDrop () |
void | resetDrop () |
Static Public Member Functions | |
static const std::string & | getClassTypeName () |
Data Fields | |
EventHandle_ItemBoxPtrWidgetPtr | requestCreateWidgetItem |
EventHandle_ItemBoxPtrIntCoordRefBool | requestCoordItem |
EventHandle_ItemBoxPtrWidgetPtrCIBCellDrawInfoRef | requestDrawItem |
EventHandle_ItemBoxPtrSizeT | eventSelectItemAccept |
EventHandle_ItemBoxPtrSizeT | eventChangeItemPosition |
EventHandle_ItemBoxPtrSizeT | eventMouseItemActivate |
EventHandle_ItemBoxPtrCIBNotifyCellDataRef | eventNotifyItem |
Protected Types | |
typedef std::vector< ItemDataInfo > | VectorItemInfo |
Protected Member Functions | |
virtual | ~ItemBox () |
void | baseChangeWidgetSkin (ResourceSkin *_info) |
virtual void | onMouseButtonPressed (int _left, int _top, MouseButton _id) |
virtual void | onMouseButtonReleased (int _left, int _top, MouseButton _id) |
virtual void | onMouseDrag (int _left, int _top) |
virtual void | onMouseWheel (int _rel) |
virtual void | onKeyLostFocus (WidgetPtr _new) |
virtual void | onKeySetFocus (WidgetPtr _old) |
void | notifyKeyButtonPressed (WidgetPtr _sender, KeyCode _key, Char _char) |
void | notifyKeyButtonReleased (WidgetPtr _sender, KeyCode _key) |
void | notifyScrollChangePosition (VScrollPtr _sender, size_t _index) |
void | notifyMouseWheel (WidgetPtr _sender, int _rel) |
void | notifyRootMouseChangeFocus (WidgetPtr _sender, bool _focus) |
void | notifyMouseButtonDoubleClick (WidgetPtr _sender) |
void | _requestGetContainer (WidgetPtr _sender, WidgetPtr &_container, size_t &_index) |
void | notifyMouseDrag (WidgetPtr _sender, int _left, int _top) |
void | notifyMouseButtonPressed (WidgetPtr _sender, int _left, int _top, MouseButton _id) |
void | notifyMouseButtonReleased (WidgetPtr _sender, int _left, int _top, MouseButton _id) |
virtual void | removeDropItems () |
virtual void | updateDropItems () |
virtual void | updateDropItemsState (const DDWidgetState &_state) |
void | updateMetrics () |
void | _updateAllVisible (bool _redraw) |
void | updateFromResize () |
WidgetPtr | getItemWidget (size_t _index) |
void | _setContainerItemInfo (size_t _index, bool _set, bool _accept) |
void | resetCurrentActiveItem () |
void | findCurrentActiveItem () |
virtual size_t | _getContainerIndex (const IntPoint &_point) |
virtual void | _resetContainer (bool _update) |
Definition at line 42 of file MyGUI_ItemBox.h.
typedef RTTIBase MyGUI::ItemBox::Base |
Definition at line 46 of file MyGUI_ItemBox.h.
typedef ItemBox MyGUI::ItemBox::RTTIBase |
Definition at line 46 of file MyGUI_ItemBox.h.
typedef std::vector<ItemDataInfo> MyGUI::ItemBox::VectorItemInfo [protected] |
Definition at line 245 of file MyGUI_ItemBox.h.
MyGUI::ItemBox::ItemBox | ( | ) |
Definition at line 38 of file MyGUI_ItemBox.cpp.
MyGUI::ItemBox::~ItemBox | ( | ) | [protected, virtual] |
Definition at line 59 of file MyGUI_ItemBox.cpp.
size_t MyGUI::ItemBox::_getContainerIndex | ( | const IntPoint & | _point | ) | [protected, virtual] |
Definition at line 540 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_initialise | ( | WidgetStyle | _style, | |
const IntCoord & | _coord, | |||
Align | _align, | |||
ResourceSkin * | _info, | |||
WidgetPtr | _parent, | |||
ICroppedRectangle * | _croppedParent, | |||
IWidgetCreator * | _creator, | |||
const std::string & | _name | |||
) | [virtual] |
Definition at line 52 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_requestGetContainer | ( | WidgetPtr | _sender, | |
WidgetPtr & | _container, | |||
size_t & | _index | |||
) | [protected] |
Definition at line 333 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_resetContainer | ( | bool | _update | ) | [protected, virtual] |
Definition at line 555 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_setContainerItemInfo | ( | size_t | _index, | |
bool | _set, | |||
bool | _accept | |||
) | [protected] |
Definition at line 351 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_updateAllVisible | ( | bool | _redraw | ) | [protected] |
Definition at line 168 of file MyGUI_ItemBox.cpp.
Add an item to the end of a array.
Definition at line 61 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::baseChangeWidgetSkin | ( | ResourceSkin * | _info | ) | [protected] |
Definition at line 64 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::clearIndexSelected | ( | ) | [inline] |
Clear item selection.
Definition at line 86 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::clearItemDataAt | ( | size_t | _index | ) | [inline] |
Clear an item data at a specified position.
Definition at line 96 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::clearItemSelected | ( | ) | [inline] |
Definition at line 211 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::deleteAllItems | ( | ) | [inline] |
Definition at line 220 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::deleteItem | ( | size_t | _index | ) | [inline] |
Definition at line 218 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::findCurrentActiveItem | ( | ) | [protected] |
Definition at line 297 of file MyGUI_ItemBox.cpp.
static const std::string& MyGUI::ItemBox::getClassTypeName | ( | ) | [inline, static] |
Definition at line 46 of file MyGUI_ItemBox.h.
size_t MyGUI::ItemBox::getIndexByWidget | ( | WidgetPtr | _widget | ) |
Get item index by item Widget pointer
Definition at line 528 of file MyGUI_ItemBox.cpp.
size_t MyGUI::ItemBox::getIndexSelected | ( | ) | [inline] |
Get index of selected item (ITEM_NONE if none selected).
Definition at line 80 of file MyGUI_ItemBox.h.
bool MyGUI::ItemBox::getItemBoxAlignVert | ( | ) | [inline] |
Get vertical alignment grid mode flag
Definition at line 110 of file MyGUI_ItemBox.h.
size_t MyGUI::ItemBox::getItemCount | ( | ) | [inline] |
Get number of items.
Definition at line 55 of file MyGUI_ItemBox.h.
ValueType* MyGUI::ItemBox::getItemDataAt | ( | size_t | _index, | |
bool | _throw = true | |||
) | [inline] |
Get item data from specified position.
Definition at line 100 of file MyGUI_ItemBox.h.
size_t MyGUI::ItemBox::getItemIndexSelected | ( | ) | [inline] |
Definition at line 207 of file MyGUI_ItemBox.h.
size_t MyGUI::ItemBox::getItemSelect | ( | ) | [inline] |
Definition at line 222 of file MyGUI_ItemBox.h.
WidgetPtr MyGUI::ItemBox::getItemWidget | ( | size_t | _index | ) | [protected] |
Definition at line 221 of file MyGUI_ItemBox.cpp.
virtual const std::string& MyGUI::ItemBox::getTypeName | ( | ) | const [inline, virtual] |
Get type name as string
Definition at line 46 of file MyGUI_ItemBox.h.
WidgetPtr MyGUI::ItemBox::getWidgetByIndex | ( | size_t | _index | ) |
Get item Widget pointer by item index if it is visible
Definition at line 570 of file MyGUI_ItemBox.cpp.
WidgetPtr MyGUI::ItemBox::getWidgetDrag | ( | ) | [inline] |
Get widget created for drop
Definition at line 116 of file MyGUI_ItemBox.h.
WidgetPtr MyGUI::ItemBox::getWidgetDrop | ( | ) | [inline] |
Definition at line 229 of file MyGUI_ItemBox.h.
Definition at line 214 of file MyGUI_ItemBox.h.
Insert an item into a array at a specified position.
Definition at line 384 of file MyGUI_ItemBox.cpp.
bool MyGUI::ItemBox::isType | ( | ) | const [inline] |
Compare with selected type
Definition at line 46 of file MyGUI_ItemBox.h.
virtual bool MyGUI::ItemBox::isType | ( | const std::type_info & | _type | ) | const [inline, virtual] |
Compare with selected type
Definition at line 46 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::notifyKeyButtonPressed | ( | WidgetPtr | _sender, | |
KeyCode | _key, | |||
Char | _char | |||
) | [protected] |
Definition at line 518 of file MyGUI_ItemBox.cpp.
Definition at line 523 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseButtonDoubleClick | ( | WidgetPtr | _sender | ) | [protected] |
Definition at line 502 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseButtonPressed | ( | WidgetPtr | _sender, | |
int | _left, | |||
int | _top, | |||
MouseButton | _id | |||
) | [protected] |
Definition at line 647 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseButtonReleased | ( | WidgetPtr | _sender, | |
int | _left, | |||
int | _top, | |||
MouseButton | _id | |||
) | [protected] |
Definition at line 681 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseDrag | ( | WidgetPtr | _sender, | |
int | _left, | |||
int | _top | |||
) | [protected] |
Definition at line 642 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseWheel | ( | WidgetPtr | _sender, | |
int | _rel | |||
) | [protected] |
Definition at line 768 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyRootMouseChangeFocus | ( | WidgetPtr | _sender, | |
bool | _focus | |||
) | [protected] |
Definition at line 690 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyScrollChangePosition | ( | VScrollPtr | _sender, | |
size_t | _index | |||
) | [protected] |
Definition at line 754 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onKeyLostFocus | ( | WidgetPtr | _new | ) | [protected, virtual] |
Definition at line 270 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onKeySetFocus | ( | WidgetPtr | _old | ) | [protected, virtual] |
Definition at line 262 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseButtonPressed | ( | int | _left, | |
int | _top, | |||
MouseButton | _id | |||
) | [protected, virtual] |
Definition at line 584 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseButtonReleased | ( | int | _left, | |
int | _top, | |||
MouseButton | _id | |||
) | [protected, virtual] |
Definition at line 589 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseDrag | ( | int | _left, | |
int | _top | |||
) | [protected, virtual] |
Definition at line 594 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseWheel | ( | int | _rel | ) | [protected, virtual] |
Definition at line 255 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::redrawAllItems | ( | ) |
Redraw all items.
Definition at line 840 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::redrawItemAt | ( | size_t | _index | ) |
Redraw at a specified position.
Definition at line 458 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::removeAllItems | ( | ) |
Remove all items.
Definition at line 442 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::removeDropItems | ( | ) | [protected, virtual] |
Definition at line 599 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::removeItemAt | ( | size_t | _index | ) |
Remove item at a specified position.
Definition at line 412 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::resetCurrentActiveItem | ( | ) | [protected] |
Definition at line 278 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::resetDrag | ( | ) |
Interrupt drag as if widget was dropped into empty space
Definition at line 845 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::resetDrop | ( | ) | [inline] |
Definition at line 231 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::resetItemSelect | ( | ) | [inline] |
Definition at line 224 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setCoord | ( | const IntCoord & | _value | ) | [virtual] |
Set widget position and size
Definition at line 140 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setCoord | ( | int | _left, | |
int | _top, | |||
int | _width, | |||
int | _height | |||
) | [inline] |
See Widget::setCoord(const IntCoord& _coord)
Definition at line 140 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setIndexSelected | ( | size_t | _index | ) |
Select specified _index.
Definition at line 470 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setItemBoxAlignVert | ( | bool | _value | ) |
Set vertical alignment grid mode
Definition at line 509 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setItemData | ( | size_t | _index, | |
Any | _data | |||
) | [inline] |
Definition at line 216 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setItemDataAt | ( | size_t | _index, | |
Any | _data | |||
) |
Replace an item data at a specified position.
Definition at line 369 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setItemSelect | ( | size_t | _index | ) | [inline] |
Definition at line 226 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setItemSelectedAt | ( | size_t | _index | ) | [inline] |
Definition at line 209 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setPosition | ( | int | _left, | |
int | _top | |||
) | [inline] |
See Widget::setPosition(const IntPoint& _pos)
Definition at line 136 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setPosition | ( | const IntPoint & | _value | ) | [virtual] |
Set widget position (position of left top corner)
Definition at line 129 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setPosition | ( | int | _left, | |
int | _top, | |||
int | _width, | |||
int | _height | |||
) | [inline] |
Definition at line 204 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setPosition | ( | const IntCoord & | _coord | ) | [inline] |
Definition at line 202 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setSize | ( | int | _width, | |
int | _height | |||
) | [inline] |
See Widget::setSize(const IntSize& _size)
Definition at line 138 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::setSize | ( | const IntSize & | _value | ) | [virtual] |
Set widget size
Definition at line 134 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateDropItems | ( | ) | [protected, virtual] |
Definition at line 604 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateDropItemsState | ( | const DDWidgetState & | _state | ) | [protected, virtual] |
Definition at line 626 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateFromResize | ( | ) | [protected] |
Definition at line 157 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateMetrics | ( | ) | [protected] |
Definition at line 723 of file MyGUI_ItemBox.cpp.
Event : position of selected item was changed signature : void method(MyGUI::ItemBoxPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | item index |
Definition at line 178 of file MyGUI_ItemBox.h.
Event : click on item signature : void method(MyGUI::ItemBoxPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | item index |
Definition at line 185 of file MyGUI_ItemBox.h.
Event : notify about event in item widget signature : void method(MyGUI::ItemBoxPtr _sender, const MyGUI::IBNotifyItemData& _info)
_sender | widget that called this event | |
_info | info about item notify |
Definition at line 192 of file MyGUI_ItemBox.h.
Event : doubleclick or enter pressed on item signature : void method(MyGUI::ItemBoxPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | item index |
Definition at line 171 of file MyGUI_ItemBox.h.
Event : request for item coordinate signature : void method(MyGUI::ItemBoxPtr _sender, MyGUI::IntCoord& _coord, bool _drag)
_sender | widget that called this event | |
_coord | write heer item coordinate | |
_drag | is this item dragging |
Definition at line 156 of file MyGUI_ItemBox.h.
Event : request for creating new item signature : void method(MyGUI::ItemBoxPtr _sender, MyGUI::WidgetPtr _item)
_sender | widget that called this event | |
_item | widget item pointer |
Definition at line 148 of file MyGUI_ItemBox.h.
Event : request for item redraw signature : void method(MyGUI::ItemBoxPtr _sender, MyGUI::WidgetPtr _item, const MyGUI::IBDrawItemInfo& _info)
_sender | widget that called this event | |
_item | widget item pointer | |
_info | item info |
Definition at line 164 of file MyGUI_ItemBox.h.