SCV  4.2.1
Simple Components for Visual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StateButton.h
Go to the documentation of this file.
1 
7 #ifndef __SCV_STATEBUTTON_H__
8 #define __SCV_STATEBUTTON_H__
9 
10 #ifndef DOXYGEN_SKIP_THIS
11 #include "ButtonGroup.h"
12 #endif // DOXYGEN_SKIP_THIS
13 
14 namespace scv {
15 
17 class StateButton {
18 friend class ButtonGroup;
19 public:
20 
21  /************************************************************************/
22  /* Constructors */
23  /************************************************************************/
24  StateButton(bool state);
25 
26  /************************************************************************/
27  /* User Functions */
28  /************************************************************************/
29  bool getState(void) const;
30  void setState(bool state);
34  void registerButtonGroup(ButtonGroup *buttonGroup);
35 
36  /************************************************************************/
37  /* Restrict Functions */
38  /************************************************************************/
42  virtual void onValueChange(void) = 0;
43 
44 private:
45 
46  bool _state;
47  ButtonGroup *_buttonGroup;
48 };
49 
50 } // namespace scv
51 
52 #endif // __SCV_STATEBUTTON_H__