#include <MyGUI_ComboBox.h>
Public Types | |
typedef RTTIBase | Base |
typedef ComboBox | 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 |
ComboBox () | |
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. | |
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 () |
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 | 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. | |
void | setComboModeDrop (bool _value) |
Set drop list mode (text can not be edited). | |
bool | getComboModeDrop () |
Get drop list mode flag. | |
void | setSmoothShow (bool _value) |
Set smooth show of list. | |
bool | getSmoothShow () |
Get smooth show of list flag. | |
void | setMaxListHeight (size_t _value) |
Get max list height. | |
size_t | getMaxListHeight () |
Set max list height. | |
virtual void | setProperty (const std::string &_key, const std::string &_value) |
virtual void | _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, WidgetPtr _parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name) |
size_t | getItemIndexSelected () |
void | setItemSelectedAt (size_t _index) |
void | clearItemSelected () |
void | insertItem (size_t _index, const UString &_name) |
void | setItem (size_t _index, const UString &_item) |
const UString & | getItem (size_t _index) |
void | deleteItem (size_t _index) |
void | deleteAllItems () |
size_t | getItemSelect () |
void | resetItemSelect () |
void | setItemSelect (size_t _index) |
Static Public Member Functions | |
static const std::string & | getClassTypeName () |
Data Fields | |
EventPair < EventHandle_WidgetVoid, EventHandle_ComboBoxPtrSizeT > | eventComboAccept |
EventPair < EventHandle_WidgetSizeT, EventHandle_ComboBoxPtrSizeT > | eventComboChangePosition |
Protected Member Functions | |
virtual | ~ComboBox () |
virtual void | onKeyButtonPressed (KeyCode _key, Char _char) |
virtual void | baseChangeWidgetSkin (ResourceSkin *_info) |
Definition at line 38 of file MyGUI_ComboBox.h.
typedef RTTIBase MyGUI::ComboBox::Base |
Reimplemented from MyGUI::Edit.
Definition at line 41 of file MyGUI_ComboBox.h.
typedef ComboBox MyGUI::ComboBox::RTTIBase |
Reimplemented from MyGUI::Edit.
Definition at line 41 of file MyGUI_ComboBox.h.
MyGUI::ComboBox::ComboBox | ( | ) |
Definition at line 41 of file MyGUI_ComboBox.cpp.
MyGUI::ComboBox::~ComboBox | ( | ) | [protected, virtual] |
Definition at line 60 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::_initialise | ( | WidgetStyle | _style, | |
const IntCoord & | _coord, | |||
Align | _align, | |||
ResourceSkin * | _info, | |||
WidgetPtr | _parent, | |||
ICroppedRectangle * | _croppedParent, | |||
IWidgetCreator * | _creator, | |||
const std::string & | _name | |||
) | [virtual] |
Reimplemented from MyGUI::Edit.
Definition at line 53 of file MyGUI_ComboBox.cpp.
Add an item to the end of a array.
Definition at line 56 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::baseChangeWidgetSkin | ( | ResourceSkin * | _info | ) | [protected, virtual] |
Reimplemented from MyGUI::Edit.
Definition at line 65 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::beginToItemAt | ( | size_t | _index | ) | [inline] |
Move all elements so specified becomes visible.
Definition at line 113 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::beginToItemFirst | ( | ) | [inline] |
Move all elements so first becomes visible.
Definition at line 116 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::beginToItemLast | ( | ) | [inline] |
Move all elements so last becomes visible.
Definition at line 119 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::beginToItemSelected | ( | ) | [inline] |
Move all elements so selected becomes visible.
Definition at line 122 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::clearIndexSelected | ( | ) | [inline] |
Clear item selection.
Definition at line 79 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::clearItemDataAt | ( | size_t | _index | ) | [inline] |
Clear an item data at a specified position.
Definition at line 89 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::clearItemSelected | ( | ) | [inline] |
Definition at line 173 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::deleteAllItems | ( | ) | [inline] |
Definition at line 184 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::deleteItem | ( | size_t | _index | ) | [inline] |
Definition at line 182 of file MyGUI_ComboBox.h.
size_t MyGUI::ComboBox::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 417 of file MyGUI_ComboBox.cpp.
static const std::string& MyGUI::ComboBox::getClassTypeName | ( | ) | [inline, static] |
Reimplemented from MyGUI::Edit.
Definition at line 41 of file MyGUI_ComboBox.h.
bool MyGUI::ComboBox::getComboModeDrop | ( | ) | [inline] |
Get drop list mode flag.
Definition at line 131 of file MyGUI_ComboBox.h.
size_t MyGUI::ComboBox::getIndexSelected | ( | ) | [inline] |
Get index of selected item (ITEM_NONE if none selected).
Definition at line 73 of file MyGUI_ComboBox.h.
const UString& MyGUI::ComboBox::getItem | ( | size_t | _index | ) | [inline] |
Definition at line 180 of file MyGUI_ComboBox.h.
size_t MyGUI::ComboBox::getItemCount | ( | ) | [inline] |
Get number of items.
Definition at line 50 of file MyGUI_ComboBox.h.
ValueType* MyGUI::ComboBox::getItemDataAt | ( | size_t | _index, | |
bool | _throw = true | |||
) | [inline] |
Get item data from specified position.
Definition at line 93 of file MyGUI_ComboBox.h.
size_t MyGUI::ComboBox::getItemIndexSelected | ( | ) | [inline] |
Definition at line 169 of file MyGUI_ComboBox.h.
const UString& MyGUI::ComboBox::getItemNameAt | ( | size_t | _index | ) | [inline] |
Get item name from specified position.
Definition at line 106 of file MyGUI_ComboBox.h.
size_t MyGUI::ComboBox::getItemSelect | ( | ) | [inline] |
Definition at line 186 of file MyGUI_ComboBox.h.
size_t MyGUI::ComboBox::getMaxListHeight | ( | ) | [inline] |
Set max list height.
Definition at line 141 of file MyGUI_ComboBox.h.
bool MyGUI::ComboBox::getSmoothShow | ( | ) | [inline] |
Get smooth show of list flag.
Definition at line 136 of file MyGUI_ComboBox.h.
virtual const std::string& MyGUI::ComboBox::getTypeName | ( | ) | const [inline, virtual] |
Get type name as string
Reimplemented from MyGUI::Edit.
Definition at line 41 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::insertItem | ( | size_t | _index, | |
const UString & | _name | |||
) | [inline] |
Definition at line 176 of file MyGUI_ComboBox.h.
Insert an item into a array at a specified position.
Definition at line 379 of file MyGUI_ComboBox.cpp.
bool MyGUI::ComboBox::isType | ( | ) | const [inline] |
Compare with selected type
Reimplemented from MyGUI::Edit.
Definition at line 41 of file MyGUI_ComboBox.h.
virtual bool MyGUI::ComboBox::isType | ( | const std::type_info & | _type | ) | const [inline, virtual] |
Compare with selected type
Reimplemented from MyGUI::Edit.
Definition at line 41 of file MyGUI_ComboBox.h.
Reimplemented from MyGUI::Edit.
Definition at line 198 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::removeAllItems | ( | ) |
Remove all items.
Definition at line 393 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::removeItemAt | ( | size_t | _index | ) |
Remove item at a specified position.
Definition at line 386 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::resetItemSelect | ( | ) | [inline] |
Definition at line 188 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::setComboModeDrop | ( | bool | _value | ) |
Set drop list mode (text can not be edited).
Definition at line 399 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::setIndexSelected | ( | size_t | _index | ) |
Select specified _index.
Definition at line 351 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::setItem | ( | size_t | _index, | |
const UString & | _item | |||
) | [inline] |
Definition at line 178 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::setItemDataAt | ( | size_t | _index, | |
Any | _data | |||
) |
Replace an item data at a specified position.
Definition at line 372 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::setItemNameAt | ( | size_t | _index, | |
const UString & | _name | |||
) |
Replace an item name at a specified position.
Definition at line 365 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::setItemSelect | ( | size_t | _index | ) | [inline] |
Definition at line 190 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::setItemSelectedAt | ( | size_t | _index | ) | [inline] |
Definition at line 171 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::setMaxListHeight | ( | size_t | _value | ) | [inline] |
Get max list height.
Definition at line 139 of file MyGUI_ComboBox.h.
void MyGUI::ComboBox::setProperty | ( | const std::string & | _key, | |
const std::string & | _value | |||
) | [virtual] |
Reimplemented from MyGUI::Edit.
Definition at line 422 of file MyGUI_ComboBox.cpp.
void MyGUI::ComboBox::setSmoothShow | ( | bool | _value | ) | [inline] |
Set smooth show of list.
Definition at line 134 of file MyGUI_ComboBox.h.
Event : Enter pressed in combo mode or item selected in drop.
signature : void method(MyGUI::ComboBoxPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | item |
Definition at line 152 of file MyGUI_ComboBox.h.
EventPair<EventHandle_WidgetSizeT, EventHandle_ComboBoxPtrSizeT> MyGUI::ComboBox::eventComboChangePosition |
Event : Position changed.
signature : void method(MyGUI::ComboBoxPtr _sender, size_t _index)
_sender | widget that called this event | |
_index | of new position |
Definition at line 159 of file MyGUI_ComboBox.h.