OpenCOVER
OSGVruiLabel.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_LABEL_H
9#define OSG_VRUI_LABEL_H
10
12
13#include <osg/StateSet>
14#include <osgText/Text>
15
16namespace vrui
17{
18
19class coLabel;
20
25class OSGVRUIEXPORT OSGVruiLabel : public OSGVruiUIElement
26{
27public:
29 virtual ~OSGVruiLabel();
30
31 virtual void createGeometry();
32
33 virtual void resizeGeometry();
34
35 virtual void update();
36
37 virtual float getWidth() const;
38 virtual float getHeight() const;
39 virtual float getDepth() const;
40
41 virtual void setHighlighted(bool highlighted);
42
43protected:
45
46 osg::Vec4 textColor;
47 osg::Vec4 textColorHL;
48
50 osg::ref_ptr<osg::StateSet> backgroundTextureState;
51 osg::ref_ptr<osgText::Text> labelText;
52
53 void makeText();
54};
55}
56#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coLabel.h:26
Definition: OSGVruiLabel.h:26
virtual float getHeight() const
virtual ~OSGVruiLabel()
virtual float getDepth() const
virtual void resizeGeometry()
osg::Vec4 textColor
components of text color (RGBA)
Definition: OSGVruiLabel.h:46
OSGVruiLabel(coLabel *label)
coLabel * label
Definition: OSGVruiLabel.h:44
osg::Vec4 textColorHL
components of text color when highlighted (RGBA)
Definition: OSGVruiLabel.h:47
virtual void update()
osg::ref_ptr< osgText::Text > labelText
label text string in OSG format
Definition: OSGVruiLabel.h:51
virtual float getWidth() const
virtual void createGeometry()
osg::ref_ptr< osg::StateSet > backgroundTextureState
Definition: OSGVruiLabel.h:50
virtual void setHighlighted(bool highlighted)
Definition: OSGVruiUIElement.h:21