GuiMenuItem Class Reference

Used to show items of menus. More...

#include <guimenu.h>

Inheritance diagram for GuiMenuItem:

Inheritance graph
[legend]
Collaboration diagram for GuiMenuItem:

Collaboration graph
[legend]
List of all members.

Public Types

enum  TYPE { tCheckable, tClickable, tSubmenu }

Public Member Functions

DECLSPEC GuiMenuItem (const SDL_Rect &r, GuiMenuBar *parent, const char *name, bool checkable=false, const char *txt=0, SdlSurfaceContainer *b=0, SdlAudio *u=0, SdlAudio *d=0)
DECLSPEC GuiMenuItem (const SDL_Rect &r, GuiMenuBar *parent, const char *name, GuiMenuBar *submenu, const char *txt=NULL, SdlSurfaceContainer *b=0, SdlAudio *u=0, SdlAudio *d=0)
virtual const char * getClassName ()
int getItemID ()
 
Returns:
the item's ID (just a number assigned to this object)

void setItemID (int id)
DECLSPEC void setSelectable (bool cansel)
GuiMenuBargetBar ()
void setButtonImages (SdlSurfaceContainer *b)

Friends

class GuiMenuBar

Detailed Description

Used to show items of menus.

Test:
This class has never been tested yet and is expected not to work (correctly).


Constructor & Destructor Documentation

GuiMenuItem::GuiMenuItem ( const SDL_Rect &  r,
GuiMenuBar parent,
const char *  name,
bool  checkable = false,
const char *  txt = 0,
SdlSurfaceContainer b = 0,
SdlAudio u = 0,
SdlAudio d = 0 
)

Constructor.

Parameters:
checkable the kind of item this should be, checkable or clickable Other params see GuiDynamicButton::GuiDynamicButton()

GuiMenuItem::GuiMenuItem ( const SDL_Rect &  r,
GuiMenuBar parent,
const char *  name,
GuiMenuBar submenu,
const char *  txt = NULL,
SdlSurfaceContainer b = 0,
SdlAudio u = 0,
SdlAudio d = 0 
)

Constructor for submenu-items.

Parameters:
submenu a pointer to the submenu to be associated with this object or NULL if a new menu-bar should be created (that will be destroyed with this object).
Other params see GuiDynamicButton::GuiDynamicButton()


Member Function Documentation

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

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

Returns:
the name of the class.

Reimplemented from GuiElement.

void GuiMenuItem::setItemID ( int  id  )  [inline]

Sets the item's ID.

Parameters:
id the new ID

void GuiMenuItem::setSelectable ( bool  cansel  ) 

Sets whether or not the user can access the item. (The item will be invisible if not).

Parameters:
cansel the new value

GuiMenuBar* GuiMenuItem::getBar (  )  [inline]

Returns:
the associated

void GuiMenuItem::setButtonImages ( SdlSurfaceContainer b  ) 

Changes the image of the item's button.

Parameters:
b the new images for the different button-states
See also:
GuiDynamicButton::setButtonBmps()


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