#include <guibackground.h>
Inheritance diagram for GuiRadioContainer:
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 () |
| |
DECLSPEC GuiRadioBtn * | getSelectedItem () |
| |
DECLSPEC GuiRadioBtn * | getItem (int i) |
| |
DECLSPEC GuiRadioBtn * | getLast () |
| |
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 |
GuiRadioContainer::GuiRadioContainer | ( | TiXmlElement * | el, | |
GuiElement * | p | |||
) |
Constructor. Uses XML data.
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) |
virtual const char* GuiRadioContainer::getClassName | ( | ) | [inline, virtual] |
This function should be overriden in every sub-class of BasicObject!
Reimplemented from GuiBackground.
DECLSPEC void GuiRadioContainer::setCallback | ( | FunctionData | d | ) | [inline] |
Sets the callback, that is called, when another radiobutton is selected.
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.
i | the index of the selected item |