Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ToggleControl::RadioGroup Class Reference

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

#include <ToggleControl.h>

Inheritance diagram for ToggleControl::RadioGroup:

Detailed Description

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

Definition at line 16 of file ToggleControl.h.

List of all members.

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  )  [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  )  [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 [virtual]

returns the currently active control

Definition at line 34 of file ToggleControl.h.

virtual bool ToggleControl::RadioGroup::getEnforced (  )  const [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  )  [virtual]

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

Definition at line 36 of file ToggleControl.h.


Member Data Documentation

the currently active control, or NULL

Definition at line 40 of file ToggleControl.h.

Referenced by activate(), and getActive().

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(), and setEnforced().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:17 2016 by Doxygen 1.6.3