OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coButtonInteraction.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_BUTTONINTERACTION_H
9 #define CO_BUTTONINTERACTION_H
10 
11 #include <OpenVRUI/coInteraction.h>
13 
14 namespace vrui
15 {
16 
17 class vruiButtons;
18 
19 class OPENVRUIEXPORT coButtonInteraction
20  : public coInteraction
21 {
22 public:
23  coButtonInteraction(InteractionType type, const std::string &name, InteractionPriority priority = Medium);
24  virtual ~coButtonInteraction();
25 
26  virtual void update();
27  virtual void startInteraction();
28  virtual void stopInteraction();
29  virtual void doInteraction();
30  virtual void cancelInteraction();
31  virtual void resetState();
32 
33  int getWheelCount() const;
34 
35 protected:
36  virtual bool conditionMet() const;
37  virtual bool conditionBecameMet() const;
38 
39  void updateState(vruiButtons *button);
40 
41  unsigned buttonmask = 0;
42  int wheelCount = 0;
43 
44  vruiButtons *button = nullptr;
45 };
46 }
47 #endif
Definition: vruiButtons.h:17
Definition: coButtonInteraction.h:19
Definition: coInteraction.h:17
InteractionType
Definition: coInteraction.h:44
InteractionPriority
Definition: coInteraction.h:33