#include <CUI_ComboBox.h>
Inheritance diagram for CUI_ComboBox:
Public Member Functions | |
CUI_ComboBox (CUI_UI *ui=NULL, float x=0, float y=0, float x2=1, float y2=1, CUI_Frame *parent=NULL, IUI_Shader *shader=NULL, IUI_Shader *cursor=NULL, CUI_CoordSys *coordsys=NULL, IUI_Shader *dropIcon=NULL) | |
constructor | |
virtual | ~CUI_ComboBox () |
destructor | |
virtual bool | SetUI (CUI_UI *ui) |
Set UI - add the frames to the UI. | |
virtual int | GetSelectedID () |
get the id of the currently selected item | |
virtual bool | Select (CUI_Frame *frame) |
select a child frame | |
virtual bool | Select (unsigned int id) |
select a frame with this id | |
virtual bool | SetFlag (unsigned long flag, bool set) |
flag handling - needs to update listbox as well | |
virtual bool | AddItem (char *text=NULL, unsigned int itemID=0, IUI_Shader *icon=NULL, unsigned short flags=UI_ITEM_BUTTON) |
add an item to the list | |
virtual bool | AddItem (CUI_ListItem *item) |
add an item to the list | |
virtual bool | RemoveItem (unsigned int itemID) |
remove an item - flags it as inactive | |
virtual bool | EnableItem (unsigned int itemID, bool enable=true) |
enable/disable an item | |
virtual bool | ProcessKey (unsigned long key) |
Process a incoming key - pass to listbox. | |
bool | CallbackFunc (int id, int numparam, void *param) |
Callback function to handle updating the selection. | |
virtual bool | SetDropIconShader (IUI_Shader *dropIcon) |
Set the dropIcon shader. | |
virtual bool | SetItemSize (float size) |
set the size of each item (in the control's parent's coordinate system) | |
virtual bool | SetItemFlag (unsigned int itemID, unsigned short flag, bool enable=true) |
general flag flipping | |
virtual bool | SetItemIcon (unsigned int itemID, IUI_Shader *icon) |
set the icon for an item | |
virtual bool | SetHoverShader (IUI_Shader *shader) |
set the hover shader for each item | |
virtual bool | SetSelectedShader (IUI_Shader *shader) |
set the shader for the selected item | |
virtual bool | SetItemShader (IUI_Shader *shader) |
set the shader for each item | |
virtual bool | SetItemBorder (IUI_Border *border) |
Set the border for each item. | |
Protected Member Functions | |
virtual bool | OpenListBox () |
virtual bool | CloseListBox () |
Protected Attributes | |
CUI_ListBox * | m_listBox |
the list box it uses | |
CUI_Button * | m_button |
the button it uses | |
CUI_Widget * | m_widget |
the widget it uses to display text | |
CUI_Frame * | m_icon |
The icon for the selected item. | |
CUI_Frame * | m_dropIcon |
The icon that shows it's a dropdown. | |
int | m_selectedID |
the id of the currently selected item | |
bool | m_listBoxOpen |
true if the listbox is open |
Also known as a chooser, or dropdown box.
Uses a button and a listbox.
Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED
UI_DISABLED
UI_INACTIVE
|
Callback function to handle updating the selection.
Reimplemented from CUI_Frame. |
|
flag handling - needs to update listbox as well Also if selection is lost, and listbox is not being selected, close the listbox Reimplemented from CUI_Frame. |
|
the widget it uses to display text text |