Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# irr::gui::IGUIComboBox Class Reference

Combobox widget. More...

`#include <IGUIComboBox.h>`

Inheritance diagram for irr::gui::IGUIComboBox:

List of all members.

## Public Member Functions

virtual u32 | addItem (const wchar_t *text, u32 data=0)=0
| Adds an item and returns the index of it.
virtual void | clear ()=0
| Deletes all items in the combo box.
virtual s32 | getIndexForItemData (u32 data) const =0
| Returns index based on item data.
virtual const wchar_t * | getItem (u32 idx) const =0
| Returns string of an item. the idx may be a value from 0 to itemCount-1.
virtual u32 | getItemCount () const =0
| Returns amount of items in box.
virtual u32 | getItemData (u32 idx) const =0
| Returns item data of an item. the idx may be a value from 0 to itemCount-1.
virtual s32 | getSelected () const =0
| Returns id of selected item. returns -1 if no item is selected.
| IGUIComboBox (IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
| constructor
virtual void | removeItem (u32 idx)=0
| Removes an item from the combo box.
virtual void | setSelected (s32 idx)=0
| Sets the selected item. Set this to -1 if no item should be selected.
virtual void | setTextAlignment (EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical)=0
| Sets text justification of the text area.

## Detailed Description

Combobox widget.

Definition at line 16 of file IGUIComboBox.h.

## Constructor & Destructor Documentation

irr::gui::IGUIComboBox::IGUIComboBox | ( | IGUIEnvironment * | environment,
|  | IGUIElement * | parent,
|  | s32 | id,
|  | core::rect< s32 > | rectangle |
| ) |  |  | `[inline]`

constructor

Definition at line 21 of file IGUIComboBox.h.

## Member Function Documentation

virtual u32 irr::gui::IGUIComboBox::addItem | ( | const wchar_t * | text,
|  | u32 | data = `0` |
| ) |  |  | `[pure virtual]`

Adds an item and returns the index of it.

virtual void irr::gui::IGUIComboBox::clear | ( |  | ) | `[pure virtual]`

Deletes all items in the combo box.

virtual s32 irr::gui::IGUIComboBox::getIndexForItemData | ( | u32 | data | ) | const`[pure virtual]`

Returns index based on item data.

virtual const wchar_t* irr::gui::IGUIComboBox::getItem | ( | u32 | idx | ) | const`[pure virtual]`

Returns string of an item. the idx may be a value from 0 to itemCount-1.

virtual u32 irr::gui::IGUIComboBox::getItemCount | ( |  | ) | const`[pure virtual]`

Returns amount of items in box.

virtual u32 irr::gui::IGUIComboBox::getItemData | ( | u32 | idx | ) | const`[pure virtual]`

Returns item data of an item. the idx may be a value from 0 to itemCount-1.

virtual s32 irr::gui::IGUIComboBox::getSelected | ( |  | ) | const`[pure virtual]`

Returns id of selected item. returns -1 if no item is selected.

virtual void irr::gui::IGUIComboBox::removeItem | ( | u32 | idx | ) | `[pure virtual]`

Removes an item from the combo box.

Warning. This will change the index of all following items

virtual void irr::gui::IGUIComboBox::setSelected | ( | s32 | idx | ) | `[pure virtual]`

Sets the selected item. Set this to -1 if no item should be selected.

virtual void irr::gui::IGUIComboBox::setTextAlignment | ( | EGUI_ALIGNMENT | horizontal,
|  | EGUI_ALIGNMENT | vertical |
| ) |  |  | `[pure virtual]`

Sets text justification of the text area.

Parameters:

  | horizontal,: | EGUIA_UPPERLEFT for left justified (default), EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
  | vertical,: | EGUIA_UPPERLEFT to align with top edge, EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default).

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

- IGUIComboBox.h

| The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Sun Oct 24 12:42:03 2010 by Doxygen (1.6.2)