Advanced Strategic Command
Public Member Functions | Protected Member Functions | Friends | List of all members
GuiButton Class Reference

#include <guiiconhandler.h>

Inheritance diagram for GuiButton:
Inheritance graph
[legend]

Public Member Functions

 GuiButton (PG_Widget *parent, const PG_Rect &r)
 
void registerFunc (GuiFunction *f, const MapCoordinate &position, ContainerBase *subject, int id)
 
bool checkForKey (const SDL_KeyboardEvent *key, int modifier)
 
void unregisterFunc ()
 
bool exec ()
 
bool ready ()
 
void showInfoText ()
 

Protected Member Functions

void eventMouseEnter ()
 
void eventMouseLeave ()
 
void callFunc (const MapCoordinate &pos, ContainerBase *subject, int num)
 

Friends

class SmallGuiButton
 

Detailed Description

Definition at line 79 of file guiiconhandler.h.

Constructor & Destructor Documentation

GuiButton::GuiButton ( PG_Widget *  parent,
const PG_Rect &  r 
)

Definition at line 52 of file guiiconhandler.cpp.

References exec(), and IconRepository::getIcon().

Member Function Documentation

void GuiButton::callFunc ( const MapCoordinate pos,
ContainerBase subject,
int  num 
)
protected

Definition at line 101 of file guiiconhandler.cpp.

References errorMessage(), GuiFunction::execute(), and ActionResult::getMessage().

Referenced by checkForKey(), and exec().

bool GuiButton::checkForKey ( const SDL_KeyboardEvent *  key,
int  modifier 
)
void GuiButton::eventMouseEnter ( )
protected

Definition at line 89 of file guiiconhandler.cpp.

References showInfoText().

void GuiButton::eventMouseLeave ( )
protected

Definition at line 95 of file guiiconhandler.cpp.

bool GuiButton::exec ( )

Definition at line 61 of file guiiconhandler.cpp.

References callFunc().

Referenced by NewGuiHost::eventKeyUp(), GuiButton(), and SmallGuiButton::SmallGuiButton().

bool GuiButton::ready ( )
inline

Definition at line 95 of file guiiconhandler.h.

Referenced by NewGuiHost::eventKeyDown().

void GuiButton::registerFunc ( GuiFunction f,
const MapCoordinate position,
ContainerBase subject,
int  id 
)
void GuiButton::showInfoText ( )

Definition at line 121 of file guiiconhandler.cpp.

References GuiFunction::getName().

Referenced by eventMouseEnter(), and NewGuiHost::setNewButtonPressed().

void GuiButton::unregisterFunc ( )

Definition at line 80 of file guiiconhandler.cpp.

Referenced by NewGuiHost::disableButtons().

Friends And Related Function Documentation

friend class SmallGuiButton
friend

Definition at line 84 of file guiiconhandler.h.


The documentation for this class was generated from the following files: