GuiFlowMenuItem Class Reference

A single menu item for a GuiFlowMenu. More...

#include <guiflowmenu.h>

Inheritance diagram for GuiFlowMenuItem:

Inheritance graph
[legend]
Collaboration diagram for GuiFlowMenuItem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GuiFlowMenuItem (TiXmlElement *el, GuiFlowMenu *parent)
 GuiFlowMenuItem (const SDL_Rect &r, GuiFlowMenu *parent, const char *name, long id)
long getID ()
 
Returns:
the ID of the object

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 ()

Detailed Description

A single menu item for a GuiFlowMenu.


Constructor & Destructor Documentation

GuiFlowMenuItem::GuiFlowMenuItem ( TiXmlElement el,
GuiFlowMenu parent 
)

Constructor. Automatically registers itself in the parent element.

Parameters:
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.

Parameters:
r the geometry
parent the GuiFlowMenu on which this object is placed
id the ID of this object


Member Function Documentation

bool GuiFlowMenuItem::activatorCompare ( BasicObject obj  ) 

Parameters:
obj the object to compare
Returns:
true, if obj is the object, where strActivator's path points at.

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.

Parameters:
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.

Parameters:
r the rect

const SDL_Rect& GuiFlowMenuItem::getRectNext (  )  [inline]

Returns:
the rect where the menu comes from, when clicking "next"

const SDL_Rect& GuiFlowMenuItem::getRectBack (  )  [inline]

Returns:
the rect where the menu comes from, when clicking "next"

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.


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