#include <mgui/combobox.h>
Inheritance diagram for MGUI::CTRL_COMBOBOX:

Public Types | |
| enum | STYLE { STYLE_Default = 0x00, STYLE_Sorted = 0x01 } |
Public Member Functions | |
| int | AddItem (ID id, const char *string, bool resize=true) |
| int | AddItem (ID id, const MISTRING &string, bool resize=true) |
| void | AddItems (const MGUI::LISTITEMDEF *items, bool resize=true) |
| void | AddUnitItems (int UnitType, int DftUnitID=0) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MGUI::LISTITEMDEF *items=0, int listheight=7, int width=0, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize, STYLE style=STYLE_Default) |
| CTRL_COMBOBOX () | |
| void | DeleteAllItems () |
| void | DeleteItem (int index) |
| void | DeleteItemID (ID id) |
| int | GetCount () const |
| CComboBox & | GetCtrl () |
| int | GetIndexFromID (ID id) const |
| ID | GetItemID (int index) const |
| MISTRING | GetItemString (int index) const |
| int | GetSelectedItem () const |
| ID | GetSelectedItemID () const |
| void | IniRead (INIHANDLE IniHandle, const char *IniGroup, const char *IniField, bool notify=true) |
| void | IniWrite (INIHANDLE IniHandle, const char *IniGroup, const char *IniField) const |
| int | InsertItem (int index, ID id, const MISTRING &string) |
| bool | IsItemSelected (int index) const |
| virtual void | SetEnabled (bool enabled=true) |
| void | SetSelectedItem (int index) |
| void | SetSelectedItemID (ID id) |
| void | SetSorted (bool sorted=true) |
| void | SizeToContentWidth () |
| virtual | ~CTRL_COMBOBOX () |
Protected Member Functions | |
| virtual void | OnSelection () |
At present this is implemented as an OptionMenu for X.
Definition at line 72 of file combobox.h.
|
|
Definition at line 75 of file combobox.h. |
|
|
Constructor.
|
|
|
Destructor.
|
|
||||||||||||||||
|
Add single item with string from resource lookup. If control was created with STYLE_Sorted then the list will be resorted after the item is added, otherwise the item will be added to the end of the list.
|
|
||||||||||||||||
|
Add single item with MISTRING or TEXTID. If control was created with STYLE_Sorted then the combo will be resorted after the item is added, otherwise the item will be added to the end of the list.
|
|
||||||||||||
|
Add multiple items.
|
|
||||||||||||
|
Add items to combobox for unit selection. Item IDs will be equal to UnitIDs.
|
|
||||||||||||||||||||||||||||
|
Create control.
|
|
|
Delete all items from control.
|
|
|
Delete item from list given index.
|
|
|
Delete item from list given ID.
|
|
|
Retrieve number of items in the list.
|
|
|
Get reference to MFC control (MFC only).
Definition at line 151 of file combobox.h. |
|
|
Get index to item from ID.
|
|
|
Get ID associated with list item.
|
|
|
Get text string associated with list item.
|
|
|
Get currently selected item.
|
|
|
Get ID of currently selected item.
|
|
||||||||||||||||||||
|
Read setting from INI file. If Create() has already been performed the control's state will be updated.
|
|
||||||||||||||||
|
Write currently selected item ID to INI file.
Definition at line 193 of file combobox.h. |
|
||||||||||||||||
|
Insert item at specified position. Unlike the AddItem method this does not cause the list to be resorted.
|
|
|
Determine if specified item is selected.
|
|
|
Called when user makes selection. Derived class must call corresponding base class method BEFORE performing its own processing. |
|
|
Set whether control is enabled.
Reimplemented from MGUI::CTRL. |
|
|
Select item using zero-based index. If item is not visible the list will be scrolled to make it visible.
|
|
|
Select item using item ID. If item does not exist then no item will be selected. If item is not visible the list will be scrolled to make it visible.
|
|
|
Set whether items are to be sorted or not.
|
|
|
Resize control to be able to show widest item.
|
1.3.8-20040913