Overview | All Modules | Tutorial | User's Guide | Programming Guide |
Previous | COVISE Online Documentation | Next |
This class provides a mechanism to implement radio buttons. More...
#include <coCheckboxGroup.h>
Public Member Functions | |
coCheckboxGroup (bool=false) | |
Constructor. More... | |
coCheckboxMenuItem * | getSelectedCheckbox () |
Returns a pointer to the item which selected most recently. More... | |
void | toggleCheckbox (coCheckboxMenuItem *checkbox) |
Change selection state of a coCheckboxMenuItem. More... | |
void | setState (coCheckboxMenuItem *checkbox, bool newState, bool generateEvent=false) |
Change selection state of a coCheckboxMenuItem. More... | |
void | add (coCheckboxMenuItem *checkbox) |
Add a coCheckboxMenuItem to the radio button group. More... | |
void | remove (coCheckboxMenuItem *checkbox) |
Remove a coCheckboxMenuItem from the radio button group. More... | |
bool | getAllowDeselect () const |
Returns true if all menu items of the group may be deselected at once, otherwise it returns false. More... | |
Protected Attributes | |
std::list< coCheckboxMenuItem * > | itemList |
list of items in the group More... | |
coCheckboxMenuItem * | selected |
pointer to selected checkbox More... | |
bool | allowDeselect |
true = all checkboxes can be deselected, false = exactly one checkbox is selected at any time More... | |
This class provides a mechanism to implement radio buttons.
coCheckboxMenuItems can be added to the group and thus are treated as radio buttons (only one item can be selected at a time). If the constructor is called with the argument true, all checkboxes of the group are be deselected if the checked item is clicked on.
vrui::coCheckboxGroup::coCheckboxGroup | ( | bool | ad = false | ) |
Constructor.
ad | true if all checkboxes may be deselected (optional, defaults to false) |
void vrui::coCheckboxGroup::add | ( | coCheckboxMenuItem * | item | ) |
Add a coCheckboxMenuItem to the radio button group.
item | item to add |
bool vrui::coCheckboxGroup::getAllowDeselect | ( | ) | const |
Returns true if all menu items of the group may be deselected at once, otherwise it returns false.
coCheckboxMenuItem * vrui::coCheckboxGroup::getSelectedCheckbox | ( | ) |
Returns a pointer to the item which selected most recently.
In case no item is seleted, it returns NULL.
void vrui::coCheckboxGroup::remove | ( | coCheckboxMenuItem * | item | ) |
Remove a coCheckboxMenuItem from the radio button group.
item | item to remove |
void vrui::coCheckboxGroup::setState | ( | coCheckboxMenuItem * | selection, |
bool | newState, | ||
bool | generateEvent = false |
||
) |
Change selection state of a coCheckboxMenuItem.
selection | coCheckboxMenuItem which was clicked on and thus should change its state |
newState | new state for selection |
generateEvent | if true, a menuEvent is generated |
void vrui::coCheckboxGroup::toggleCheckbox | ( | coCheckboxMenuItem * | selection | ) |
Change selection state of a coCheckboxMenuItem.
selection | coCheckboxMenuItem which was clicked on and thus should change its selection state |
|
protected |
true = all checkboxes can be deselected, false = exactly one checkbox is selected at any time
|
protected |
list of items in the group
|
protected |
pointer to selected checkbox
Previous | Next |
Authors: Martin Aumüller, Ruth Lang, Daniela Rainer, Jürgen Schulze-Döbold, Andreas Werner, Peter Wolf, Uwe Wössner |
Copyright © 1993-2009 HLRS, 2004-2009 RRZK, 2005-2009 Visenso |
COVISE Version 6.5 Academic
|