MyGUI  3.2.0
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions
MyGUI::ComboBox Class Reference

#include <MyGUI_ComboBox.h>

+ Inheritance diagram for MyGUI::ComboBox:

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 () const
 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 () 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 setItemNameAt (size_t _index, const UString &_name)
 Replace an item name at a specified position.
const UStringgetItemNameAt (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 () const
 Get drop list mode flag.
void setSmoothShow (bool _value)
 Set smooth show of list.
bool getSmoothShow () const
 Get smooth show of list flag.
void setMaxListLength (int _value)
 Get max list length.
int getMaxListLength () const
 Set max list length.
void setFlowDirection (FlowDirection _value)
 Set direction, where drop down list appears (TopToBottom by default).
FlowDirection getFlowDirection () const
 Get direction, where drop down list appears.
virtual size_t _getItemCount ()
virtual void _addItem (const MyGUI::UString &_name)
virtual void _removeItemAt (size_t _index)
virtual void _setItemNameAt (size_t _index, const UString &_name)
virtual const UString_getItemNameAt (size_t _index)
virtual void _resetContainer (bool _update)

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 void initialiseOverride ()
virtual void shutdownOverride ()
virtual void onKeyButtonPressed (KeyCode _key, Char _char)
virtual void setPropertyOverride (const std::string &_key, const std::string &_value)

Detailed Description

Definition at line 40 of file MyGUI_ComboBox.h.


Member Typedef Documentation

Reimplemented from MyGUI::EditBox.

Definition at line 45 of file MyGUI_ComboBox.h.

Reimplemented from MyGUI::EditBox.

Definition at line 45 of file MyGUI_ComboBox.h.


Constructor & Destructor Documentation

Definition at line 40 of file MyGUI_ComboBox.cpp.


Member Function Documentation

void MyGUI::ComboBox::_addItem ( const MyGUI::UString _name) [virtual]

Reimplemented from MyGUI::IItemContainer.

Definition at line 565 of file MyGUI_ComboBox.cpp.

size_t MyGUI::ComboBox::_getItemCount ( ) [virtual]

Reimplemented from MyGUI::IItemContainer.

Definition at line 560 of file MyGUI_ComboBox.cpp.

const UString & MyGUI::ComboBox::_getItemNameAt ( size_t  _index) [virtual]

Reimplemented from MyGUI::IItemContainer.

Definition at line 580 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::_removeItemAt ( size_t  _index) [virtual]

Reimplemented from MyGUI::IItemContainer.

Definition at line 570 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::_resetContainer ( bool  _update) [virtual]

Reimplemented from MyGUI::Widget.

Definition at line 585 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::_setItemNameAt ( size_t  _index,
const UString _name 
) [virtual]

Reimplemented from MyGUI::IItemContainer.

Definition at line 575 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::addItem ( const UString _name,
Any  _data = Any::Null 
)

Add an item to the end of a array.

Definition at line 476 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::beginToItemAt ( size_t  _index)

Move all elements so specified becomes visible.

Definition at line 501 of file MyGUI_ComboBox.cpp.

Move all elements so first becomes visible.

Definition at line 506 of file MyGUI_ComboBox.cpp.

Move all elements so last becomes visible.

Definition at line 512 of file MyGUI_ComboBox.cpp.

Move all elements so selected becomes visible.

Definition at line 518 of file MyGUI_ComboBox.cpp.

Clear item selection.

Definition at line 486 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::clearItemDataAt ( size_t  _index)

Clear an item data at a specified position.

Definition at line 491 of file MyGUI_ComboBox.cpp.

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 389 of file MyGUI_ComboBox.cpp.

static const std::string& MyGUI::ComboBox::getClassTypeName ( ) [inline, static]

Reimplemented from MyGUI::EditBox.

Definition at line 45 of file MyGUI_ComboBox.h.

Get drop list mode flag.

Definition at line 524 of file MyGUI_ComboBox.cpp.

Get direction, where drop down list appears.

Definition at line 549 of file MyGUI_ComboBox.cpp.

Get index of selected item (ITEM_NONE if none selected)

Definition at line 481 of file MyGUI_ComboBox.cpp.

Get number of items.

Definition at line 471 of file MyGUI_ComboBox.cpp.

template<typename ValueType >
ValueType* MyGUI::ComboBox::getItemDataAt ( size_t  _index,
bool  _throw = true 
) [inline]

Get item data from specified position.

Definition at line 97 of file MyGUI_ComboBox.h.

const UString & MyGUI::ComboBox::getItemNameAt ( size_t  _index)

Get item name from specified position.

Definition at line 496 of file MyGUI_ComboBox.cpp.

Set max list length.

Definition at line 544 of file MyGUI_ComboBox.cpp.

Get smooth show of list flag.

Definition at line 534 of file MyGUI_ComboBox.cpp.

virtual const std::string& MyGUI::ComboBox::getTypeName ( ) const [inline, virtual]

Get type name as string

Reimplemented from MyGUI::EditBox.

Definition at line 45 of file MyGUI_ComboBox.h.

void MyGUI::ComboBox::initialiseOverride ( ) [protected, virtual]

Reimplemented from MyGUI::EditBox.

Definition at line 53 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::insertItemAt ( size_t  _index,
const UString _name,
Any  _data = Any::Null 
)

Insert an item into a array at a specified position.

Definition at line 351 of file MyGUI_ComboBox.cpp.

template<typename Type >
bool MyGUI::ComboBox::isType ( ) const [inline]

Compare with selected type

Reimplemented from MyGUI::EditBox.

Definition at line 45 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::EditBox.

Definition at line 45 of file MyGUI_ComboBox.h.

void MyGUI::ComboBox::onKeyButtonPressed ( KeyCode  _key,
Char  _char 
) [protected, virtual]

Reimplemented from MyGUI::EditBox.

Definition at line 166 of file MyGUI_ComboBox.cpp.

Remove all items.

Definition at line 365 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::removeItemAt ( size_t  _index)

Remove item at a specified position.

Definition at line 358 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::setComboModeDrop ( bool  _value)

Set drop list mode (text can not be edited)

Definition at line 371 of file MyGUI_ComboBox.cpp.

Set direction, where drop down list appears (TopToBottom by default).

Definition at line 394 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::setIndexSelected ( size_t  _index)

Select specified _index.

Definition at line 323 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::setItemDataAt ( size_t  _index,
Any  _data 
)

Replace an item data at a specified position.

Definition at line 344 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 337 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::setMaxListLength ( int  _value)

Get max list length.

Definition at line 539 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::setPropertyOverride ( const std::string &  _key,
const std::string &  _value 
) [protected, virtual]

Reimplemented from MyGUI::EditBox.

Definition at line 451 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::setSmoothShow ( bool  _value)

Set smooth show of list.

Definition at line 529 of file MyGUI_ComboBox.cpp.

void MyGUI::ComboBox::shutdownOverride ( ) [protected, virtual]

Reimplemented from MyGUI::EditBox.

Definition at line 99 of file MyGUI_ComboBox.cpp.


Field Documentation

Event : Enter pressed in combo mode or item selected in drop down list and combo mode drop enabled (see void ComboBox::setComboModeDrop(bool _value)).
signature : void method(MyGUI::ComboBox* _sender, size_t _index)

Parameters:
_senderwidget that called this event
_indexitem

Definition at line 161 of file MyGUI_ComboBox.h.

Event : Position changed.
signature : void method(MyGUI::ComboBox* _sender, size_t _index)

Parameters:
_senderwidget that called this event
_indexof new position

Definition at line 169 of file MyGUI_ComboBox.h.


The documentation for this class was generated from the following files: