OpenCOVER
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
21namespace vrui
22{
23
24class OPENVRUIEXPORT coSliderToolboxItem
25 : public coToolboxMenuItem,
26 public coSliderActor,
27 public coAction
28{
29protected:
34
35public:
36 coSliderToolboxItem(const std::string &, float, float, float);
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 setLogarithmic(bool);
53 bool isLogarithmic() const;
54 void setLabel(const std::string &labelstr);
57
59 virtual const char *getClassName() const;
61 virtual bool isOfClassName(const char *) const;
62
64 virtual void setActive(bool a);
65
66 virtual void selected(bool select);
67 virtual void doActionPress();
68 virtual void doSecondActionPress();
69};
70}
71#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coAction.h:26
Definition: coLabel.h:26
Action listener for events triggered by coSlider.
Definition: coSlider.h:25
Definition: coSlider.h:38
Definition: coSliderToolboxItem.h:28
virtual void doSecondActionPress()
second Action for Item
virtual bool isOfClassName(const char *) const
check if the Element or any ancestor is this classname
void sliderReleasedEvent(coSlider *)
coSlider * slider
slider UI element
Definition: coSliderToolboxItem.h:30
coSliderToolboxItem(const std::string &, float, float, float)
void sliderEvent(coSlider *)
coLabel * maxLabel
Definition: coSliderToolboxItem.h:32
virtual void selected(bool select)
MenuItem is selected via joystick.
virtual const char * getClassName() const
get the Element's classname
coLabel * minLabel
Definition: coSliderToolboxItem.h:31
coLabel * label
Definition: coSliderToolboxItem.h:33
virtual int hit(vruiHit *)
virtual void doActionPress()
Action is called via joystick.
virtual void setActive(bool a)
functions activates or deactivates the item
void setLabel(const std::string &labelstr)
this function may be overloaded - it is called by setName()
Definition: coToolboxMenuItem.h:26
Definition: vruiHit.h:21