#include <CUI_ListItem.h>
Inheritance diagram for CUI_ListItem:

Public Member Functions | |
| CUI_ListItem (const char *text=NULL, unsigned int itemID=0, IUI_Shader *icon=NULL, unsigned short flags=UI_ITEM_BUTTON) | |
| constructor | |
| virtual | ~CUI_ListItem () |
| destructor | |
| virtual bool | CreateElements (CUI_UI *ui, CUI_Frame *parent, IUI_Shader *itemShader, IUI_Shader *hoverShader, IUI_Border *itemBorder, IUI_Font *font) |
| Create the elements and add them to the ui and the parent. | |
| virtual bool | SetText (char *text) |
| set/change the text | |
| virtual char * | GetText () |
| get the text | |
| virtual bool | SetItemID (unsigned int itemID) |
| set the ID | |
| virtual unsigned int | GetItemID () |
| get the ID | |
| virtual bool | SetIcon (IUI_Shader *icon) |
| set the icon shader | |
| virtual bool | SetTextFrame (CUI_Widget *frame) |
| set the widget that this item is linked to for diplaying text | |
| virtual CUI_Widget * | GetTextFrame () |
| virtual bool | SetIconFrame (CUI_Frame *frame) |
| set the frame that this item is linked to for displaying the icon | |
| virtual CUI_Frame * | GetIconFrame () |
| virtual bool | SetFlag (unsigned long flag, bool set) |
| set a flag | |
| virtual bool | GetFlag (unsigned long flag) |
| get the status of a specific flag | |
| virtual bool | IsSelectable () |
| is this item selectable? | |
| virtual CUI_Button * | GetButton () |
| get the button which represents this list item | |
| virtual IUI_Shader * | GetIconShader () |
| get the icon shader for this item | |
| virtual bool | SetOwned (bool owned) |
| set owned flag | |
| virtual bool | ToggleState () |
| toggle the state | |
Protected Attributes | |
| char * | m_text |
| the text to be displayed | |
| unsigned int | m_itemID |
| the id for this item | |
| IUI_Shader * | m_icon |
| shader for the icon | |
| unsigned short | m_flags |
| flags (enable/disable/type) | |
| CUI_Button * | m_button |
| pointer to the button for this item | |
| CUI_Widget * | m_textFrame |
| pointer to the textframe for this item | |
| CUI_Frame * | m_iconFrame |
| pointer to the icon frame for this item | |
| bool | m_state |
| state for toggle items | |
Private Attributes | |
| bool | m_owned |
| Was this item created inside the UI? | |
Uses a CUI_Button to handle mouse interface and some functionality. The Button is set to use the CUI_ListBox's callback function.
This class can be inherited to produce custom items in a listbox. Just be sure that you make the same calls to add the frame to the ui and as children to the parent frame.
Recognized Flags:
UI_ITEM_INACTIVE
UI_ITEM_DISABLED
UI_ITEM_BUTTON
UI_ITEM_TOGGLE
|
|
is this item selectable?
|
|
|
toggle the state
|
|
|
the id for this item returned to callback when clicked |
1.3.4