GuiRadioContainer Class Reference
[2D graphical user interface]

A container class for radio buttons. More...

#include <guibackground.h>

Inheritance diagram for GuiRadioContainer:

Inheritance graph
[legend]
Collaboration diagram for GuiRadioContainer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

DECLSPEC GuiRadioContainer (const SDL_Rect &r, GuiElement *p, const char *name, Uint32 c=CLR_INVALID)
DECLSPEC GuiRadioContainer (TiXmlElement *el, GuiElement *p)
virtual const char * getClassName ()
DECLSPEC void setIndex (int i)
 select the item with the specified index i
DECLSPEC int getIndex ()
 
Returns:
the currently selected item-index, -1 if none is selected

DECLSPEC GuiRadioBtngetSelectedItem ()
 
Returns:
the currently selected item

DECLSPEC GuiRadioBtngetItem (int i)
 
Returns:
the button, that belongs to the specified index i

DECLSPEC GuiRadioBtngetLast ()
 
Returns:
the button with the highest index, or NULL, if there are none

DECLSPEC void setCallback (FunctionData d)
DECLSPEC void setAllowNoCheck (bool allow)
 specifies whether it is allowed to check no item

Static Public Member Functions

static void newguiobject (void *presult, BasicObject *o, void *xmldata)

Protected Member Functions

virtual DECLSPEC void onInit ()
virtual DECLSPEC void onSelect (int i)

Friends

class GuiRadioBtn

Detailed Description

A container class for radio buttons.


Constructor & Destructor Documentation

GuiRadioContainer::GuiRadioContainer ( TiXmlElement el,
GuiElement p 
)

Constructor. Uses XML data.

Parameters:
el the XML data for initialisation, the following attributes are read: OnCheck (event), AllowNoCheck (bool)
p parent element (or NULL, to take GuiManager::the as parent)
See also:
GuiElement(TiXmlElement*,GuiElement*)


Member Function Documentation

virtual const char* GuiRadioContainer::getClassName (  )  [inline, virtual]

This function should be overriden in every sub-class of BasicObject!

Returns:
the name of the class.

Reimplemented from GuiBackground.

DECLSPEC void GuiRadioContainer::setCallback ( FunctionData  d  )  [inline]

Sets the callback, that is called, when another radiobutton is selected.

Parameters:
d the callback data

void GuiRadioContainer::onInit (  )  [protected, virtual]

Initializes the object's variables by reading data from the XML element. If there were no XML data used for creation, nothing is done. This function calls onInit() of its children recursively (after it has inited itself). It is highly recommended to call BasicObject::onInit(), usually at the end of the onInit() method, when overwriting it in a derived class.

Reimplemented from GuiBackground.

void GuiRadioContainer::onSelect ( int  i  )  [protected, virtual]

Called when the selection changes.

Parameters:
i the index of the selected item


The documentation for this class was generated from the following files:
Generated on Wed May 9 17:36:26 2007 for netrinjo by  doxygen 1.5.1