#include <MyGUI_List.h>
Public Member Functions | |
List () | |
size_t | getItemCount () |
Get number of items. | |
void | insertItemAt (size_t _index, const UString &_name, Any _data=Any::Null) |
Insert an item into a array at a specified position. | |
void | addItem (const UString &_name, 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 | swapItemsAt (size_t _index1, size_t _index2) |
Swap items at a specified positions. | |
size_t | findItemIndexWith (const UString &_name) |
Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found. | |
size_t | getIndexSelected () |
void | setIndexSelected (size_t _index) |
void | clearIndexSelected () |
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 | setItemNameAt (size_t _index, const UString &_name) |
Replace an item name at a specified position. | |
const UString & | getItemNameAt (size_t _index) |
Get item name from specified position. | |
void | beginToItemAt (size_t _index) |
Move all elements so specified becomes visible. | |
void | beginToItemFirst () |
Move all elements so first becomes visible. | |
void | beginToItemLast () |
Move all elements so last becomes visible. | |
void | beginToItemSelected () |
Move all elements so selected becomes visible. | |
bool | isItemVisibleAt (size_t _index, bool _fill=true) |
bool | isItemSelectedVisible (bool _fill=true) |
Same as List::isItemVisible for selected item. | |
void | setScrollVisible (bool _visible) |
Set scroll visible when it needed. | |
void | setScrollPosition (size_t _position) |
Set scroll position. | |
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) |
size_t | getOptimalHeight () |
Return optimal height to fit all items in List. | |
virtual void | setProperty (const std::string &_key, const std::string &_value) |
void | _checkAlign () |
void | _setItemFocus (size_t _position, bool _focus) |
void | _sendEventChangeScroll (size_t _position) |
virtual void | _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, WidgetPtr _parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name) |
__declspec (deprecated("use : void Widget::setCoord(const IntCoord& _coord)")) void setPosition(const IntCoord &_coord) | |
__declspec (deprecated("use : void Widget::setCoord(int _left, int _top, int _width, int _height)")) void setPosition(int _left | |
void | baseChangeWidgetSkin (ResourceSkin *_info) |
void | onMouseWheel (int _rel) |
void | onKeyLostFocus (WidgetPtr _new) |
void | onKeySetFocus (WidgetPtr _old) |
void | onKeyButtonPressed (KeyCode _key, Char _char) |
void | notifyScrollChangePosition (VScrollPtr _sender, size_t _rel) |
void | notifyMousePressed (WidgetPtr _sender, int _left, int _top, MouseButton _id) |
void | notifyMouseDoubleClick (WidgetPtr _sender) |
void | notifyMouseWheel (WidgetPtr _sender, int _rel) |
void | notifyMouseSetFocus (WidgetPtr _sender, WidgetPtr _old) |
void | notifyMouseLostFocus (WidgetPtr _sender, WidgetPtr _new) |
void | updateScroll () |
void | updateLine (bool _reset=false) |
void | _setScrollView (size_t _position) |
void | _redrawItemRange (size_t _start=0) |
void | _redrawItem (size_t _index) |
void | _selectIndex (size_t _index, bool _select) |
void | _updateState () |
Data Fields | |
EventPair < EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > | eventListSelectAccept |
EventPair < EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > | eventListChangePosition |
EventPair < EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > | eventListMouseItemActivate |
EventPair < EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > | eventListMouseItemFocus |
EventPair < EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT > | eventListChangeScroll |
int | _top |
int int | _width |
Definition at line 36 of file MyGUI_List.h.
MyGUI::List::List | ( | ) |
Definition at line 34 of file MyGUI_List.cpp.
MyGUI::List::__declspec | ( | deprecated("use : void Widget::setCoord(int _left, int _top, int _width, int _height)") | ) |
Reimplemented from MyGUI::Widget.
MyGUI::List::__declspec | ( | deprecated("use : void Widget::setCoord(const IntCoord& _coord)") | ) | const [inline] |
Reimplemented from MyGUI::Widget.
Definition at line 218 of file MyGUI_List.h.
void MyGUI::List::_checkAlign | ( | ) |
Definition at line 839 of file MyGUI_List.cpp.
void MyGUI::List::_initialise | ( | WidgetStyle | _style, | |
const IntCoord & | _coord, | |||
Align | _align, | |||
ResourceSkin * | _info, | |||
WidgetPtr | _parent, | |||
ICroppedRectangle * | _croppedParent, | |||
IWidgetCreator * | _creator, | |||
const std::string & | _name | |||
) | [virtual] |
Definition at line 47 of file MyGUI_List.cpp.
void MyGUI::List::_redrawItem | ( | size_t | _index | ) |
Definition at line 492 of file MyGUI_List.cpp.
void MyGUI::List::_redrawItemRange | ( | size_t | _start = 0 |
) |
Definition at line 445 of file MyGUI_List.cpp.
void MyGUI::List::_selectIndex | ( | size_t | _index, | |
bool | _select | |||
) |
Definition at line 631 of file MyGUI_List.cpp.
void MyGUI::List::_sendEventChangeScroll | ( | size_t | _position | ) |
Definition at line 806 of file MyGUI_List.cpp.
void MyGUI::List::_setItemFocus | ( | size_t | _position, | |
bool | _focus | |||
) |
Definition at line 762 of file MyGUI_List.cpp.
void MyGUI::List::_setScrollView | ( | size_t | _position | ) |
Definition at line 783 of file MyGUI_List.cpp.
void MyGUI::List::_updateState | ( | ) | [inline] |
Definition at line 293 of file MyGUI_List.h.
Add an item to the end of a array.
Definition at line 54 of file MyGUI_List.h.
void MyGUI::List::baseChangeWidgetSkin | ( | ResourceSkin * | _info | ) | [virtual] |
void MyGUI::List::beginToItemAt | ( | size_t | _index | ) |
Move all elements so specified becomes visible.
Definition at line 649 of file MyGUI_List.cpp.
void MyGUI::List::beginToItemFirst | ( | ) | [inline] |
Move all elements so first becomes visible.
Definition at line 118 of file MyGUI_List.h.
void MyGUI::List::beginToItemLast | ( | ) | [inline] |
Move all elements so last becomes visible.
Definition at line 121 of file MyGUI_List.h.
void MyGUI::List::beginToItemSelected | ( | ) | [inline] |
Move all elements so selected becomes visible.
Definition at line 124 of file MyGUI_List.h.
void MyGUI::List::clearIndexSelected | ( | ) | [inline] |
Clear item selection
Definition at line 80 of file MyGUI_List.h.
void MyGUI::List::clearItemDataAt | ( | size_t | _index | ) | [inline] |
Clear an item data at a specified position.
Definition at line 90 of file MyGUI_List.h.
size_t MyGUI::List::findItemIndexWith | ( | const UString & | _name | ) |
Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.
Definition at line 860 of file MyGUI_List.cpp.
size_t MyGUI::List::getIndexSelected | ( | ) | [inline] |
Get index of selected item (ITEM_NONE if none selected)
Definition at line 74 of file MyGUI_List.h.
size_t MyGUI::List::getItemCount | ( | ) | [inline] |
Get number of items.
Definition at line 48 of file MyGUI_List.h.
ValueType* MyGUI::List::getItemDataAt | ( | size_t | _index, | |
bool | _throw = true | |||
) | [inline] |
Get item data from specified position.
Definition at line 94 of file MyGUI_List.h.
const UString & MyGUI::List::getItemNameAt | ( | size_t | _index | ) |
Get item name from specified position.
Definition at line 737 of file MyGUI_List.cpp.
size_t MyGUI::List::getOptimalHeight | ( | ) |
Return optimal height to fit all items in List.
Definition at line 869 of file MyGUI_List.cpp.
Insert an item into a array at a specified position.
Definition at line 510 of file MyGUI_List.cpp.
bool MyGUI::List::isItemSelectedVisible | ( | bool | _fill = true |
) | [inline] |
Same as List::isItemVisible for selected item.
Definition at line 138 of file MyGUI_List.h.
bool MyGUI::List::isItemVisibleAt | ( | size_t | _index, | |
bool | _fill = true | |||
) |
Return true if item visible
_index | of item | |
_fill | false: function return true when whole item is visible true: function return true when at least part of item is visible |
Definition at line 669 of file MyGUI_List.cpp.
void MyGUI::List::notifyMouseDoubleClick | ( | WidgetPtr | _sender | ) |
Definition at line 291 of file MyGUI_List.cpp.
Definition at line 754 of file MyGUI_List.cpp.
void MyGUI::List::notifyMousePressed | ( | WidgetPtr | _sender, | |
int | _left, | |||
int | _top, | |||
MouseButton | _id | |||
) |
Definition at line 251 of file MyGUI_List.cpp.
Definition at line 743 of file MyGUI_List.cpp.
void MyGUI::List::notifyMouseWheel | ( | WidgetPtr | _sender, | |
int | _rel | |||
) |
Definition at line 227 of file MyGUI_List.cpp.
void MyGUI::List::notifyScrollChangePosition | ( | VScrollPtr | _sender, | |
size_t | _rel | |||
) |
Definition at line 245 of file MyGUI_List.cpp.
Reimplemented from MyGUI::WidgetEvent.
Definition at line 135 of file MyGUI_List.cpp.
void MyGUI::List::onKeyLostFocus | ( | WidgetPtr | _new | ) | [virtual] |
Reimplemented from MyGUI::WidgetEvent.
Definition at line 127 of file MyGUI_List.cpp.
void MyGUI::List::onKeySetFocus | ( | WidgetPtr | _old | ) | [virtual] |
Reimplemented from MyGUI::WidgetEvent.
Definition at line 119 of file MyGUI_List.cpp.
void MyGUI::List::onMouseWheel | ( | int | _rel | ) | [virtual] |
Reimplemented from MyGUI::WidgetEvent.
Definition at line 112 of file MyGUI_List.cpp.
void MyGUI::List::removeAllItems | ( | ) |
Remove all items.
Definition at line 697 of file MyGUI_List.cpp.
void MyGUI::List::removeItemAt | ( | size_t | _index | ) |
Remove item at a specified position.
Definition at line 561 of file MyGUI_List.cpp.
void MyGUI::List::setCoord | ( | int | _left, | |
int | _top, | |||
int | _width, | |||
int | _height | |||
) | [inline] |
See Widget::setCoord(const IntCoord& _coord)
Reimplemented from MyGUI::Widget.
Definition at line 160 of file MyGUI_List.h.
void MyGUI::List::setCoord | ( | const IntCoord & | _value | ) | [virtual] |
Set widget position and size
Reimplemented from MyGUI::Widget.
Definition at line 310 of file MyGUI_List.cpp.
void MyGUI::List::setIndexSelected | ( | size_t | _index | ) |
Select specified _index
Definition at line 621 of file MyGUI_List.cpp.
void MyGUI::List::setItemDataAt | ( | size_t | _index, | |
Any | _data | |||
) |
Replace an item data at a specified position.
Definition at line 730 of file MyGUI_List.cpp.
void MyGUI::List::setItemNameAt | ( | size_t | _index, | |
const UString & | _name | |||
) |
Replace an item name at a specified position.
Definition at line 723 of file MyGUI_List.cpp.
void MyGUI::List::setPosition | ( | int | _left, | |
int | _top | |||
) | [inline] |
See Widget::setPosition(const IntPoint& _pos)
Reimplemented from MyGUI::Widget.
Definition at line 156 of file MyGUI_List.h.
void MyGUI::List::setPosition | ( | const IntPoint & | _value | ) | [virtual] |
Set widget position (position of left top corner)
Reimplemented from MyGUI::Widget.
Definition at line 297 of file MyGUI_List.cpp.
void MyGUI::List::setProperty | ( | const std::string & | _key, | |
const std::string & | _value | |||
) | [virtual] |
void MyGUI::List::setScrollPosition | ( | size_t | _position | ) |
Set scroll position.
Definition at line 775 of file MyGUI_List.cpp.
void MyGUI::List::setScrollVisible | ( | bool | _visible | ) |
Set scroll visible when it needed.
Definition at line 768 of file MyGUI_List.cpp.
void MyGUI::List::setSize | ( | int | _width, | |
int | _height | |||
) | [inline] |
See Widget::setSize(const IntSize& _size)
Reimplemented from MyGUI::Widget.
Definition at line 158 of file MyGUI_List.h.
void MyGUI::List::setSize | ( | const IntSize & | _value | ) | [virtual] |
void MyGUI::List::swapItemsAt | ( | size_t | _index1, | |
size_t | _index2 | |||
) |
Swap items at a specified positions.
Definition at line 812 of file MyGUI_List.cpp.
void MyGUI::List::updateLine | ( | bool | _reset = false |
) |
Definition at line 340 of file MyGUI_List.cpp.
void MyGUI::List::updateScroll | ( | ) |
Definition at line 318 of file MyGUI_List.cpp.
Reimplemented from MyGUI::Widget.
Definition at line 221 of file MyGUI_List.h.
int int MyGUI::List::_width |
Reimplemented from MyGUI::Widget.
Definition at line 221 of file MyGUI_List.h.
Event : Selected item position changed.
signature : void method(MyGUI::ListPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | of new item |
Definition at line 182 of file MyGUI_List.h.
Event : Position of scroll changed.
signature : void method(MyGUI::ListPtr _sender, size_t _position)
_sender | widget that called this event | |
_position | of scroll |
Definition at line 203 of file MyGUI_List.h.
EventPair<EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT> MyGUI::List::eventListMouseItemActivate |
Event : Item was selected by mouse.
signature : void method(MyGUI::ListPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | of selected item |
Definition at line 189 of file MyGUI_List.h.
Event : Mouse is over item.
signature : void method(MyGUI::ListPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | of focused item |
Definition at line 196 of file MyGUI_List.h.
Event : Enter pressed or double click.
signature : void method(MyGUI::ListPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | of selected item |
Definition at line 175 of file MyGUI_List.h.