Homepage Demos Overview Downloads Tutorials Reference
Credits

ToggleControl::RadioGroup Class Reference

#include <ToggleControl.h>

Inheritance diagram for ToggleControl::RadioGroup:

Inheritance graph
[legend]
List of all members.

Detailed Description

a little class for managing the currently active ToggleControl to allow radio buttons

Definition at line 16 of file ToggleControl.h.

Public Member Functions

 RadioGroup (bool must_have_one=true)
 constructor
virtual void activate (ToggleControl *next)
 call this when a different ToggleControl wants to take over
virtual ToggleControlgetActive () const
 returns the currently active control
virtual void setEnforced (bool must_have_one)
 can change the "must have one" setting (enforced)
virtual bool getEnforced () const
 returns the "must have one" setting (enforced)

Protected Attributes

ToggleControlcur
 the currently active control, or NULL
bool enforced
 if true, the current control cannot turn off, a new one must be activated

Private Member Functions

 RadioGroup (const RadioGroup &)
 don't call
RadioGroupoperator= (const RadioGroup &)
 don't call


Constructor & Destructor Documentation

ToggleControl::RadioGroup::RadioGroup bool  must_have_one = true  )  [inline, explicit]
 

constructor

Definition at line 19 of file ToggleControl.h.

ToggleControl::RadioGroup::RadioGroup const RadioGroup  )  [private]
 

don't call


Member Function Documentation

virtual void ToggleControl::RadioGroup::activate ToggleControl next  )  [inline, virtual]
 

call this when a different ToggleControl wants to take over

implementation is trickier than you might think!

Definition at line 22 of file ToggleControl.h.

Referenced by ToggleControl::setRadioGroup(), and ToggleControl::setStatus().

virtual ToggleControl* ToggleControl::RadioGroup::getActive  )  const [inline, virtual]
 

returns the currently active control

Definition at line 34 of file ToggleControl.h.

virtual bool ToggleControl::RadioGroup::getEnforced  )  const [inline, virtual]
 

returns the "must have one" setting (enforced)

Definition at line 38 of file ToggleControl.h.

Referenced by ToggleControl::setStatus().

RadioGroup& ToggleControl::RadioGroup::operator= const RadioGroup  )  [private]
 

don't call

virtual void ToggleControl::RadioGroup::setEnforced bool  must_have_one  )  [inline, virtual]
 

can change the "must have one" setting (enforced)

Definition at line 36 of file ToggleControl.h.


Member Data Documentation

ToggleControl* ToggleControl::RadioGroup::cur [protected]
 

the currently active control, or NULL

Definition at line 40 of file ToggleControl.h.

Referenced by activate(), getActive(), and RadioGroup().

bool ToggleControl::RadioGroup::enforced [protected]
 

if true, the current control cannot turn off, a new one must be activated

Definition at line 41 of file ToggleControl.h.

Referenced by activate(), getEnforced(), RadioGroup(), and setEnforced().


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

Tekkotsu v2.2.2
Generated Tue Jan 4 15:45:34 2005 by Doxygen 1.4.0