#include <guicombination.h>
Inheritance diagram for GuiRadio:
Public Member Functions | |
DECLSPEC | GuiRadio (const SDL_Rect &r, GuiRadioContainer *p, const char *name, const char *t=NULL) |
DECLSPEC | GuiRadio (TiXmlElement *el, GuiRadioContainer *p) |
virtual const char * | getClassName () |
DECLSPEC void | destroy () |
Static Public Member Functions | |
static void | newguiobject (void *presult, BasicObject *o, void *xmldata) |
Protected Member Functions | |
virtual DECLSPEC Uint32 | onResize () |
virtual DECLSPEC void | onInit () |
GuiRadio::GuiRadio | ( | const SDL_Rect & | r, | |
GuiRadioContainer * | p, | |||
const char * | name, | |||
const char * | t = NULL | |||
) |
Constructor.
r | the rect of the element's appearance, relative to the parent's top-left position | |
p | the parent element; or NULL, if it will be used as top level | |
t | the text, that appears next to the radio button; may be NULL, if no text needed |
GuiRadio::GuiRadio | ( | TiXmlElement * | el, | |
GuiRadioContainer * | p | |||
) |
Constructor. Uses XML data.
el | the XML data for initialisation | |
p | the container element |
virtual const char* GuiRadio::getClassName | ( | ) | [inline, virtual] |
This function should be overriden in every sub-class of BasicObject!
Reimplemented from GuiElement.
void GuiRadio::destroy | ( | ) |
Uninitializes the element by deleting the radio button and text elements. Has to be called, if it's not deleted by the parent.
Reimplemented from BasicObject.
Uint32 GuiRadio::onResize | ( | ) | [protected, virtual] |
This event is called, when the element changed its place or size.
Reimplemented from GuiElement.
void GuiRadio::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 GuiElement.