OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
11 typedef unsigned short ushort;
12 #endif
13 #include <util/coTypes.h>
14 #include <string>
15 
16 namespace vrui
17 {
18 
19 class vruiButtonProvider;
20 class vruiTransformNode;
21 
26 class OPENVRUIEXPORT coButtonGeometry
27 {
28 public:
29  coButtonGeometry(const std::string &texture);
30  virtual ~coButtonGeometry();
31 
33  {
34  NORMAL = 0,
38  DISABLED
39  };
40 
41  virtual float getWidth() const;
42  virtual float getHeight() const;
43  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 
59  virtual vruiTransformNode *getDCS();
60 
62  {
63  return buttonGeometryProvider;
64  }
65 
66 protected:
67  std::string texture;
69 };
70 }
71 #endif
Definition: vruiTransformNode.h:17
vruiButtonProvider * buttonGeometryProvider
Definition: coButtonGeometry.h:68
Definition: vruiButtonProvider.h:20
virtual vruiButtonProvider * getButtonProvider() const
Definition: coButtonGeometry.h:61
ActiveGeometry
Definition: coButtonGeometry.h:32
std::string texture
name of the texture file
Definition: coButtonGeometry.h:67
Definition: coButtonGeometry.h:36
Definition: coButtonGeometry.h:26
Definition: coButtonGeometry.h:35
unsigned short ushort
abbreviation for unsigned short
Definition: rel_mcast-old.h:76
Definition: coButtonGeometry.h:37
virtual const std::string & getTextureName() const
Definition: coButtonGeometry.h:46