![]() |
VR-Forces 5.0.3 Developer's Guide
|
This is the implementation independent widget class for showing text.

Public Types | |
| enum | HorizontalAlignment { AlignLeft, AlignCenter, AlignRight, AlignJustify } |
| enum | GlyphCenterPolicy { CenterNone, CenterHorizontal, CenterVertical, CenterBoth, AlignToTextHeight } |
| enum | SizeConstraints { ConstrainToText, ConstrainToBounds } |
Public Types inherited from makVrv::DtWidget | |
| typedef std::vector < DtDynamicSizeConfiguration > | DtDynamicSizeConfigurationCollection |
Public Member Functions | |
| DtWidgetLabel (DtDe &de, DtUniqueID id) | |
| virtual | ~DtWidgetLabel () |
| DtWidgetLabel ()=delete | |
| DtWidgetLabel (const DtWidgetLabel &other)=delete | |
| DtWidgetLabel & | operator= (const DtWidgetLabel &other)=delete |
| virtual void | setText (const DtUnicode &string)=0 |
| virtual void | setTextColor (float r, float g, float b, float a)=0 |
| virtual void | setTextAlignment (HorizontalAlignment ha)=0 |
| virtual void | setFont (const std::string &fontFace, float size)=0 |
| virtual void | setSizeConstraints (SizeConstraints)=0 |
| virtual void | setFontScale (float scale)=0 |
| virtual float | fontScale (double minimumAltitudeForUse=std::numeric_limits< double >::min()) const =0 |
| virtual void | setAltitudeBasedConfigurations (const makArchives::DtDynamicScaleConfigurationCollection &configs)=0 |
| virtual void | clearAltitudeBasedConfigurations ()=0 |
| virtual void | setIsForcedAltitudeBasedFontScaleEnabled (bool enabled)=0 |
| virtual void | setBaseAltitudeToUseForForcedFontScale (double baseAltitude)=0 |
| virtual void | setLodOutAltitude (double lodOutAltitude)=0 |
| virtual void | setIsLodOutAltitudeEnabled (bool isLodOutAltitudeEnabled)=0 |
| virtual void | setBoundsLength (int len)=0 |
| virtual void | setGlyphCenterPolicy (GlyphCenterPolicy gcp)=0 |
| virtual void | setRotation (float angle)=0 |
| virtual double | getRotation () const =0 |
| virtual void | setSize (float width, float height)=0 |
| virtual void | getSize (float &width, float &height)=0 |
Public Member Functions inherited from makVrv::DtWidget | |
| DtWidget (DtDe &de, DtUniqueID id) | |
| virtual | ~DtWidget () |
| virtual void | setOverlay (unsigned int overlay)=0 |
| virtual unsigned int | overlay () const =0 |
| virtual void | setOrderGroup (unsigned int group)=0 |
| virtual unsigned int | orderGroup () const =0 |
| virtual void | setParentId (DtUniqueID id) |
| virtual void | setPosition (float x, float y, float z, float w=0)=0 |
| virtual void | setBackgroundImage (const std::string &filename)=0 |
| virtual void | setColor (float r, float g, float b, float a)=0 |
| virtual void | setOrigin (float originX, float originY)=0 |
| virtual void | setAltitudeSpecificSizes (const DtWidget::DtDynamicSizeConfigurationCollection &configs) |
| virtual void | clearAltitudeSpecificSizes () |
| virtual void | setIsForcedSizeByAltitudeEnabled (bool enabled) |
| virtual void | setAltitudeForForcedSize (double minimumAltitudeForUse) |
| virtual void | setPadding (float paddingX, float paddingY)=0 |
| virtual void | setModelDefinition (const std::string &str)=0 |
| virtual void | setEventsEnabled (bool enabled)=0 |
| virtual void | setVisible (bool visible)=0 |
| virtual DtUniqueID | id () const |
| virtual DtUniqueID | parentId () const |
Additional Inherited Members | |
Protected Attributes inherited from makVrv::DtWidget | |
| DtDe & | myDe |
| DtUniqueID | myId |
| DtUniqueID | myParentId |
| makVrv::DtWidgetLabel::DtWidgetLabel | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
A widget label CTOR.
|
virtual |
DTOR.
|
delete |
Default Constructor not implemented.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
|
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. Akin to calling setFontScaleByMinimumAltitude(scale).
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Returns the font scale.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set an altitude-based font scale for the label. This will multiply the font size times the scale to get an effective font size. Allows for 1) scaling of font without changing font size and 2) the use of different font scales depending on the altitude of the camera rendering the label. Altitude is in meters from mean sea level.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Clear altitude-based fonts, if any were defined. Altitude-specific fonts are defined using: setFontScaleByMinimumAltitude(...).
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set whether or not a particular font scale is used, regardless of altitude. This only matters if altitude-based font scales are used. The font scale used is provided by the altitude-based configuration corresponding to the altitude provided using: setBaseAltitudeToUseForForcedFontScale(...)
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set the altitude to use when determining the forced font scale. This is only used if setIsForcedAltitudeBasedFontScaleEnabled(true). Altitude is in meters from mean sea level.
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set the altitude, in meters, at which this label will no longer appear. This is only used if setIsLodOutAltitudeEnabled(true).
Implemented in makVrv::DtOsgWidgetLabel.
|
pure virtual |
Set whether or not this label widget will use the LOD Out Altitude property. The LOD Out Altitude property is set using setLodOutAltitude(...).
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.