![]() |
VR-Forces 4.7 Class Documentation
|
This is the implementation independent widget class for showing text. More...

Public Types | |
| enum | HorizontalAlignment { AlignLeft, AlignCenter, AlignRight, AlignJustify } |
| enum | GlyphCenterPolicy { CenterNone, CenterHorizontal, CenterVertical, CenterBoth, AlignToTextHeight } |
| enum | SizeConstraints { ConstrainToText, ConstrainToBounds } |
Public Member Functions | |
| DtWidgetLabel (DtDe &de, DtUniqueID id) | |
| A widget label CTOR. | |
| virtual | ~DtWidgetLabel () |
| DTOR. | |
| virtual void | setText (const DtUnicode &string)=0 |
| Set the labels string. | |
| virtual void | setTextColor (float r, float g, float b, float a)=0 |
| Set the label's font color. | |
| virtual void | setTextAlignment (HorizontalAlignment ha)=0 |
| Set the text alignment mode. | |
| virtual void | setFont (const std::string &fontFace, float size)=0 |
| Set the font for the label. | |
| virtual void | setSizeConstraints (SizeConstraints)=0 |
| Sets the constraint of the text box. | |
| virtual void | setFontScale (float scale)=0 |
| Set the font scale for the label. | |
| virtual float | fontScale () const =0 |
| Returns the font scale. | |
| virtual void | setBoundsLength (int len)=0 |
| Sets the length of the string to check when determining bounds. | |
| virtual void | setGlyphCenterPolicy (GlyphCenterPolicy gcp)=0 |
| Sets the policy for how the glyph is located wrt its origin. | |
| virtual void | setRotation (float angle)=0 |
| Sets the rotation applied to the label. | |
| virtual double | getRotation () const =0 |
| Return the current rotation. | |
| virtual void | setSize (float width, float height)=0 |
| Sets the size of the widget's text area. | |
| virtual void | getSize (float &width, float &height)=0 |
| Returns the size of the widget set by setSize. | |
Public Member Functions inherited from makVrv::DtWidget | |
| DtWidget (DtDe &de, DtUniqueID id) | |
| virtual | ~DtWidget () |
| virtual void | setOverlay (unsigned int overlay)=0 |
| Sets the overlay of the widget. | |
| virtual unsigned int | overlay () const =0 |
| Gets the overlay of the widget. | |
| virtual void | setOrderGroup (unsigned int group)=0 |
| Sets the overlay of the widget. | |
| virtual unsigned int | orderGroup () const =0 |
| Gets the overlay of the widget. | |
| virtual void | setParentId (DtUniqueID id) |
| Set the parent id. | |
| virtual void | setPosition (float x, float y, float z, float w=0)=0 |
| Set the position of the widget in screen space. | |
| virtual void | setBackgroundImage (const std::string &filename)=0 |
| Set the background image. | |
| virtual void | setColor (float r, float g, float b, float a)=0 |
| Set the color of the widget. | |
| virtual void | setOrigin (float originX, float originY)=0 |
| Sets the origin location, by default it is 0,0. | |
| virtual void | setPadding (float paddingX, float paddingY)=0 |
| Sets the size of the widget in overlay coordinate space. | |
| virtual void | setModelDefinition (const std::string &str)=0 |
| Sets the model definition of the widget (optional, since widgets are not models) | |
| virtual void | setEventsEnabled (bool enabled)=0 |
| Enable or disable events for this widget. | |
| virtual void | setVisible (bool visible)=0 |
| Set whether the widget is visible or not. | |
Additional Inherited Members | |
Protected Attributes inherited from makVrv::DtWidget | |
| DtDe & | myDe |
| DtUniqueID | myId |
| DtUniqueID | myParentId |
This is the implementation independent widget class for showing text.
| makVrv::DtWidgetLabel::DtWidgetLabel | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
A widget label CTOR.
|
virtual |
DTOR.
|
pure virtual |
Set the labels string.
Labels support multi lines when the string contains new line characters.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set the label's font color.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set the text alignment mode.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set the font for the label.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Sets the constraint of the text box.
SizeToText is default. SizeToBounds will bound text to values set in setSize
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set the font scale for the label.
This will multiply the font size times the scale to get an effective font size. Allows for scaling of font without changing font size
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Returns the font scale.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Sets the length of the string to check when determining bounds.
This is useful when needing text to line up.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Sets the policy for how the glyph is located wrt its origin.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Sets the rotation applied to the label.
Implements makVrv::DtWidget.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Return the current rotation.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Sets the size of the widget's text area.
Implements makVrv::DtWidget.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Returns the size of the widget set by setSize.
Implemented in makVrv::DtOsgWidgetLabel.