OpenCOVER
coPotiMenuItem.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_POTIMENUITEM_H
9#define CO_POTIMENUITEM_H
10
11#include <OpenVRUI/coAction.h>
14
15#include <string>
16
19namespace vrui
20{
21
22class OPENVRUIEXPORT coPotiMenuItem
23 : public coRowMenuItem,
24 public coValuePotiActor,
25 public coAction
26{
27public:
28 coPotiMenuItem(const std::string &name, float min, float max, float defaultValue,
29 vruiCOIM *iManager = 0, const std::string &interfaceName = "");
30 virtual ~coPotiMenuItem();
31
32 void setValue(float v);
33 float getValue() const;
34
35 void setMax(float m);
36 void setMin(float m);
37 void setInteger(bool i);
38 void setIncrement(float incr);
39 void setLogarithmic(bool on);
40
41 float getMax() const;
42 float getMin() const;
43 bool isInteger() const;
44 bool isDiscrete() const;
45 bool isLogarithmic() const;
46
47 int hit(vruiHit *hit);
48 void miss();
49
50 virtual void selected(bool);
51 virtual void doActionPress();
52 virtual void doSecondActionPress();
53
54 virtual void potiValueChanged(float, float, coValuePoti *, int context = -1);
55 virtual void potiPressed(coValuePoti *, int context = -1);
56 virtual void potiReleased(coValuePoti *, int context = -1);
57
59 virtual const char *getClassName() const;
61 virtual bool isOfClassName(const char *) const;
62
63protected:
65};
66}
67#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coAction.h:26
Definition: coPotiMenuItem.h:26
virtual void potiValueChanged(float, float, coValuePoti *, int context=-1)
virtual void potiPressed(coValuePoti *, int context=-1)
virtual void selected(bool)
MenuItem is selected via joystick.
void setValue(float v)
float getValue() const
virtual bool isOfClassName(const char *) const
check if the Element or any ancestor is this classname
virtual const char * getClassName() const
get the Element's classname
void setIncrement(float incr)
virtual void potiReleased(coValuePoti *, int context=-1)
virtual ~coPotiMenuItem()
void setMin(float m)
void setInteger(bool i)
float getMin() const
void setMax(float m)
void setLogarithmic(bool on)
int hit(vruiHit *hit)
virtual void doSecondActionPress()
second Action for Item
float getMax() const
bool isDiscrete() const
coValuePoti * poti
actual poti interactor
Definition: coPotiMenuItem.h:64
coPotiMenuItem(const std::string &name, float min, float max, float defaultValue, vruiCOIM *iManager=0, const std::string &interfaceName="")
virtual void doActionPress()
Action is called via joystick.
bool isInteger() const
bool isLogarithmic() const
Definition: coRowMenuItem.h:31
Definition: coValuePoti.h:31
Definition: coValuePoti.h:66
Definition: vruiCollabInterface.h:28
Definition: vruiHit.h:21