MyGUI::ListBox Class Reference

#include <MyGUI_ListBox.h>

Inheritance diagram for MyGUI::ListBox:

Inheritance graph
[legend]

Public Types

typedef RTTIBase Base
typedef ListBox 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
 ListBox ()
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.
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 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.
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 ()

Protected Member Functions

virtual ~ListBox ()
void baseChangeWidgetSkin (ResourceSkin *_info)

Detailed Description

Definition at line 32 of file MyGUI_ListBox.h.


Member Typedef Documentation

Reimplemented from MyGUI::ListCtrl.

Definition at line 35 of file MyGUI_ListBox.h.

Reimplemented from MyGUI::ListCtrl.

Definition at line 35 of file MyGUI_ListBox.h.


Constructor & Destructor Documentation

MyGUI::ListBox::ListBox (  ) 

Definition at line 30 of file MyGUI_ListBox.cpp.

MyGUI::ListBox::~ListBox (  )  [protected, virtual]

Definition at line 44 of file MyGUI_ListBox.cpp.


Member Function Documentation

void MyGUI::ListBox::_initialise ( WidgetStyle  _style,
const IntCoord _coord,
Align  _align,
ResourceSkin _info,
Widget _parent,
ICroppedRectangle _croppedParent,
IWidgetCreator _creator,
const std::string &  _name 
) [virtual]

Reimplemented from MyGUI::ListCtrl.

Definition at line 37 of file MyGUI_ListBox.cpp.

void MyGUI::ListBox::addItem ( const UString _name,
Any  _data = Any::Null 
) [inline]

Add an item to the end of a array.

Definition at line 50 of file MyGUI_ListBox.h.

void MyGUI::ListBox::baseChangeWidgetSkin ( ResourceSkin _info  )  [protected, virtual]

Reimplemented from MyGUI::ListCtrl.

Definition at line 49 of file MyGUI_ListBox.cpp.

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

Move all elements so specified becomes visible.

Definition at line 167 of file MyGUI_ListBox.cpp.

void MyGUI::ListBox::beginToItemFirst (  )  [inline]

Move all elements so first becomes visible.

Definition at line 112 of file MyGUI_ListBox.h.

void MyGUI::ListBox::beginToItemLast (  )  [inline]

Move all elements so last becomes visible.

Definition at line 115 of file MyGUI_ListBox.h.

void MyGUI::ListBox::beginToItemSelected (  )  [inline]

Move all elements so selected becomes visible.

Definition at line 118 of file MyGUI_ListBox.h.

void MyGUI::ListBox::clearIndexSelected (  )  [inline]

Clear item selection

Reimplemented from MyGUI::ListCtrl.

Definition at line 75 of file MyGUI_ListBox.h.

void MyGUI::ListBox::clearItemDataAt ( size_t  _index  )  [inline]

Clear an item data at a specified position.

Reimplemented from MyGUI::ListCtrl.

Definition at line 85 of file MyGUI_ListBox.h.

size_t MyGUI::ListBox::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 144 of file MyGUI_ListBox.cpp.

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

Reimplemented from MyGUI::ListCtrl.

Definition at line 35 of file MyGUI_ListBox.h.

size_t MyGUI::ListBox::getIndexSelected (  )  [inline]

Get index of selected item (ITEM_NONE if none selected)

Reimplemented from MyGUI::ListCtrl.

Definition at line 69 of file MyGUI_ListBox.h.

size_t MyGUI::ListBox::getItemCount (  )  const [inline]

Get number of items.

Reimplemented from MyGUI::ListCtrl.

Definition at line 44 of file MyGUI_ListBox.h.

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

Get item data from specified position.

Reimplemented from MyGUI::ListCtrl.

Definition at line 89 of file MyGUI_ListBox.h.

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

Get item name from specified position.

Definition at line 160 of file MyGUI_ListBox.cpp.

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

Get type name as string

Reimplemented from MyGUI::ListCtrl.

Definition at line 35 of file MyGUI_ListBox.h.

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

Insert an item into a array at a specified position.

Definition at line 106 of file MyGUI_ListBox.cpp.

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

Compare with selected type

Reimplemented from MyGUI::ListCtrl.

Definition at line 35 of file MyGUI_ListBox.h.

virtual bool MyGUI::ListBox::isType ( const std::type_info &  _type  )  const [inline, virtual]

Compare with selected type

Reimplemented from MyGUI::ListCtrl.

Definition at line 35 of file MyGUI_ListBox.h.

void MyGUI::ListBox::removeAllItems (  ) 

Remove all items.

Reimplemented from MyGUI::ListCtrl.

Definition at line 124 of file MyGUI_ListBox.cpp.

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

Remove item at a specified position.

Reimplemented from MyGUI::ListCtrl.

Definition at line 116 of file MyGUI_ListBox.cpp.

void MyGUI::ListBox::setIndexSelected ( size_t  _index  )  [inline]

Select specified _index

Reimplemented from MyGUI::ListCtrl.

Definition at line 72 of file MyGUI_ListBox.h.

void MyGUI::ListBox::setItemDataAt ( size_t  _index,
Any  _data 
) [inline]

Replace an item data at a specified position.

Reimplemented from MyGUI::ListCtrl.

Definition at line 82 of file MyGUI_ListBox.h.

void MyGUI::ListBox::setItemNameAt ( size_t  _index,
const UString _name 
)

Replace an item name at a specified position.

Definition at line 153 of file MyGUI_ListBox.cpp.

void MyGUI::ListBox::swapItemsAt ( size_t  _index1,
size_t  _index2 
)

Swap items at a specified positions.

Definition at line 131 of file MyGUI_ListBox.cpp.


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

Generated on Thu Dec 9 14:48:14 2010 for MyGUI by  doxygen 1.5.9