![]() |
VR-Forces 4.0.4 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. | |
| int | 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 | 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. | |
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 |
The osg implementation of a label.
| makVrv::DtOsgWidgetLabel::DtOsgWidgetLabel | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
CTOR.
| virtual makVrv::DtOsgWidgetLabel::~DtOsgWidgetLabel | ( | ) | [virtual] |
Virtual DTOR.
| virtual void makVrv::DtOsgWidgetLabel::setOverlay | ( | unsigned int | layer | ) | [virtual] |
Sets the z layer of the widget.
Implements makVrv::DtWidget.
| virtual unsigned int makVrv::DtOsgWidgetLabel::overlay | ( | ) | const [virtual] |
Gets the overlay of the widget.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setOrderGroup | ( | unsigned int | group | ) | [virtual] |
Sets the overlay of the widget.
Implements makVrv::DtWidget.
| virtual unsigned int makVrv::DtOsgWidgetLabel::orderGroup | ( | ) | const [virtual] |
Gets the overlay of the widget.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setPosition | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w = 0 |
||
| ) | [virtual] |
Set the position of the widget in screen space.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setText | ( | const DtUnicode & | string | ) | [virtual] |
Set the labels string.
Labels support multi lines when the string contains new line characters.
Implements makVrv::DtWidgetLabel.
| virtual void makVrv::DtOsgWidgetLabel::setFont | ( | const std::string & | font, |
| float | size | ||
| ) | [virtual] |
Sets the font size.
Implements makVrv::DtWidgetLabel.
| virtual void makVrv::DtOsgWidgetLabel::setFontScale | ( | float | scale | ) | [virtual] |
Set the font scale for the label.
Implements makVrv::DtWidgetLabel.
| int makVrv::DtOsgWidgetLabel::fontScale | ( | ) | const |
Gets the font scale.
| virtual void makVrv::DtOsgWidgetLabel::setBackgroundImage | ( | const std::string & | filename | ) | [virtual] |
Set the background image.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setBackgroundImage | ( | const std::string & | filename, |
| float | left, | ||
| float | right, | ||
| float | bottom, | ||
| float | top | ||
| ) | [virtual] |
| virtual void makVrv::DtOsgWidgetLabel::setTextColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [virtual] |
Set the text color.
Implements makVrv::DtWidgetLabel.
| virtual void makVrv::DtOsgWidgetLabel::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [virtual] |
Set the color of the widget.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setOrigin | ( | float | originX, |
| float | originY | ||
| ) | [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 void makVrv::DtOsgWidgetLabel::setSize | ( | float | w, |
| float | h | ||
| ) | [virtual] |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setPadding | ( | float | paddingX, |
| float | paddingY | ||
| ) | [virtual] |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setModelDefinition | ( | const std::string & | str | ) | [virtual] |
Set the widget's model definition ("theme")
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setTextAlignment | ( | DtWidgetLabel::HorizontalAlignment | ha | ) | [virtual] |
Set the text's alignment.
Implements makVrv::DtWidgetLabel.
| virtual void makVrv::DtOsgWidgetLabel::setGlyphCenterPolicy | ( | DtWidgetLabel::GlyphCenterPolicy | gcp | ) | [virtual] |
Sets the policy for how the glyph is located wrt its origin.
Implements makVrv::DtWidgetLabel.
| virtual void makVrv::DtOsgWidgetLabel::setEventsEnabled | ( | bool | enabled | ) | [virtual] |
Enable or disable event handling for this widget.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setVisible | ( | bool | visible | ) | [virtual] |
Set the widget visible or hidden.
Implements makVrv::DtWidget.
| virtual void makVrv::DtOsgWidgetLabel::setBoundsLength | ( | int | len | ) | [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 void makVrv::DtOsgWidgetLabel::setRotation | ( | float | angle | ) | [virtual] |
Sets the rotation applied to the label.
Implements makVrv::DtWidgetLabel.
| void makVrv::DtOsgWidgetLabel::updateBounds | ( | bool | calculateText | ) | [protected] |
| void makVrv::DtOsgWidgetLabel::updateTextBounds | ( | DtBoundingBox | box, |
| bool | calculateText | ||
| ) | [protected] |
| void makVrv::DtOsgWidgetLabel::updateFont | ( | const std::string & | font | ) | [protected] |
osg::ref_ptr<osg::Texture> makVrv::DtOsgWidgetLabel::myTexture [protected] |
DtSprite* makVrv::DtOsgWidgetLabel::mySprite [protected] |
DtTextProxy* makVrv::DtOsgWidgetLabel::myText [protected] |
DtBoundingBox makVrv::DtOsgWidgetLabel::myTextBounds [protected] |
unsigned int makVrv::DtOsgWidgetLabel::myOverlay [protected] |
float makVrv::DtOsgWidgetLabel::myWidth [protected] |
float makVrv::DtOsgWidgetLabel::myHeight [protected] |
float makVrv::DtOsgWidgetLabel::myOriginX [protected] |
float makVrv::DtOsgWidgetLabel::myOriginY [protected] |
float makVrv::DtOsgWidgetLabel::myPaddingX [protected] |
float makVrv::DtOsgWidgetLabel::myPaddingY [protected] |
float makVrv::DtOsgWidgetLabel::myRotation [protected] |
unsigned int makVrv::DtOsgWidgetLabel::myGroup [protected] |
float makVrv::DtOsgWidgetLabel::myFontScale [protected] |
int makVrv::DtOsgWidgetLabel::myFontSize [protected] |
int makVrv::DtOsgWidgetLabel::myBoundsLength [protected] |