OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OSGVruiDefaultButtonGeometry.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 OSG_VRUI_DEFAULT_BUTTON_GEOMETRY_H
9 #define OSG_VRUI_DEFAULT_BUTTON_GEOMETRY_H
10 
13 
15 
16 #include <osg/Switch>
17 #include <osg/StateSet>
18 #include <osg/Material>
19 #include <osg/Sequence>
20 #include <osg/Texture>
21 #include <osgText/Text>
22 
23 #include <string>
24 
25 namespace vrui
26 {
27 
29 {
30 public:
33 
34  virtual void switchGeometry(coButtonGeometry::ActiveGeometry active);
35 
36  virtual void createGeometry();
37  virtual void resizeGeometry();
38 
39  virtual vruiTransformNode *getDCS();
40 
41  virtual float getWidth() const;
42  virtual float getHeight() const;
43 
44 protected:
45  osg::ref_ptr<osg::Node> normalNode;
46  osg::ref_ptr<osg::Node> pressedNode;
47  osg::ref_ptr<osg::Node> highlightNode;
48  osg::ref_ptr<osg::Node> pressedHighlightNode;
49  osg::ref_ptr<osg::Node> disabledNode;
50 
51  osg::ref_ptr<osg::Switch> switchNode;
52 
54 
55  osg::ref_ptr<osg::Node> createNode(bool pressed, bool highlighted, bool disabled = false);
56  osg::ref_ptr<osg::StateSet> createGeoState(bool highlighted);
57 
58  std::string textString;
59 
60  osg::ref_ptr<osgText::Text> createText(const std::string &text,
61  osgText::Text::AlignmentType align, float size);
62 };
63 }
64 #endif
Definition: coDefaultButtonGeometry.h:18
Definition: OSGVruiDefaultButtonGeometry.h:28
Definition: vruiTransformNode.h:17
Definition: vruiButtonProvider.h:20
osg::ref_ptr< osg::Switch > switchNode
Definition: OSGVruiDefaultButtonGeometry.h:51
osg::ref_ptr< osg::Node > normalNode
normal geometry
Definition: OSGVruiDefaultButtonGeometry.h:45
osg::ref_ptr< osg::Node > disabledNode
disabled geometry
Definition: OSGVruiDefaultButtonGeometry.h:49
ActiveGeometry
Definition: coButtonGeometry.h:32
osg::ref_ptr< osg::Node > pressedNode
pressed normal geometry
Definition: OSGVruiDefaultButtonGeometry.h:46
osg::ref_ptr< osg::Node > highlightNode
highlighted geometry
Definition: OSGVruiDefaultButtonGeometry.h:47
vruiTransformNode * myDCS
Definition: OSGVruiDefaultButtonGeometry.h:53
std::string textString
Definition: OSGVruiDefaultButtonGeometry.h:58
osg::ref_ptr< osg::Node > pressedHighlightNode
pressed highlighted geometry
Definition: OSGVruiDefaultButtonGeometry.h:48