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

Public Member Functions | |
| DEPRECATED int | AddItem (ID id, const char *string, bool resize=true) |
| int | AddItem (ID id, const MISTRING &string, bool resize=true) |
| DEPRECATED void | AddItems (const MGUI::LISTITEMDEF *items, bool resize=true) |
| void | AddUnitItems (int UnitType, int DftUnitID=0) |
| DEPRECATED void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &label, const MGUI::LISTITEMDEF *items, int listheight=7, int width=0, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize, MGUI::CTRL_COMBOBOX::STYLE style=MGUI::CTRL_COMBOBOX::STYLE_Default, MGUI::CTRL_LABEL::STYLE labelstyle=MGUI::CTRL_LABEL::STYLE_LeftNoWrap) |
| DEPRECATED void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const char *label, const MGUI::LISTITEMDEF *items=0, int listheight=7, int width=0, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize, MGUI::CTRL_COMBOBOX::STYLE style=MGUI::CTRL_COMBOBOX::STYLE_Default, MGUI::CTRL_LABEL::STYLE labelstyle=MGUI::CTRL_LABEL::STYLE_LeftNoWrap) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &label, int listheight=7, int width=0, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize, MGUI::CTRL_COMBOBOX::STYLE style=MGUI::CTRL_COMBOBOX::STYLE_Default, MGUI::CTRL_LABEL::STYLE labelstyle=MGUI::CTRL_LABEL::STYLE_LeftNoWrap) |
| void | DeleteAllItems () |
| void | DeleteItem (int index) |
| void | DeleteItemID (ID id) |
| FORM_COMBOBOX () | |
| const CTRL_COMBOBOX & | GetComboBox () const |
| CTRL_COMBOBOX & | GetComboBox () |
| int | GetCount () const |
| int | GetIndexFromID (ID id) const |
| ID | GetItemID (int index) const |
| MISTRING | GetItemString (int index) const |
| MGUI::CTRL_LABEL & | GetLabel () |
| int | GetSelectedItem () const |
| ID | GetSelectedItemID () const |
| int | InsertItem (int index, ID id, const MISTRING &string) |
| bool | IsItemSelected (int index) const |
| void | SetDelegateOnSelection (DELEGATE_VOID_NOPARMS delegate) |
| void | SetSelectedItem (int index) |
| void | SetSelectedItemID (ID id) |
| void | SetSorted (bool sorted=true) |
| virtual | ~FORM_COMBOBOX () |
Definition at line 366 of file combobox.h.
| MGUI::FORM_COMBOBOX::FORM_COMBOBOX | ( | ) |
Default constructor.
| virtual MGUI::FORM_COMBOBOX::~FORM_COMBOBOX | ( | ) | [virtual] |
Destructor.
| DEPRECATED int MGUI::FORM_COMBOBOX::AddItem | ( | ID | id, | |
| const char * | string, | |||
| bool | resize = true | |||
| ) | [inline] |
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.
| id | ID to attach to item |
| string | String for resource lookup |
| resize | Attempt to resize if needed to fit new item string |
Definition at line 393 of file combobox.h.
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.
| id | ID to attach to item |
| string | String to show in list |
| resize | Attempt to resize if needed to fit new item string |
Definition at line 381 of file combobox.h.
| DEPRECATED void MGUI::FORM_COMBOBOX::AddItems | ( | const MGUI::LISTITEMDEF * | items, | |
| bool | resize = true | |||
| ) | [inline] |
Add multiple items.
| items | Items to add, terminated by item with NULL string |
| resize | Attempt to resize if needed to fit largest item string |
Definition at line 405 of file combobox.h.
| void MGUI::FORM_COMBOBOX::AddUnitItems | ( | int | UnitType, | |
| int | DftUnitID = 0 | |||
| ) | [inline] |
Add items to combobox for unit selection.
Item IDs will be equal to UnitIDs.
| UnitType | Unit type |
| DftUnitID | Default unit ID |
Definition at line 414 of file combobox.h.
| DEPRECATED void MGUI::FORM_COMBOBOX::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| const MISTRING & | label, | |||
| const MGUI::LISTITEMDEF * | items, | |||
| int | listheight = 7, |
|||
| int | width = 0, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize, |
|||
| MGUI::CTRL_COMBOBOX::STYLE | style = MGUI::CTRL_COMBOBOX::STYLE_Default, |
|||
| MGUI::CTRL_LABEL::STYLE | labelstyle = MGUI::CTRL_LABEL::STYLE_LeftNoWrap | |||
| ) |
Create form with Unicode label.
| ParentPane | Parent pane |
| label | Label string |
| items | Initial item set |
| listheight | Maximum list height when dropped down in characters |
| width | Width in 'typical' characters, 0 for default |
| DEPRECATED void MGUI::FORM_COMBOBOX::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| const char * | label, | |||
| const MGUI::LISTITEMDEF * | items = 0, |
|||
| int | listheight = 7, |
|||
| int | width = 0, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize, |
|||
| MGUI::CTRL_COMBOBOX::STYLE | style = MGUI::CTRL_COMBOBOX::STYLE_Default, |
|||
| MGUI::CTRL_LABEL::STYLE | labelstyle = MGUI::CTRL_LABEL::STYLE_LeftNoWrap | |||
| ) |
Create form with label from resource lookup.
| ParentPane | Parent pane |
| label | Label string for resource lookup |
| items | Initial item set, 0 for none |
| listheight | Maximum list height when dropped down in characters |
| width | Width in 'typical' characters, 0 for default |
| void MGUI::FORM_COMBOBOX::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| const MISTRING & | label, | |||
| int | listheight = 7, |
|||
| int | width = 0, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize, |
|||
| MGUI::CTRL_COMBOBOX::STYLE | style = MGUI::CTRL_COMBOBOX::STYLE_Default, |
|||
| MGUI::CTRL_LABEL::STYLE | labelstyle = MGUI::CTRL_LABEL::STYLE_LeftNoWrap | |||
| ) |
Create form with MISTRING label.
| ParentPane | Parent pane |
| label | Label string |
| listheight | Maximum list height when dropped down in characters |
| width | Width in 'typical' characters, 0 for default |
| void MGUI::FORM_COMBOBOX::DeleteAllItems | ( | ) | [inline] |
| void MGUI::FORM_COMBOBOX::DeleteItem | ( | int | index | ) | [inline] |
Delete item from list given index.
| index | Zero-based index of item to delete |
Definition at line 464 of file combobox.h.
| void MGUI::FORM_COMBOBOX::DeleteItemID | ( | ID | id | ) | [inline] |
Delete item from list given ID.
| id | ID of item to delete |
Definition at line 469 of file combobox.h.
| const CTRL_COMBOBOX& MGUI::FORM_COMBOBOX::GetComboBox | ( | ) | const [inline] |
| CTRL_COMBOBOX& MGUI::FORM_COMBOBOX::GetComboBox | ( | ) | [inline] |
| int MGUI::FORM_COMBOBOX::GetCount | ( | ) | const [inline] |
| int MGUI::FORM_COMBOBOX::GetIndexFromID | ( | ID | id | ) | const [inline] |
Get index to item from ID.
| id | ID of item to retrieve index of |
Definition at line 487 of file combobox.h.
| ID MGUI::FORM_COMBOBOX::GetItemID | ( | int | index | ) | const [inline] |
Get ID associated with list item.
| index | Zero-based index of item |
Definition at line 493 of file combobox.h.
| MISTRING MGUI::FORM_COMBOBOX::GetItemString | ( | int | index | ) | const [inline] |
Get text string associated with list item.
| index | Zero-based index of item |
Definition at line 499 of file combobox.h.
| MGUI::CTRL_LABEL& MGUI::FORM_COMBOBOX::GetLabel | ( | ) | [inline] |
Get label control if any.
Usually the label control is only retrieved for alignment purposes.
Definition at line 505 of file combobox.h.
| int MGUI::FORM_COMBOBOX::GetSelectedItem | ( | ) | const [inline] |
Get currently selected item.
Definition at line 510 of file combobox.h.
| ID MGUI::FORM_COMBOBOX::GetSelectedItemID | ( | ) | const [inline] |
Get ID of currently selected item.
Definition at line 515 of file combobox.h.
Insert item at specified position.
Unlike the AddItem method this does not cause the list to be resorted.
| index | Zero-based index of position at which item should be inserted |
| id | ID to attach to item |
| string | String to show in combo |
Definition at line 521 of file combobox.h.
| bool MGUI::FORM_COMBOBOX::IsItemSelected | ( | int | index | ) | const [inline] |
Determine if specified item is selected.
| index | Zero-based index of item |
Definition at line 528 of file combobox.h.
| void MGUI::FORM_COMBOBOX::SetDelegateOnSelection | ( | DELEGATE_VOID_NOPARMS | delegate | ) | [inline] |
| void MGUI::FORM_COMBOBOX::SetSelectedItem | ( | int | index | ) | [inline] |
Select item using zero-based index.
If item is not visible the list will be scrolled to make it visible.
| index | Zero-based index of item, -1 to have no item selected |
Definition at line 539 of file combobox.h.
| void MGUI::FORM_COMBOBOX::SetSelectedItemID | ( | ID | id | ) | [inline] |
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.
| id | ID of item to select |
Definition at line 546 of file combobox.h.
| void MGUI::FORM_COMBOBOX::SetSorted | ( | bool | sorted = true |
) | [inline] |
1.5.2