#include <guiflowmenu.h>
Inheritance diagram for GuiFlowMenuItem:
Public Member Functions | |
GuiFlowMenuItem (TiXmlElement *el, GuiFlowMenu *parent) | |
GuiFlowMenuItem (const SDL_Rect &r, GuiFlowMenu *parent, const char *name, long id) | |
long | getID () |
| |
bool | activatorCompare (BasicObject *obj) |
void | setBackRect (const SDL_Rect &r) |
void | setNextRect (const SDL_Rect &r) |
const SDL_Rect & | getRectNext () |
const SDL_Rect & | getRectBack () |
Static Public Member Functions | |
static void | newguiobject (void *presult, BasicObject *o, void *xmldata) |
Protected Member Functions | |
virtual void | onInit () |
GuiFlowMenuItem::GuiFlowMenuItem | ( | TiXmlElement * | el, | |
GuiFlowMenu * | parent | |||
) |
Constructor. Automatically registers itself in the parent element.
el | the xml data with the following attributes: ID (int, required), Activator (string), NextRect and BackRect (Rect) | |
parent | the GuiFlowMenu on which this object is placed |
GuiFlowMenuItem::GuiFlowMenuItem | ( | const SDL_Rect & | r, | |
GuiFlowMenu * | parent, | |||
const char * | name, | |||
long | id | |||
) |
Constructor. Automatically registers itself in the parent element.
r | the geometry | |
parent | the GuiFlowMenu on which this object is placed | |
id | the ID of this object |
bool GuiFlowMenuItem::activatorCompare | ( | BasicObject * | obj | ) |
obj | the object to compare |
void GuiFlowMenuItem::setBackRect | ( | const SDL_Rect & | r | ) | [inline] |
Sets the rect the window comes from after a "back"-call, and to which the window flies, when receiving a "next"-signal.
r | the rect |
void GuiFlowMenuItem::setNextRect | ( | const SDL_Rect & | r | ) | [inline] |
Sets the rect the window comes from after a "next"-call, and to which the window flies, when receiving a "back"-signal.
r | the rect |
const SDL_Rect& GuiFlowMenuItem::getRectNext | ( | ) | [inline] |
const SDL_Rect& GuiFlowMenuItem::getRectBack | ( | ) | [inline] |
void GuiFlowMenuItem::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.