MyGUI
3.2.0
|
#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 () const |
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 () const |
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 | setVerticalAlignment (bool _value) |
bool | getVerticalAlignment () const |
size_t | getIndexByWidget (Widget *_widget) |
Widget * | getWidgetDrag () |
Widget * | 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 | _resetContainer (bool _update) |
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 void | initialiseOverride () |
virtual void | shutdownOverride () |
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, MouseButton _id) |
virtual void | onMouseWheel (int _rel) |
virtual void | onKeyLostFocus (Widget *_new) |
virtual void | onKeySetFocus (Widget *_old) |
void | notifyKeyButtonPressed (Widget *_sender, KeyCode _key, Char _char) |
void | notifyKeyButtonReleased (Widget *_sender, KeyCode _key) |
void | notifyScrollChangePosition (ScrollBar *_sender, size_t _index) |
void | notifyMouseWheel (Widget *_sender, int _rel) |
void | notifyRootMouseChangeFocus (Widget *_sender, bool _focus) |
void | notifyMouseButtonDoubleClick (Widget *_sender) |
virtual size_t | _getItemIndex (Widget *_item) |
void | notifyMouseDrag (Widget *_sender, int _left, int _top, MouseButton _id) |
void | notifyMouseButtonPressed (Widget *_sender, int _left, int _top, MouseButton _id) |
void | notifyMouseButtonReleased (Widget *_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 () |
Widget * | 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 | setPropertyOverride (const std::string &_key, const std::string &_value) |
Definition at line 41 of file MyGUI_ItemBox.h.
typedef RTTIBase MyGUI::ItemBox::Base |
Reimplemented from MyGUI::DDContainer.
Definition at line 46 of file MyGUI_ItemBox.h.
typedef ItemBox MyGUI::ItemBox::RTTIBase |
Reimplemented from MyGUI::DDContainer.
Definition at line 46 of file MyGUI_ItemBox.h.
typedef std::vector<ItemDataInfo> MyGUI::ItemBox::VectorItemInfo [protected] |
Definition at line 214 of file MyGUI_ItemBox.h.
Definition at line 35 of file MyGUI_ItemBox.cpp.
size_t MyGUI::ItemBox::_getContainerIndex | ( | const IntPoint & | _point | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 503 of file MyGUI_ItemBox.cpp.
size_t MyGUI::ItemBox::_getItemIndex | ( | Widget * | _item | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 304 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_resetContainer | ( | bool | _update | ) | [virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 518 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_setContainerItemInfo | ( | size_t | _index, |
bool | _set, | ||
bool | _accept | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 314 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::_updateAllVisible | ( | bool | _redraw | ) | [protected] |
Definition at line 142 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::addItem | ( | Any | _data = Any::Null | ) |
Add an item to the end of a array.
Definition at line 876 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::clearIndexSelected | ( | ) |
Clear item selection.
Definition at line 886 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::clearItemDataAt | ( | size_t | _index | ) |
Clear an item data at a specified position.
Definition at line 891 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::findCurrentActiveItem | ( | ) | [protected] |
Definition at line 268 of file MyGUI_ItemBox.cpp.
static const std::string& MyGUI::ItemBox::getClassTypeName | ( | ) | [inline, static] |
Reimplemented from MyGUI::DDContainer.
Definition at line 46 of file MyGUI_ItemBox.h.
size_t MyGUI::ItemBox::getIndexByWidget | ( | Widget * | _widget | ) |
Get item index by item Widget pointer
Definition at line 491 of file MyGUI_ItemBox.cpp.
size_t MyGUI::ItemBox::getIndexSelected | ( | ) | const |
Get index of selected item (ITEM_NONE if none selected)
Definition at line 881 of file MyGUI_ItemBox.cpp.
size_t MyGUI::ItemBox::getItemCount | ( | ) | const |
Get number of items.
Definition at line 871 of file MyGUI_ItemBox.cpp.
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.
Widget * MyGUI::ItemBox::getItemWidget | ( | size_t | _index | ) | [protected] |
Definition at line 195 of file MyGUI_ItemBox.cpp.
virtual const std::string& MyGUI::ItemBox::getTypeName | ( | ) | const [inline, virtual] |
Get type name as string
Reimplemented from MyGUI::DDContainer.
Definition at line 46 of file MyGUI_ItemBox.h.
bool MyGUI::ItemBox::getVerticalAlignment | ( | ) | const |
Get vertical alignment grid mode flag
Definition at line 896 of file MyGUI_ItemBox.cpp.
Widget * MyGUI::ItemBox::getWidgetByIndex | ( | size_t | _index | ) |
Get item Widget pointer by item index if it is visible
Definition at line 533 of file MyGUI_ItemBox.cpp.
Get widget created for drop
Definition at line 901 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::initialiseOverride | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 51 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::insertItemAt | ( | size_t | _index, |
Any | _data = Any::Null |
||
) |
Insert an item into a array at a specified position.
Definition at line 345 of file MyGUI_ItemBox.cpp.
bool MyGUI::ItemBox::isType | ( | ) | const [inline] |
Compare with selected type
Reimplemented from MyGUI::DDContainer.
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
Reimplemented from MyGUI::DDContainer.
Definition at line 46 of file MyGUI_ItemBox.h.
void MyGUI::ItemBox::notifyKeyButtonPressed | ( | Widget * | _sender, |
KeyCode | _key, | ||
Char | _char | ||
) | [protected] |
Definition at line 481 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyKeyButtonReleased | ( | Widget * | _sender, |
KeyCode | _key | ||
) | [protected] |
Definition at line 486 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseButtonDoubleClick | ( | Widget * | _sender | ) | [protected] |
Definition at line 464 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseButtonPressed | ( | Widget * | _sender, |
int | _left, | ||
int | _top, | ||
MouseButton | _id | ||
) | [protected] |
Definition at line 610 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseButtonReleased | ( | Widget * | _sender, |
int | _left, | ||
int | _top, | ||
MouseButton | _id | ||
) | [protected] |
Definition at line 644 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseDrag | ( | Widget * | _sender, |
int | _left, | ||
int | _top, | ||
MouseButton | _id | ||
) | [protected] |
Definition at line 605 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyMouseWheel | ( | Widget * | _sender, |
int | _rel | ||
) | [protected] |
Definition at line 731 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyRootMouseChangeFocus | ( | Widget * | _sender, |
bool | _focus | ||
) | [protected] |
Definition at line 653 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::notifyScrollChangePosition | ( | ScrollBar * | _sender, |
size_t | _index | ||
) | [protected] |
Definition at line 717 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onKeyLostFocus | ( | Widget * | _new | ) | [protected, virtual] |
Reimplemented from MyGUI::WidgetInput.
Definition at line 242 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onKeySetFocus | ( | Widget * | _old | ) | [protected, virtual] |
Reimplemented from MyGUI::WidgetInput.
Definition at line 235 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseButtonPressed | ( | int | _left, |
int | _top, | ||
MouseButton | _id | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 547 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseButtonReleased | ( | int | _left, |
int | _top, | ||
MouseButton | _id | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 552 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseDrag | ( | int | _left, |
int | _top, | ||
MouseButton | _id | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 557 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::onMouseWheel | ( | int | _rel | ) | [protected, virtual] |
Reimplemented from MyGUI::WidgetInput.
Definition at line 228 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::redrawAllItems | ( | ) |
Redraw all items.
Definition at line 811 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::redrawItemAt | ( | size_t | _index | ) |
Redraw at a specified position.
Definition at line 420 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::removeAllItems | ( | ) |
Remove all items.
Definition at line 403 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::removeDropItems | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 562 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::removeItemAt | ( | size_t | _index | ) |
Remove item at a specified position.
Definition at line 373 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::resetCurrentActiveItem | ( | ) | [protected] |
Definition at line 249 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::resetDrag | ( | ) |
Interrupt drag as if widget was dropped into empty space
Reimplemented from MyGUI::DDContainer.
Definition at line 816 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setCoord | ( | const IntCoord & | _value | ) | [virtual] |
Set widget position and size
Reimplemented from MyGUI::Widget.
Definition at line 114 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setCoord | ( | int | _left, |
int | _top, | ||
int | _width, | ||
int | _height | ||
) |
See Widget::setCoord(const IntCoord& _coord)
Reimplemented from MyGUI::Widget.
Definition at line 916 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setIndexSelected | ( | size_t | _index | ) |
Select specified _index.
Definition at line 432 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setItemDataAt | ( | size_t | _index, |
Any | _data | ||
) |
Replace an item data at a specified position.
Definition at line 330 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setPosition | ( | const IntPoint & | _value | ) | [virtual] |
Set widget position (position of left top corner)
Reimplemented from MyGUI::Widget.
Definition at line 103 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setPosition | ( | int | _left, |
int | _top | ||
) |
See Widget::setPosition(const IntPoint& _pos)
Reimplemented from MyGUI::Widget.
Definition at line 906 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setPropertyOverride | ( | const std::string & | _key, |
const std::string & | _value | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 921 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setSize | ( | const IntSize & | _value | ) | [virtual] |
void MyGUI::ItemBox::setSize | ( | int | _width, |
int | _height | ||
) |
See Widget::setSize(const IntSize& _size)
Reimplemented from MyGUI::Widget.
Definition at line 911 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::setVerticalAlignment | ( | bool | _value | ) |
Set vertical alignment grid mode
Definition at line 471 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::shutdownOverride | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 94 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateDropItems | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 567 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateDropItemsState | ( | const DDWidgetState & | _state | ) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 589 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateFromResize | ( | ) | [protected] |
Definition at line 131 of file MyGUI_ItemBox.cpp.
void MyGUI::ItemBox::updateMetrics | ( | ) | [protected] |
Definition at line 686 of file MyGUI_ItemBox.cpp.
Event : Position of selected item was changed.
signature : void method(MyGUI::ItemBox* _sender, size_t _index)
_sender | widget that called this event |
_index | item index |
Definition at line 183 of file MyGUI_ItemBox.h.
Event : Click on item.
signature : void method(MyGUI::ItemBox* _sender, size_t _index)
_sender | widget that called this event |
_index | item index |
Definition at line 191 of file MyGUI_ItemBox.h.
Event : Notify about event in item widget.
signature : void method(MyGUI::ItemBox* _sender, const MyGUI::IBNotifyItemData& _info)
_sender | widget that called this event |
_info | info about item notify |
Definition at line 199 of file MyGUI_ItemBox.h.
Event : Doubleclick or enter pressed on item.
signature : void method(MyGUI::ItemBox* _sender, size_t _index)
_sender | widget that called this event |
_index | item index |
Definition at line 175 of file MyGUI_ItemBox.h.
Event : Request for item coordinate.
signature : void method(MyGUI::ItemBox* _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 158 of file MyGUI_ItemBox.h.
Event : Request for creating new item.
signature : void method(MyGUI::ItemBox* _sender, MyGUI::Widget* _item)
_sender | widget that called this event |
_item | widget item pointer |
Definition at line 149 of file MyGUI_ItemBox.h.
Event : Request for item redraw.
signature : void method(MyGUI::ItemBox* _sender, MyGUI::Widget* _item, const MyGUI::IBDrawItemInfo& _info)
_sender | widget that called this event |
_item | widget item pointer |
_info | item info |
Definition at line 167 of file MyGUI_ItemBox.h.