OpenCOVER
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
25namespace vrui
26{
27
29{
30public:
33
35
36 virtual void createGeometry();
37 virtual void resizeGeometry();
38
40
41 virtual float getWidth() const;
42 virtual float getHeight() const;
43
44protected:
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
collaborative interface manager
Definition: coVRCommunication.h:41
ActiveGeometry
Definition: coButtonGeometry.h:33
Definition: coDefaultButtonGeometry.h:19
Definition: vruiButtonProvider.h:21
Definition: vruiTransformNode.h:18
Definition: OSGVruiDefaultButtonGeometry.h:29
osg::ref_ptr< osg::Node > pressedNode
pressed normal geometry
Definition: OSGVruiDefaultButtonGeometry.h:46
osg::ref_ptr< osgText::Text > createText(const std::string &text, osgText::Text::AlignmentType align, float size)
osg::ref_ptr< osg::Node > disabledNode
disabled geometry
Definition: OSGVruiDefaultButtonGeometry.h:49
osg::ref_ptr< osg::Node > normalNode
normal geometry
Definition: OSGVruiDefaultButtonGeometry.h:45
vruiTransformNode * myDCS
Definition: OSGVruiDefaultButtonGeometry.h:53
osg::ref_ptr< osg::Node > highlightNode
highlighted geometry
Definition: OSGVruiDefaultButtonGeometry.h:47
virtual vruiTransformNode * getDCS()
osg::ref_ptr< osg::StateSet > createGeoState(bool highlighted)
virtual float getHeight() const
osg::ref_ptr< osg::Node > pressedHighlightNode
pressed highlighted geometry
Definition: OSGVruiDefaultButtonGeometry.h:48
OSGVruiDefaultButtonGeometry(coDefaultButtonGeometry *geometry)
osg::ref_ptr< osg::Node > createNode(bool pressed, bool highlighted, bool disabled=false)
virtual float getWidth() const
std::string textString
Definition: OSGVruiDefaultButtonGeometry.h:58
osg::ref_ptr< osg::Switch > switchNode
Definition: OSGVruiDefaultButtonGeometry.h:51
virtual void switchGeometry(coButtonGeometry::ActiveGeometry active)