#include <guicombination.h>
Inheritance diagram for GuiNumScroller:
Public Member Functions | |
DECLSPEC | GuiNumScroller (const SDL_Rect &r, GuiElement *p, const char *name) |
DECLSPEC | GuiNumScroller (TiXmlElement *el, GuiElement *p) |
virtual const char * | getClassName () |
DECLSPEC void | updatetext () |
refreshes the number of the text | |
Static Public Member Functions | |
static void | newguiobject (void *presult, BasicObject *o, void *xmldata) |
Public Attributes | |
GuiScroller * | scroller |
the scroller | |
GuiText * | text |
the text, which contains the scroller's decimal value | |
Protected Member Functions | |
virtual DECLSPEC Uint32 | onResize () |
virtual DECLSPEC void | onInit () |
GuiNumScroller::GuiNumScroller | ( | const SDL_Rect & | r, | |
GuiElement * | p, | |||
const char * | name | |||
) |
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 |
GuiNumScroller::GuiNumScroller | ( | TiXmlElement * | el, | |
GuiElement * | p | |||
) |
Constructor. Uses XML data.
el | the XML data for initialisation | |
p | parent element (or NULL, to take GuiManager::the as parent) |
virtual const char* GuiNumScroller::getClassName | ( | ) | [inline, virtual] |
This function should be overriden in every sub-class of BasicObject!
Reimplemented from GuiElement.
Uint32 GuiNumScroller::onResize | ( | ) | [protected, virtual] |
This event is called, when the element changed its place or size.
Reimplemented from GuiElement.
void GuiNumScroller::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.