#include <guimenu.h>
Inheritance diagram for GuiMenuBar:
Public Member Functions | |
DECLSPEC | GuiMenuBar (const SDL_Rect &r, GuiElement *parent, const char *name, bool horizontal=true) |
virtual const char * | getClassName () |
DECLSPEC void | hideSubmenus () |
Hides all it's submenus. | |
DECLSPEC void | showAt (const SDL_Rect &r) |
DECLSPEC void | setCallback (const FunctionData &fd) |
Protected Member Functions | |
virtual DECLSPEC void | onSelect (GuiMenuItem *selected) |
Friends | |
class | GuiMenuItem |
virtual const char* GuiMenuBar::getClassName | ( | ) | [inline, virtual] |
This function should be overriden in every sub-class of BasicObject!
Reimplemented from GuiElement.
void GuiMenuBar::showAt | ( | const SDL_Rect & | r | ) |
Shows the bar next to the specified rect.
r | the rect |
DECLSPEC void GuiMenuBar::setCallback | ( | const FunctionData & | fd | ) | [inline] |
Sets the function to be called when an item is selected/clicked on. The sender (1st param) of the callback will be the clicked item (not this menu-bar).
fd | the function data |
void GuiMenuBar::onSelect | ( | GuiMenuItem * | selected | ) | [protected, virtual] |
Called when an item has been selected/clicked. But not if the item openes a submenu.