OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coSliderToolboxItem.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_SLIDER_TOOLBOX_ITEM_H
9 #define CO_SLIDER_TOOLBOX_ITEM_H
10 
12 #include <OpenVRUI/coSlider.h>
13 #include <OpenVRUI/coAction.h>
14 
15 #include <string>
16 
21 namespace vrui
22 {
23 
24 class OPENVRUIEXPORT coSliderToolboxItem
25  : public coToolboxMenuItem,
26  public coSliderActor,
27  public coAction
28 {
29 protected:
34 
35 public:
36  coSliderToolboxItem(const std::string &, float, float, float);
37  virtual ~coSliderToolboxItem();
38  virtual int hit(vruiHit *);
39  virtual void miss();
40  void setValue(float);
41  float getValue() const;
42  void setMin(float);
43  float getMin() const;
44  void setMax(float);
45  float getMax() const;
46  void setNumTicks(float);
47  float getNumTicks() const;
48  void setPrecision(int);
49  int getPrecision() const;
50  void setInteger(bool);
51  bool isInteger() const;
52  void setLabel(const std::string &labelstr);
53  void sliderEvent(coSlider *);
54  void sliderReleasedEvent(coSlider *);
55 
57  virtual const char *getClassName() const;
59  virtual bool isOfClassName(const char *) const;
60 
62  virtual void setActive(bool a);
63 
64  virtual void selected(bool select);
65  virtual void doActionPress();
66  virtual void doSecondActionPress();
67 };
68 }
69 #endif
Definition: vruiHit.h:20
Definition: coAction.h:25
Definition: coSlider.h:37
Definition: coSliderToolboxItem.h:24
Definition: coLabel.h:25
Definition: coToolboxMenuItem.h:24
coLabel * minLabel
Definition: coSliderToolboxItem.h:31
coLabel * label
Definition: coSliderToolboxItem.h:33
coLabel * maxLabel
Definition: coSliderToolboxItem.h:32
coSlider * slider
slider UI element
Definition: coSliderToolboxItem.h:30
Action listener for events triggered by coSlider.
Definition: coSlider.h:24