MyGUI
3.2.0
|
#include <MyGUI_MultiListBox.h>
Data Structures | |
struct | ColumnInfo |
Public Types | |
typedef RTTIBase | Base |
typedef MultiListBox | 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 |
MultiListBox () | |
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 | getColumnCount () const |
Get number of columns. | |
void | insertColumnAt (size_t _column, const UString &_name, int _width=0, Any _data=Any::Null) |
void | addColumn (const UString &_name, int _width=0, Any _data=Any::Null) |
void | removeColumnAt (size_t _column) |
void | removeAllColumns () |
void | swapColumnsAt (size_t _index1, size_t _index2) |
Swap columns at a specified positions. | |
void | setColumnNameAt (size_t _column, const UString &_name) |
void | setColumnName (MultiListItem *_item, const UString &_name) |
void | setColumnWidthAt (size_t _column, int _width) |
void | setColumnWidth (MultiListItem *_item, int _width) |
const UString & | getColumnNameAt (size_t _column) |
const UString & | getColumnName (MultiListItem *_item) |
int | getColumnWidthAt (size_t _column) |
void | sortByColumn (size_t _column, bool _backward=false) |
size_t | getColumnIndex (MultiListItem *_item) |
Get column index. | |
void | setColumnResizingPolicy (MultiListItem *_item, ResizingPolicy _value) |
void | setColumnResizingPolicyAt (size_t _index, ResizingPolicy _value) |
void | setColumnDataAt (size_t _index, Any _data) |
Replace an item data at a specified position. | |
void | clearColumnDataAt (size_t _index) |
Clear an item data at a specified position. | |
template<typename ValueType > | |
ValueType * | getColumnDataAt (size_t _index, bool _throw=true) |
Get item data from specified position. | |
size_t | getItemCount () const |
void | insertItemAt (size_t _index, const UString &_name, Any _data=Any::Null) |
void | addItem (const UString &_name, Any _data=Any::Null) |
void | removeItemAt (size_t _index) |
Remove item at a specified position. | |
void | removeAllItems () |
void | swapItemsAt (size_t _index1, size_t _index2) |
Swap items at a specified positions. | |
void | setItemNameAt (size_t _index, const UString &_name) |
Replace an item name. | |
const UString & | getItemNameAt (size_t _index) |
Get item name from specified position. | |
size_t | getIndexSelected () const |
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 | setSubItemNameAt (size_t _column, size_t _index, const UString &_name) |
const UString & | getSubItemNameAt (size_t _column, size_t _index) |
size_t | findSubItemWith (size_t _column, const UString &_name) |
void | setSubItemDataAt (size_t _column, size_t _index, Any _data) |
Replace an item data at a specified position. | |
void | clearSubItemDataAt (size_t _column, size_t _index) |
Clear an item data at a specified position. | |
template<typename ValueType > | |
ValueType * | getSubItemDataAt (size_t _column, size_t _index, bool _throw=true) |
Get item data from specified position. | |
virtual size_t | _getItemCount () |
virtual void | _addItem (const MyGUI::UString &_name) |
virtual void | _removeItemAt (size_t _index) |
virtual Widget * | _getItemAt (size_t _index) |
virtual void | _setItemNameAt (size_t _index, const UString &_name) |
virtual const UString & | _getItemNameAt (size_t _index) |
Static Public Member Functions | |
static const std::string & | getClassTypeName () |
Data Fields | |
EventPair < EventHandle_WidgetSizeT, EventHandle_MultiListPtrSizeT > | eventListSelectAccept |
EventPair < EventHandle_WidgetSizeT, EventHandle_MultiListPtrSizeT > | eventListChangePosition |
EventHandle_MultiListPtrSizeTCUTFStringRefCUTFStringRefBoolRef | requestOperatorLess |
Protected Member Functions | |
virtual void | initialiseOverride () |
virtual void | shutdownOverride () |
virtual void | onWidgetCreated (Widget *_widget) |
virtual void | onWidgetDestroy (Widget *_widget) |
Definition at line 44 of file MyGUI_MultiListBox.h.
typedef RTTIBase MyGUI::MultiListBox::Base |
Reimplemented from MyGUI::Widget.
Definition at line 50 of file MyGUI_MultiListBox.h.
Reimplemented from MyGUI::Widget.
Definition at line 50 of file MyGUI_MultiListBox.h.
Definition at line 35 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::_addItem | ( | const MyGUI::UString & | _name | ) | [virtual] |
Reimplemented from MyGUI::IItemContainer.
Definition at line 589 of file MyGUI_MultiListBox.cpp.
Widget * MyGUI::MultiListBox::_getItemAt | ( | size_t | _index | ) | [virtual] |
Reimplemented from MyGUI::IItemContainer.
Definition at line 772 of file MyGUI_MultiListBox.cpp.
size_t MyGUI::MultiListBox::_getItemCount | ( | ) | [virtual] |
Reimplemented from MyGUI::IItemContainer.
Definition at line 584 of file MyGUI_MultiListBox.cpp.
const UString & MyGUI::MultiListBox::_getItemNameAt | ( | size_t | _index | ) | [virtual] |
Reimplemented from MyGUI::IItemContainer.
Definition at line 605 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::_removeItemAt | ( | size_t | _index | ) | [virtual] |
Reimplemented from MyGUI::IItemContainer.
Definition at line 595 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::_setItemNameAt | ( | size_t | _index, |
const UString & | _name | ||
) | [virtual] |
Reimplemented from MyGUI::IItemContainer.
Definition at line 600 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::addColumn | ( | const UString & | _name, |
int | _width = 0 , |
||
Any | _data = Any::Null |
||
) |
Add new column at last position
_width | Width of new column |
_name | Name of new column |
_data | Any data associated with new column |
Definition at line 528 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::addItem | ( | const UString & | _name, |
Any | _data = Any::Null |
||
) |
Add new item at the end
Definition at line 538 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::clearColumnDataAt | ( | size_t | _index | ) |
Clear an item data at a specified position.
Definition at line 533 of file MyGUI_MultiListBox.cpp.
Clear item selection
Definition at line 558 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::clearItemDataAt | ( | size_t | _index | ) |
Clear an item data at a specified position.
Definition at line 568 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::clearSubItemDataAt | ( | size_t | _column, |
size_t | _index | ||
) |
Clear an item data at a specified position.
Definition at line 573 of file MyGUI_MultiListBox.cpp.
size_t MyGUI::MultiListBox::findSubItemWith | ( | size_t | _column, |
const UString & | _name | ||
) |
Search item in specified _column, returns index of the first occurrence in column or ITEM_NONE if item not found
Definition at line 225 of file MyGUI_MultiListBox.cpp.
static const std::string& MyGUI::MultiListBox::getClassTypeName | ( | ) | [inline, static] |
Reimplemented from MyGUI::Widget.
Definition at line 50 of file MyGUI_MultiListBox.h.
size_t MyGUI::MultiListBox::getColumnCount | ( | ) | const |
Get number of columns.
Definition at line 523 of file MyGUI_MultiListBox.cpp.
ValueType* MyGUI::MultiListBox::getColumnDataAt | ( | size_t | _index, |
bool | _throw = true |
||
) | [inline] |
Get item data from specified position.
Definition at line 165 of file MyGUI_MultiListBox.h.
size_t MyGUI::MultiListBox::getColumnIndex | ( | MultiListItem * | _item | ) |
Get column index.
Definition at line 788 of file MyGUI_MultiListBox.cpp.
const UString & MyGUI::MultiListBox::getColumnName | ( | MultiListItem * | _item | ) |
Get _column name
Definition at line 783 of file MyGUI_MultiListBox.cpp.
const UString & MyGUI::MultiListBox::getColumnNameAt | ( | size_t | _column | ) |
Get _column name
Definition at line 118 of file MyGUI_MultiListBox.cpp.
int MyGUI::MultiListBox::getColumnWidthAt | ( | size_t | _column | ) |
Get _column width
Definition at line 124 of file MyGUI_MultiListBox.cpp.
size_t MyGUI::MultiListBox::getIndexSelected | ( | ) | const |
Get index of selected item (ITEM_NONE if none selected)
Definition at line 553 of file MyGUI_MultiListBox.cpp.
size_t MyGUI::MultiListBox::getItemCount | ( | ) | const |
Definition at line 157 of file MyGUI_MultiListBox.cpp.
ValueType* MyGUI::MultiListBox::getItemDataAt | ( | size_t | _index, |
bool | _throw = true |
||
) | [inline] |
Get item data from specified position.
Definition at line 234 of file MyGUI_MultiListBox.h.
const UString & MyGUI::MultiListBox::getItemNameAt | ( | size_t | _index | ) |
Get item name from specified position.
Definition at line 548 of file MyGUI_MultiListBox.cpp.
ValueType* MyGUI::MultiListBox::getSubItemDataAt | ( | size_t | _column, |
size_t | _index, | ||
bool | _throw = true |
||
) | [inline] |
Get item data from specified position.
Definition at line 269 of file MyGUI_MultiListBox.h.
const UString & MyGUI::MultiListBox::getSubItemNameAt | ( | size_t | _column, |
size_t | _index | ||
) |
Get sub item name
Definition at line 217 of file MyGUI_MultiListBox.cpp.
virtual const std::string& MyGUI::MultiListBox::getTypeName | ( | ) | const [inline, virtual] |
Get type name as string
Reimplemented from MyGUI::Widget.
Definition at line 50 of file MyGUI_MultiListBox.h.
void MyGUI::MultiListBox::initialiseOverride | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 51 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::insertColumnAt | ( | size_t | _column, |
const UString & | _name, | ||
int | _width = 0 , |
||
Any | _data = Any::Null |
||
) |
Insert new column
_column | New column will be inserted before _column |
_name | Name of new column |
_width | Width of new column |
_data | Any data associated with new column |
Definition at line 610 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::insertItemAt | ( | size_t | _index, |
const UString & | _name, | ||
Any | _data = Any::Null |
||
) |
Insert new item before _index line
Definition at line 445 of file MyGUI_MultiListBox.cpp.
bool MyGUI::MultiListBox::isType | ( | ) | const [inline] |
Compare with selected type
Reimplemented from MyGUI::Widget.
Definition at line 50 of file MyGUI_MultiListBox.h.
virtual bool MyGUI::MultiListBox::isType | ( | const std::type_info & | _type | ) | const [inline, virtual] |
Compare with selected type
Reimplemented from MyGUI::Widget.
Definition at line 50 of file MyGUI_MultiListBox.h.
void MyGUI::MultiListBox::onWidgetCreated | ( | Widget * | _widget | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 668 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::onWidgetDestroy | ( | Widget * | _widget | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 679 of file MyGUI_MultiListBox.cpp.
Delete all columns
Definition at line 130 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::removeAllItems | ( | ) |
Delete all items
Reimplemented from MyGUI::BiIndexBase.
Definition at line 164 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::removeColumnAt | ( | size_t | _column | ) |
Delete column
Definition at line 636 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::removeItemAt | ( | size_t | _index | ) |
Remove item at a specified position.
Reimplemented from MyGUI::BiIndexBase.
Definition at line 470 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setColumnDataAt | ( | size_t | _index, |
Any | _data | ||
) |
Replace an item data at a specified position.
Definition at line 509 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setColumnName | ( | MultiListItem * | _item, |
const UString & | _name | ||
) |
Set column name
_item | column |
_name | New name of column |
Definition at line 778 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setColumnNameAt | ( | size_t | _column, |
const UString & | _name | ||
) |
Set column name
_column | Index of column |
_name | New name of column |
Definition at line 102 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setColumnResizingPolicy | ( | MultiListItem * | _item, |
ResizingPolicy | _value | ||
) |
Set resizing policy of column.
_item | Pointer to column |
_value | New resizing policy for column |
Definition at line 799 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setColumnResizingPolicyAt | ( | size_t | _index, |
ResizingPolicy | _value | ||
) |
Set resizing policy of column.
_index | Index of column |
_value | New resizing policy for column |
Definition at line 804 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setColumnWidth | ( | MultiListItem * | _item, |
int | _width | ||
) |
Set column width
_item | column |
_width | New width of column |
Definition at line 811 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setColumnWidthAt | ( | size_t | _column, |
int | _width | ||
) |
Set column width
_column | Index of column |
_width | New width of column |
Definition at line 111 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setCoord | ( | const IntCoord & | _value | ) | [virtual] |
Set widget position and size
Reimplemented from MyGUI::Widget.
Definition at line 829 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setCoord | ( | int | _left, |
int | _top, | ||
int | _width, | ||
int | _height | ||
) |
See Widget::setCoord(const IntCoord& _coord)
Reimplemented from MyGUI::Widget.
Definition at line 847 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setIndexSelected | ( | size_t | _index | ) |
Select specified _index
Definition at line 193 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setItemDataAt | ( | size_t | _index, |
Any | _data | ||
) |
Replace an item data at a specified position.
Definition at line 563 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setItemNameAt | ( | size_t | _index, |
const UString & | _name | ||
) |
Replace an item name.
Definition at line 543 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setPosition | ( | const IntPoint & | _value | ) | [virtual] |
Set widget position (position of left top corner)
Reimplemented from MyGUI::Widget.
Definition at line 816 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setPosition | ( | int | _left, |
int | _top | ||
) |
See Widget::setPosition(const IntPoint& _pos)
Reimplemented from MyGUI::Widget.
Definition at line 837 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setSize | ( | const IntSize & | _value | ) | [virtual] |
Set widget size
Reimplemented from MyGUI::Widget.
Definition at line 821 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setSize | ( | int | _width, |
int | _height | ||
) |
See Widget::setSize(const IntSize& _size)
Reimplemented from MyGUI::Widget.
Definition at line 842 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setSubItemDataAt | ( | size_t | _column, |
size_t | _index, | ||
Any | _data | ||
) |
Replace an item data at a specified position.
Definition at line 515 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::setSubItemNameAt | ( | size_t | _column, |
size_t | _index, | ||
const UString & | _name | ||
) |
Set sub item
_column | Index of column |
_index | Index of line |
_name | New sub item value |
Definition at line 205 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::shutdownOverride | ( | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 95 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::sortByColumn | ( | size_t | _column, |
bool | _backward = false |
||
) |
Sort multilist by column
Definition at line 136 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::swapColumnsAt | ( | size_t | _index1, |
size_t | _index2 | ||
) |
Swap columns at a specified positions.
Definition at line 645 of file MyGUI_MultiListBox.cpp.
void MyGUI::MultiListBox::swapItemsAt | ( | size_t | _index1, |
size_t | _index2 | ||
) |
Swap items at a specified positions.
Definition at line 496 of file MyGUI_MultiListBox.cpp.
EventPair<EventHandle_WidgetSizeT, EventHandle_MultiListPtrSizeT> MyGUI::MultiListBox::eventListChangePosition |
Event : Selected item position changed.
signature : void method(MyGUI::MultiListBox* _sender, size_t _index)
_sender | widget that called this event |
_index | of new item |
Definition at line 292 of file MyGUI_MultiListBox.h.
EventPair<EventHandle_WidgetSizeT, EventHandle_MultiListPtrSizeT> MyGUI::MultiListBox::eventListSelectAccept |
Event : Enter pressed or double click.
signature : void method(MyGUI::MultiListBox* _sender, size_t _index)
_sender | widget that called this event |
_index | of selected item |
Definition at line 284 of file MyGUI_MultiListBox.h.
EventHandle_MultiListPtrSizeTCUTFStringRefCUTFStringRefBoolRef MyGUI::MultiListBox::requestOperatorLess |
Event : Less than operator for sort multilist by columns.
signature : void method(MyGUI::MultiListBox* _sender, size_t _column, const UString& _firstItem, const UString& _secondItem, bool& _less)
_sender | widget that called this event |
_column | Index of column |
_firstItem | Strings for compare |
_secondItem | Strings for compare |
_less | Comparsion result (write your value here) |
Definition at line 303 of file MyGUI_MultiListBox.h.