OpenCOVER
coButtonGeometry.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_BUTTON_GEOMETRY_H
9#define CO_BUTTON_GEOMETRY_H
10#ifdef _WIN32
11typedef unsigned short ushort;
12#endif
13#include <util/coTypes.h>
14#include <string>
15
16namespace vrui
17{
18
19class vruiButtonProvider;
20class vruiTransformNode;
21
26class OPENVRUIEXPORT coButtonGeometry
27{
28public:
29 coButtonGeometry(const std::string &texture);
31
33 {
34 NORMAL = 0,
38 DISABLED
39 };
40
41 virtual float getWidth() const;
42 virtual float getHeight() const;
44 virtual void switchGeometry(ActiveGeometry active);
45
46 virtual const std::string &getTextureName() const
47 {
48 return texture;
49 }
50
51 virtual void createGeometry();
52 virtual void resizeGeometry();
53
55 virtual const char *getClassName() const;
57 virtual bool isOfClassName(const char *) const;
58
60
62 {
63 return buttonGeometryProvider;
64 }
65
66protected:
67 std::string texture;
69};
70}
71#endif
unsigned short ushort
abbreviation for unsigned short
Definition: rel_mcast-old.h:76
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coButtonGeometry.h:27
virtual void resizeGeometry()
coButtonGeometry(const std::string &texture)
virtual const char * getClassName() const
get the Element's classname
virtual void createGeometry()
virtual vruiTransformNode * getDCS()
vruiButtonProvider * buttonGeometryProvider
Definition: coButtonGeometry.h:68
ActiveGeometry
Definition: coButtonGeometry.h:33
@ HIGHLIGHT_PRESSED
Definition: coButtonGeometry.h:37
@ HIGHLIGHT
Definition: coButtonGeometry.h:36
@ PRESSED
Definition: coButtonGeometry.h:35
virtual bool isOfClassName(const char *) const
check if the Element or any ancestor is this classname
virtual void switchGeometry(ActiveGeometry active)
virtual float getWidth() const
get width of this geometry
virtual float getHeight() const
Switch the shown geometry.
virtual vruiButtonProvider * getButtonProvider() const
Definition: coButtonGeometry.h:61
virtual const std::string & getTextureName() const
Definition: coButtonGeometry.h:46
std::string texture
name of the texture file
Definition: coButtonGeometry.h:67
Definition: vruiButtonProvider.h:21
Definition: vruiTransformNode.h:18