Overview | All Modules | Tutorial | User's Guide | Programming Guide
Previous

COVISE Online Documentation

Next

Public Member Functions | Protected Attributes | List of all members
vrui::coCheckboxGroup Class Reference

This class provides a mechanism to implement radio buttons. More...

#include <coCheckboxGroup.h>

Public Member Functions

 coCheckboxGroup (bool=false)
 Constructor. More...
 
coCheckboxMenuItemgetSelectedCheckbox ()
 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...
 
coCheckboxMenuItemselected
 pointer to selected checkbox More...
 
bool allowDeselect
 true = all checkboxes can be deselected, false = exactly one checkbox is selected at any time More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ coCheckboxGroup()

vrui::coCheckboxGroup::coCheckboxGroup ( bool  ad = false)

Constructor.

Parameters
adtrue if all checkboxes may be deselected (optional, defaults to false)

Member Function Documentation

◆ add()

void vrui::coCheckboxGroup::add ( coCheckboxMenuItem item)

Add a coCheckboxMenuItem to the radio button group.

Parameters
itemitem to add

◆ getAllowDeselect()

bool vrui::coCheckboxGroup::getAllowDeselect ( ) const

Returns true if all menu items of the group may be deselected at once, otherwise it returns false.

◆ getSelectedCheckbox()

coCheckboxMenuItem * vrui::coCheckboxGroup::getSelectedCheckbox ( )

Returns a pointer to the item which selected most recently.

In case no item is seleted, it returns NULL.

◆ remove()

void vrui::coCheckboxGroup::remove ( coCheckboxMenuItem item)

Remove a coCheckboxMenuItem from the radio button group.

Parameters
itemitem to remove

◆ setState()

void vrui::coCheckboxGroup::setState ( coCheckboxMenuItem selection,
bool  newState,
bool  generateEvent = false 
)

Change selection state of a coCheckboxMenuItem.

Parameters
selectioncoCheckboxMenuItem which was clicked on and thus should change its state
newStatenew state for selection
generateEventif true, a menuEvent is generated

◆ toggleCheckbox()

void vrui::coCheckboxGroup::toggleCheckbox ( coCheckboxMenuItem selection)

Change selection state of a coCheckboxMenuItem.

Parameters
selectioncoCheckboxMenuItem which was clicked on and thus should change its selection state

Member Data Documentation

◆ allowDeselect

bool vrui::coCheckboxGroup::allowDeselect
protected

true = all checkboxes can be deselected, false = exactly one checkbox is selected at any time

◆ itemList

std::list<coCheckboxMenuItem *> vrui::coCheckboxGroup::itemList
protected

list of items in the group

◆ selected

coCheckboxMenuItem* vrui::coCheckboxGroup::selected
protected

pointer to selected checkbox


The documentation for this class was generated from the following files:
PreviousNext

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