OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coCheckboxGroup.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef CO_CHECKBOXGROUP_H
9 #define CO_CHECKBOXGROUP_H
10 
11 #include <util/coTypes.h>
12 
13 #include <list>
14 
15 namespace vrui
16 {
17 
18 class coCheckboxMenuItem;
19 
26 class OPENVRUIEXPORT coCheckboxGroup
27 {
28 protected:
29  std::list<coCheckboxMenuItem *> itemList;
32 
33 public:
34  coCheckboxGroup(bool = false);
35  coCheckboxMenuItem *getSelectedCheckbox();
36  void toggleCheckbox(coCheckboxMenuItem *checkbox);
37  void setState(coCheckboxMenuItem *checkbox, bool newState, bool generateEvent = false);
38  void add(coCheckboxMenuItem *checkbox);
39  void remove(coCheckboxMenuItem *checkbox);
40  bool getAllowDeselect() const;
41 };
42 }
43 #endif
Definition: coCheckboxMenuItem.h:30
bool allowDeselect
true = all checkboxes can be deselected, false = exactly one checkbox is selected at any time ...
Definition: coCheckboxGroup.h:31
std::list< coCheckboxMenuItem * > itemList
list of items in the group
Definition: coCheckboxGroup.h:29
coCheckboxMenuItem * selected
pointer to selected checkbox
Definition: coCheckboxGroup.h:30
Definition: coCheckboxGroup.h:26