GuiButton Class Reference

#include <guiiconhandler.h>

List of all members.

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::eventMouseEnter (  )  [protected]

Definition at line 89 of file guiiconhandler.cpp.

References showInfoText().

void GuiButton::eventMouseLeave (  )  [protected]

Definition at line 95 of file guiiconhandler.cpp.

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

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

Definition at line 71 of file guiiconhandler.cpp.

References Surface::getBaseSurface(), and GuiFunction::getImage().

Referenced by GuiFunctions::ObjectBuildingGui::addButton(), GuiIconHandler::eval(), GuiFunctions::ObjectBuildingGui::eval(), and GuiFunctions::AttackGui::eval().

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

Definition at line 111 of file guiiconhandler.cpp.

References GuiFunction::available(), callFunc(), and GuiFunction::checkForKey().

void GuiButton::unregisterFunc (  ) 

Definition at line 80 of file guiiconhandler.cpp.

Referenced by NewGuiHost::disableButtons().

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.

void GuiButton::showInfoText (  ) 

Definition at line 121 of file guiiconhandler.cpp.

References GuiFunction::getName().

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


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:
Generated on Mon May 21 01:46:49 2012 for Advanced Strategic Command by  doxygen 1.5.1