MyGUI
3.0.1
|
#include <MyGUI_ListCtrl.h>
Data Structures | |
struct | ItemDataInfo |
Public Types | |
typedef RTTIBase | Base |
typedef ListCtrl | 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 |
ListCtrl () | |
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 () |
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. | |
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 | _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, Widget *_parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name) |
Static Public Member Functions | |
static const std::string & | getClassTypeName () |
Data Fields | |
EventHandle_ListCtrlPtrWidgetPtr | requestCreateWidgetItem |
EventHandle_ListCtrlPtrWidgetPtrCIBCellDrawInfoRef | requestDrawItem |
EventHandle_ListCtrlPtrSizeT | eventSelectItemAccept |
EventHandle_ListCtrlPtrSizeT | eventChangeItemPosition |
EventHandle_ListCtrlPtrSizeT | eventMouseItemActivate |
EventHandle_ListCtrlPtrCIBNotifyCellDataRef | eventNotifyItem |
Protected Types | |
typedef std::vector< ItemDataInfo > | VectorItemInfo |
Protected Member Functions | |
virtual | ~ListCtrl () |
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 (Widget *_new) |
virtual void | onKeySetFocus (Widget *_old) |
void | notifyKeyButtonPressed (Widget *_sender, KeyCode _key, Char _char) |
void | notifyKeyButtonReleased (Widget *_sender, KeyCode _key) |
void | notifyScrollChangePosition (VScroll *_sender, size_t _index) |
void | notifyMouseWheel (Widget *_sender, int _rel) |
void | notifyRootMouseChangeFocus (Widget *_sender, bool _focus) |
void | notifyMouseButtonDoubleClick (Widget *_sender) |
void | _requestGetContainer (Widget *_sender, Widget *&_container, size_t &_index) |
void | notifyMouseDrag (Widget *_sender, int _left, int _top) |
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 (size_t _index, bool _needUpdateContetntSize, bool _update) |
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 | _resetContainer (bool _update) |
void | _setScrollViewPage (size_t _size) |
Definition at line 41 of file MyGUI_ListCtrl.h.
typedef RTTIBase MyGUI::ListCtrl::Base |
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 45 of file MyGUI_ListCtrl.h.
typedef ListCtrl MyGUI::ListCtrl::RTTIBase |
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 45 of file MyGUI_ListCtrl.h.
typedef std::vector<ItemDataInfo> MyGUI::ListCtrl::VectorItemInfo [protected] |
Definition at line 194 of file MyGUI_ListCtrl.h.
Definition at line 37 of file MyGUI_ListCtrl.cpp.
MyGUI::ListCtrl::~ListCtrl | ( | ) | [protected, virtual] |
Definition at line 56 of file MyGUI_ListCtrl.cpp.
size_t MyGUI::ListCtrl::_getContainerIndex | ( | const IntPoint & | _point | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 578 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::_initialise | ( | WidgetStyle | _style, |
const IntCoord & | _coord, | ||
Align | _align, | ||
ResourceSkin * | _info, | ||
Widget * | _parent, | ||
ICroppedRectangle * | _croppedParent, | ||
IWidgetCreator * | _creator, | ||
const std::string & | _name | ||
) | [virtual] |
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 49 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::_requestGetContainer | ( | Widget * | _sender, |
Widget *& | _container, | ||
size_t & | _index | ||
) | [protected] |
Definition at line 350 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::_resetContainer | ( | bool | _update | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 593 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::_setContainerItemInfo | ( | size_t | _index, |
bool | _set, | ||
bool | _accept | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 368 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::_setScrollViewPage | ( | size_t | _size | ) | [inline, protected] |
Definition at line 247 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::_updateAllVisible | ( | size_t | _index, |
bool | _needUpdateContetntSize, | ||
bool | _update | ||
) | [protected] |
Definition at line 160 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::addItem | ( | Any | _data = Any::Null | ) | [inline] |
Add an item to the end of a array.
Definition at line 60 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::baseChangeWidgetSkin | ( | ResourceSkin * | _info | ) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 71 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::clearIndexSelected | ( | ) | [inline] |
Clear item selection.
Reimplemented in MyGUI::ListBox.
Definition at line 85 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::clearItemDataAt | ( | size_t | _index | ) | [inline] |
Clear an item data at a specified position.
Reimplemented in MyGUI::ListBox.
Definition at line 95 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::findCurrentActiveItem | ( | ) | [protected] |
Definition at line 309 of file MyGUI_ListCtrl.cpp.
static const std::string& MyGUI::ListCtrl::getClassTypeName | ( | ) | [inline, static] |
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 45 of file MyGUI_ListCtrl.h.
size_t MyGUI::ListCtrl::getIndexByWidget | ( | Widget * | _widget | ) |
Get item index by item Widget pointer
Definition at line 566 of file MyGUI_ListCtrl.cpp.
size_t MyGUI::ListCtrl::getIndexSelected | ( | ) | [inline] |
Get index of selected item (ITEM_NONE if none selected)
Reimplemented in MyGUI::ListBox.
Definition at line 79 of file MyGUI_ListCtrl.h.
size_t MyGUI::ListCtrl::getItemCount | ( | ) | const [inline] |
Get number of items.
Reimplemented in MyGUI::ListBox.
Definition at line 54 of file MyGUI_ListCtrl.h.
ValueType* MyGUI::ListCtrl::getItemDataAt | ( | size_t | _index, |
bool | _throw = true |
||
) | [inline] |
Get item data from specified position.
Reimplemented in MyGUI::ListBox.
Definition at line 99 of file MyGUI_ListCtrl.h.
Widget * MyGUI::ListCtrl::getItemWidget | ( | size_t | _index | ) | [protected] |
Definition at line 229 of file MyGUI_ListCtrl.cpp.
virtual const std::string& MyGUI::ListCtrl::getTypeName | ( | ) | const [inline, virtual] |
Get type name as string
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 45 of file MyGUI_ListCtrl.h.
Widget * MyGUI::ListCtrl::getWidgetByIndex | ( | size_t | _index | ) |
Get item Widget pointer by item index if it is visible
Definition at line 608 of file MyGUI_ListCtrl.cpp.
Widget* MyGUI::ListCtrl::getWidgetDrag | ( | ) | [inline] |
Get widget created for drop
Definition at line 110 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::insertItemAt | ( | size_t | _index, |
Any | _data = Any::Null |
||
) |
Insert an item into a array at a specified position.
Definition at line 414 of file MyGUI_ListCtrl.cpp.
bool MyGUI::ListCtrl::isType | ( | ) | const [inline] |
Compare with selected type
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 45 of file MyGUI_ListCtrl.h.
virtual bool MyGUI::ListCtrl::isType | ( | const std::type_info & | _type | ) | const [inline, virtual] |
Compare with selected type
Reimplemented from MyGUI::DDContainer.
Reimplemented in MyGUI::ListBox.
Definition at line 45 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::notifyKeyButtonPressed | ( | Widget * | _sender, |
KeyCode | _key, | ||
Char | _char | ||
) | [protected] |
Definition at line 556 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyKeyButtonReleased | ( | Widget * | _sender, |
KeyCode | _key | ||
) | [protected] |
Definition at line 561 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyMouseButtonDoubleClick | ( | Widget * | _sender | ) | [protected] |
Definition at line 549 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyMouseButtonPressed | ( | Widget * | _sender, |
int | _left, | ||
int | _top, | ||
MouseButton | _id | ||
) | [protected] |
Definition at line 688 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyMouseButtonReleased | ( | Widget * | _sender, |
int | _left, | ||
int | _top, | ||
MouseButton | _id | ||
) | [protected] |
Definition at line 722 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyMouseDrag | ( | Widget * | _sender, |
int | _left, | ||
int | _top | ||
) | [protected] |
Definition at line 683 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyMouseWheel | ( | Widget * | _sender, |
int | _rel | ||
) | [protected] |
Definition at line 818 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyRootMouseChangeFocus | ( | Widget * | _sender, |
bool | _focus | ||
) | [protected] |
Definition at line 728 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::notifyScrollChangePosition | ( | VScroll * | _sender, |
size_t | _index | ||
) | [protected] |
Definition at line 796 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::onKeyLostFocus | ( | Widget * | _new | ) | [protected, virtual] |
Reimplemented from MyGUI::WidgetEvent.
Definition at line 274 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::onKeySetFocus | ( | Widget * | _old | ) | [protected, virtual] |
Reimplemented from MyGUI::WidgetEvent.
Definition at line 266 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::onMouseButtonPressed | ( | int | _left, |
int | _top, | ||
MouseButton | _id | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 622 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::onMouseButtonReleased | ( | int | _left, |
int | _top, | ||
MouseButton | _id | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 627 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::onMouseDrag | ( | int | _left, |
int | _top | ||
) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 632 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::onMouseWheel | ( | int | _rel | ) | [protected, virtual] |
Reimplemented from MyGUI::WidgetEvent.
Definition at line 259 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::redrawAllItems | ( | ) | [inline] |
Redraw all items.
Definition at line 72 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::redrawItemAt | ( | size_t | _index | ) |
Redraw at a specified position.
Definition at line 488 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::removeAllItems | ( | ) |
Remove all items.
Reimplemented in MyGUI::ListBox.
Definition at line 472 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::removeDropItems | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 637 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::removeItemAt | ( | size_t | _index | ) |
Remove item at a specified position.
Reimplemented in MyGUI::ListBox.
Definition at line 442 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::resetCurrentActiveItem | ( | ) | [protected] |
Definition at line 282 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::resetDrag | ( | ) |
Interrupt drag as if widget was dropped into empty space
Definition at line 849 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::setCoord | ( | const IntCoord & | _value | ) | [virtual] |
Set widget position and size
Reimplemented from MyGUI::Widget.
Definition at line 143 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::setCoord | ( | int | _left, |
int | _top, | ||
int | _width, | ||
int | _height | ||
) | [inline] |
See Widget::setCoord(const IntCoord& _coord)
Reimplemented from MyGUI::Widget.
Definition at line 134 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::setIndexSelected | ( | size_t | _index | ) |
Select specified _index.
Reimplemented in MyGUI::ListBox.
Definition at line 505 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::setItemDataAt | ( | size_t | _index, |
Any | _data | ||
) |
Replace an item data at a specified position.
Reimplemented in MyGUI::ListBox.
Definition at line 394 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::setPosition | ( | const IntPoint & | _value | ) | [virtual] |
Set widget position (position of left top corner)
Reimplemented from MyGUI::Widget.
Definition at line 132 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::setPosition | ( | int | _left, |
int | _top | ||
) | [inline] |
See Widget::setPosition(const IntPoint& _pos)
Reimplemented from MyGUI::Widget.
Definition at line 130 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::setSize | ( | const IntSize & | _value | ) | [virtual] |
Set widget size
Reimplemented from MyGUI::Widget.
Definition at line 137 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::setSize | ( | int | _width, |
int | _height | ||
) | [inline] |
See Widget::setSize(const IntSize& _size)
Reimplemented from MyGUI::Widget.
Definition at line 132 of file MyGUI_ListCtrl.h.
void MyGUI::ListCtrl::updateDropItems | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 642 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::updateDropItemsState | ( | const DDWidgetState & | _state | ) | [protected, virtual] |
Reimplemented from MyGUI::DDContainer.
Definition at line 664 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::updateFromResize | ( | ) | [protected] |
Definition at line 149 of file MyGUI_ListCtrl.cpp.
void MyGUI::ListCtrl::updateMetrics | ( | ) | [protected] |
Definition at line 782 of file MyGUI_ListCtrl.cpp.
Event : position of selected item was changed signature : void method(MyGUI::ListCtrl* _sender, size_t _index)
_sender | widget that called this event |
_index | item index |
Definition at line 165 of file MyGUI_ListCtrl.h.
Event : click on item signature : void method(MyGUI::ListCtrl* _sender, size_t _index)
_sender | widget that called this event |
_index | item index |
Definition at line 172 of file MyGUI_ListCtrl.h.
Event : notify about event in item widget signature : void method(MyGUI::ListCtrl* _sender, const MyGUI::IBNotifyItemData& _info)
_sender | widget that called this event |
_info | info about item notify |
Definition at line 179 of file MyGUI_ListCtrl.h.
Event : doubleclick or enter pressed on item signature : void method(MyGUI::ListCtrl* _sender, size_t _index)
_sender | widget that called this event |
_index | item index |
Definition at line 158 of file MyGUI_ListCtrl.h.
Event : request for creating new item signature : void method(MyGUI::ListCtrl* _sender, MyGUI::Widget* _item)
_sender | widget that called this event |
_item | widget item pointer |
Definition at line 143 of file MyGUI_ListCtrl.h.
Event : request for item redraw signature : void method(MyGUI::ListCtrl* _sender, MyGUI::Widget* _item, const MyGUI::IBDrawItemInfo& _info)
_sender | widget that called this event |
_item | widget item pointer |
_info | item info |
Definition at line 151 of file MyGUI_ListCtrl.h.