GuiListBox Class Reference
[2D graphical user interface]

A class for listboxes. More...

#include <guilistbox.h>

Inheritance diagram for GuiListBox:

Inheritance graph
[legend]
Collaboration diagram for GuiListBox:

Collaboration graph
[legend]
List of all members.

Public Member Functions

DECLSPEC GuiListBox (const SDL_Rect &r, GuiElement *p, const char *name, bool editable=false)
DECLSPEC GuiListBox (TiXmlElement *el, GuiElement *p)
virtual const char * getClassName ()
DECLSPEC void destroy ()
int insertStr (const char *str, int pos=-1)
bool clearStr (int pos=-1)
void clearAll ()
bool changeStr (const char *newstr, int pos)
const char * getStr (int pos) const
const char * getSelStr () const
int getSelId () const
int getCount () const
void setSelected (int i)

Static Public Member Functions

static void newguiobject (void *presult, BasicObject *o, void *xmldata)

Protected Member Functions

virtual DECLSPEC void onInit ()

Detailed Description

A class for listboxes.


Constructor & Destructor Documentation

GuiListBox::GuiListBox ( TiXmlElement el,
GuiElement p 
)

Constructor. Uses XML data.

Parameters:
el the XML data for initialisation
p parent element (or NULL, to take GuiManager::the as parent)
See also:
GuiElement(TiXmlElement*,GuiElement*)


Member Function Documentation

virtual const char* GuiListBox::getClassName (  )  [inline, virtual]

This function should be overriden in every sub-class of BasicObject!

Returns:
the name of the class.

Reimplemented from GuiElement.

void GuiListBox::destroy (  ) 

Uninitilises the object by calling onDestroy() (memory is not freed). This should usually be called before deleting an object.

Reimplemented from BasicObject.

void GuiListBox::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:21 2007 for netrinjo by  doxygen 1.5.1