Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ToggleControl Class Reference

#include <ToggleControl.h>

Inheritance diagram for ToggleControl:

Inheritance graph
[legend]
List of all members.

Detailed Description

a simple control for turning things on and off

Can also be used for radio buttons - select one of a group

By using the externalStore (setStore()/getStore()), you can use this instead of a ValueEditControl<bool>

Definition at line 13 of file ToggleControl.h.

Public Member Functions

 ~ToggleControl ()
 destructor
virtual ControlBaseactivate (MotionManager::MC_ID mcid, Socket *disp)
 returns NULL
virtual ControlBasedoSelect ()
 returns NULL
virtual ControlBasesetName (const std::string &n)
 sets the name of the control
virtual void toggleStatus ()
 calls setStatus() with the not of getStatus()
virtual void toggleStatus (char c)
 if status is a ' ', it'll be replaced with c, otherwise a space.
virtual void toggleStatus (char c1, char c2)
 status will toggle between the two arguments; if current status is neither, the first is used
virtual void setStatus (bool check)
 a true will put a 'X' for the status; false shows ' '
virtual void setStatus (char c)
 pass the character to put as the status
virtual bool getStatus () const
 returns true if there's a non-space as the status
virtual char getStatusChar () const
 returns the current status char
virtual void setRadioGroup (RadioGroup *rad)
 removes itself from current RadioGroup, and adds itself to rad if non-NULL
virtual RadioGroupgetRadioGroup () const
 returns the current RadioGroup
virtual void setStore (bool *s)
 sets externalStore (and updates its current setting)
virtual bool * getStore () const
 returns externalStore
Constructors
 ToggleControl ()
 ToggleControl (const std::string &n, RadioGroup *rad=NULL)
 ToggleControl (const std::string &n, const std::string &d, RadioGroup *rad=NULL)

Protected Attributes

RadioGrouprg
 pointer to an optional radio group to allow one-of-many selections
bool * externalStore
 an external bit which should be kept in sync with current setting

Private Member Functions

 ToggleControl (const ToggleControl &)
 don't call
ToggleControloperator= (const ToggleControl &)
 don't call

Classes

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


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

Tekkotsu v3.0
Generated Fri May 11 20:08:53 2007 by Doxygen 1.4.7