Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_RadioGroup Class Reference

A radio button group. More...

#include <CUI_RadioGroup.h>

Inheritance diagram for CUI_RadioGroup:

CUI_Control CUI_Frame List of all members.

Public Member Functions

 CUI_RadioGroup (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, int columns=1, IUI_Font *font=NULL, IUI_Shader *onShader=NULL, IUI_Shader *offShader=NULL, IUI_Shader *onHoverShader=NULL, IUI_Shader *offHoverShader=NULL)
 constructor

virtual ~CUI_RadioGroup ()
 destructor

virtual bool AddItem (char *text=NULL, unsigned int itemID=0, IUI_Shader *icon=NULL)
 add an item to the list

virtual bool AddItem (CUI_RadioItem *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 UpdateView ()
 reposition the radio buttons

virtual bool ProcessKey (unsigned long key)
 Process a incoming key.

virtual bool CallbackFunc (int id, int numparam, void *param)
 Callback function to handle updating the selection.

virtual bool SetButtonShaders (IUI_Shader *onshader=NULL, IUI_Shader *offshader=NULL, IUI_Shader *onhover=NULL, IUI_Shader *offhover=NULL)
 Set Shaders.

virtual bool SetColumns (unsigned int columns)
 Set Formatting.


Protected Types

typedef std::list< CUI_RadioItem * > RADIOITEMLIST
 type for the listitem list


Protected Member Functions

virtual CUI_RadioItemFindItem (unsigned int itemID)
 Find the first item with this ID.

virtual bool SelectNext ()
 Select Next item.

virtual bool SelectPrevious ()
 Select Previous item.


Protected Attributes

unsigned int m_columns
 number of columns of radio buttons (0 means no limit)

IUI_Shaderm_onShader
 Shader to use for selected button.

IUI_Shaderm_onHoverShader
 Hover shader to use for selected button.

IUI_Shaderm_offShader
 Shader to use for non-selected buttons.

IUI_Shaderm_offHoverShader
 Hover shader to use for non-selected button.

RADIOITEMLIST m_itemList
 a list of the items in this list

CUI_RadioItemm_selected
 pointer to the currently selected listitem

unsigned int m_activeItems
 the number of active items


Detailed Description

A radio button group.

Uses CUI_MultipleStateButtons for the radio buttons.

Formats based on number of rows and columns (column-major). If a value is 0 it means there is no limit to how many should be created.

Uses CUI_ListItem

Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED

UI_DISABLED
UI_INACTIVE


Member Function Documentation

bool CUI_RadioGroup::CallbackFunc int  id,
int  numparam,
void *  param
[virtual]
 

Callback function to handle updating the selection.

Returns:
true if the global callback does NOT need to be called

false if the global callback needs to be called

Reimplemented from CUI_Frame.


The documentation for this class was generated from the following files:
Generated on Mon Sep 29 23:07:04 2003 for glGUI by doxygen 1.3.4