![]() |
VR-Forces 4.3 Class Documentation
|
The osg implementation of a label. More...

Public Member Functions | |
| DtOsgWidgetLabel (DtDe &de, DtUniqueID id) | |
| CTOR. | |
| virtual | ~DtOsgWidgetLabel () |
| Virtual DTOR. | |
| virtual void | setOverlay (unsigned int layer) |
| Sets the z layer of the widget. | |
| virtual unsigned int | overlay () const |
| Gets the overlay of the widget. | |
| virtual void | setOrderGroup (unsigned int group) |
| Sets the overlay of the widget. | |
| virtual unsigned int | orderGroup () const |
| Gets the overlay of the widget. | |
| virtual void | setPosition (float x, float y, float z, float w=0) |
| Set the position of the widget in screen space. | |
| virtual void | setText (const DtUnicode &string) |
| Set the labels string. | |
| virtual void | setFont (const std::string &font, float size) |
| Sets the font size. | |
| virtual void | setFontScale (float scale) |
| Set the font scale for the label. | |
| virtual float | fontScale () const |
| Gets the font scale. | |
| virtual void | setBackgroundImage (const std::string &filename) |
| Set the background image. | |
| virtual void | setBackgroundImage (const std::string &filename, float left, float right, float bottom, float top) |
| virtual void | setTextColor (float r, float g, float b, float a) |
| Set the text color. | |
| virtual void | setColor (float r, float g, float b, float a) |
| Set the color of the widget. | |
| virtual void | setOrigin (float originX, float originY) |
| Sets the origin location, by default it is 0,0. | |
| virtual void | setSize (float w, float h) |
| Sets the size of the widget in overlay coordinate space. | |
| virtual void | getSize (float &width, float &height) |
| Returns the size of the widget set by setSize. | |
| virtual void | setPadding (float paddingX, float paddingY) |
| Sets the size of the widget in overlay coordinate space. | |
| virtual void | setModelDefinition (const std::string &str) |
| Set the widget's model definition ("theme") | |
| virtual void | setTextAlignment (DtWidgetLabel::HorizontalAlignment ha) |
| Set the text's alignment. | |
| virtual void | setGlyphCenterPolicy (DtWidgetLabel::GlyphCenterPolicy gcp) |
| Sets the policy for how the glyph is located wrt its origin. | |
| virtual void | setEventsEnabled (bool enabled) |
| Enable or disable event handling for this widget. | |
| virtual void | setVisible (bool visible) |
| Set the widget visible or hidden. | |
| virtual void | setBoundsLength (int len) |
| Sets the length of the string to check when determining bounds. | |
| virtual void | setRotation (float angle) |
| Sets the rotation applied to the label. | |
| virtual double | getRotation () const |
| Return the current rotation. | |
| virtual void | setSizeConstraints (SizeConstraints) |
| Sets the constraint of the text box. | |
Public Member Functions inherited from makVrv::DtWidgetLabel | |
| DtWidgetLabel (DtDe &de, DtUniqueID id) | |
| A widget label CTOR. | |
| virtual | ~DtWidgetLabel () |
| DTOR. | |
| virtual void | setSizeConstraints (SizeConstraints)=0 |
| Sets the constraint of the text box. | |
Public Member Functions inherited from makVrv::DtWidget | |
| DtWidget (DtDe &de, DtUniqueID id) | |
| virtual | ~DtWidget () |
| virtual void | setParentId (DtUniqueID id) |
| Set the parent id. | |
Protected Member Functions | |
| void | updateBounds (bool calculateText) |
| void | updateTextBounds (DtBoundingBox box, bool calculateText) |
| void | updateFont (const std::string &font) |
Protected Attributes | |
| osg::ref_ptr< osg::Texture > | myTexture |
| DtSprite * | mySprite |
| DtTextProxy * | myText |
| DtBoundingBox | myTextBounds |
| unsigned int | myOverlay |
| float | myWidth |
| float | myHeight |
| float | myOriginX |
| float | myOriginY |
| float | myPaddingX |
| float | myPaddingY |
| float | myRotation |
| unsigned int | myGroup |
| float | myFontScale |
| int | myFontSize |
| int | myBoundsLength |
| GlyphCenterPolicy | myCenterPolicy |
| SizeConstraints | mySizeConstraints |
Additional Inherited Members | |
Public Types inherited from makVrv::DtWidgetLabel | |
| enum | HorizontalAlignment { AlignLeft, AlignCenter, AlignRight, AlignJustify } |
| enum | GlyphCenterPolicy { CenterNone, CenterHorizontal, CenterVertical, CenterBoth, AlignToTextHeight } |
| enum | SizeConstraints { ConstrainToText, ConstrainToBounds } |
The osg implementation of a label.
| makVrv::DtOsgWidgetLabel::DtOsgWidgetLabel | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
CTOR.
|
virtual |
Virtual DTOR.
|
virtual |
Sets the z layer of the widget.
Implements makVrv::DtWidget.
|
virtual |
Gets the overlay of the widget.
Implements makVrv::DtWidget.
|
virtual |
Sets the overlay of the widget.
Implements makVrv::DtWidget.
|
virtual |
Gets the overlay of the widget.
Implements makVrv::DtWidget.
|
virtual |
Set the position of the widget in screen space.
Implements makVrv::DtWidget.
|
virtual |
Set the labels string.
Labels support multi lines when the string contains new line characters.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the font size.
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the font scale for the label.
Implements makVrv::DtWidgetLabel.
|
virtual |
Gets the font scale.
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the background image.
Implements makVrv::DtWidget.
|
virtual |
|
virtual |
Set the text color.
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the color of the widget.
Implements makVrv::DtWidget.
|
virtual |
Sets the origin location, by default it is 0,0.
The origin can be used to specify a offset from the position.
Implements makVrv::DtWidget.
|
virtual |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidgetLabel.
|
virtual |
Returns the size of the widget set by setSize.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidget.
|
virtual |
Set the widget's model definition ("theme")
Implements makVrv::DtWidget.
|
virtual |
Set the text's alignment.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the policy for how the glyph is located wrt its origin.
Implements makVrv::DtWidgetLabel.
|
virtual |
Enable or disable event handling for this widget.
Implements makVrv::DtWidget.
|
virtual |
Set the widget visible or hidden.
Implements makVrv::DtWidget.
|
virtual |
Sets the length of the string to check when determining bounds.
This is useful when needing text to line up.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the rotation applied to the label.
Implements makVrv::DtWidgetLabel.
|
virtual |
Return the current rotation.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the constraint of the text box.
SizeToText is default. SizeToBounds will bound text to values set in setSize
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |