Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PG_CheckButton Class Reference

A single check button. More...

#include <pgcheckbutton.h>

Inheritance diagram for PG_CheckButton:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PG_CheckButton (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const std::string &text=PG_NULLSTR, int id=-1, const std::string &style="CheckButton")
 construct a PG_CheckButton object
 ~PG_CheckButton ()
void SetUnpressed ()
 Set the state of the checkbutton to unpressed.

Protected Member Functions

bool eventMouseButtonUp (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.

Detailed Description

A single check button.

Author:
Alexander Pipelka
pgcheckbutton.png

pgcheckbutton screenshot

Definition at line 46 of file pgcheckbutton.h.


Constructor & Destructor Documentation

PG_CheckButton::PG_CheckButton PG_Widget parent,
const PG_Rect r = PG_Rect::null,
const std::string &  text = PG_NULLSTR,
int  id = -1,
const std::string &  style = "CheckButton"
 

construct a PG_CheckButton object

Parameters:
parent Pointer to the parent widget of NULL
id id of the checkbutton (can be 0 if you don't need a unique id)
r position of the checkbutton
text inital text of the chekbutton
style widget style (loaded from theme) to use

Definition at line 32 of file pgcheckbutton.cpp.

References PG_Button::LoadThemeStyle(), PG_RadioButton::LoadThemeStyle(), PG_RadioButton::my_widgetButton, and SetUnpressed().

PG_CheckButton::~PG_CheckButton  ) 
 

Definition at line 40 of file pgcheckbutton.cpp.


Member Function Documentation

bool PG_CheckButton::eventMouseButtonUp const SDL_MouseButtonEvent *  button  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button SDL_MouseButtonEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_RadioButton.

Definition at line 42 of file pgcheckbutton.cpp.

References PG_RadioButton::my_isPressed, PG_RadioButton::SetPressed(), and SetUnpressed().

void PG_CheckButton::SetUnpressed  ) 
 

Set the state of the checkbutton to unpressed.

Definition at line 55 of file pgcheckbutton.cpp.

References PG_RadioButton::my_isPressed, PG_RadioButton::my_widgetButton, PG_Button::SetPressed(), PG_RadioButton::sigClick, and PG_Widget::Update().

Referenced by eventMouseButtonUp(), PG_CheckButton(), PG_PropertyField_Checkbox< B >::PG_PropertyField_Checkbox(), PG_PropertyField_Checkbox< B >::Reload(), SoundSettings::SoundSettings(), and StartMultiplayerGame::StartMultiplayerGame().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:18:49 2008 for Advanced Strategic Command by  doxygen 1.4.2