VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
makVrv::DtWidgetLabel Class Referenceabstract

This is the implementation independent widget class for showing text.

Inheritance diagram for makVrv::DtWidgetLabel:
Inheritance graph
[legend]

Public Types

enum  TextHorizontalAlignmentPolicy { TextHorizontalAlignmentPolicy::AlignLeft, TextHorizontalAlignmentPolicy::AlignCenter, TextHorizontalAlignmentPolicy::AlignRight, TextHorizontalAlignmentPolicy::AlignJustify }
 
enum  OriginPlacementPolicy {
  OriginPlacementPolicy::BottomLeft, OriginPlacementPolicy::BottomRight, OriginPlacementPolicy::BottomMiddle, OriginPlacementPolicy::LeftMiddle,
  OriginPlacementPolicy::RightMiddle, OriginPlacementPolicy::Center, OriginPlacementPolicy::BelowBottomLeftByLineHeight, OriginPlacementPolicy::BelowBottomLeftByHalfLineHeight,
  OriginPlacementPolicy::BelowBottomRightByLineHeight, OriginPlacementPolicy::BelowBottomRightByHalfLineHeight, OriginPlacementPolicy::OffsetFromBottomLeftByBounds, OriginPlacementPolicy::OffsetFromBottomRightByBounds
}
 
enum  TextBoundsPolicy { TextBoundsPolicy::ConstrainToLine, TextBoundsPolicy::ConstrainToBounds, TextBoundsPolicy::ConstrainToText, TextBoundsPolicy::ConstrainToNone }
 
- 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
 
DtWidgetLabeloperator= (const DtWidgetLabel &other)=delete
 
 DtWidgetLabel (const DtWidgetLabel &&other)=delete
 
DtWidgetLabeloperator= (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 setTextHorizontalAlignmentPolicy (TextHorizontalAlignmentPolicy ha)=0
 
virtual void setFont (const std::string &fontFace, float size)=0
 
virtual void setTextBoundsPolicy (TextBoundsPolicy)=0
 
virtual void setFontScale (float scale)=0
 
virtual float fontScale (double minimumAltitudeForUse=std::numeric_limits< double >::min()) const =0
 
virtual void setAltitudeBasedConfigurations (const makArchives::DtAltitudeBasedScaleConfigurationRecordCollection &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 bool isLodOutAltitudeEnabled () const =0
 
virtual void setBoundsLength (int len)=0
 
virtual void setOriginPlacementPolicy (OriginPlacementPolicy gcp)=0
 
virtual void setRotation (float angle)=0
 
virtual double getRotation () const =0
 
virtual void setIsRotationInScreenSpace (bool isRotationInScreenSpace)=0
 
virtual bool isRotationInScreenSpace () const =0
 
virtual void setMaximumWorldHeight (double worldHeightInMeters)=0
 
virtual double maximumWorldHeight () const =0
 
virtual void setMaximumWorldWidth (double worldWidthInMeters)=0
 
virtual double maximumWorldWidth () 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 ()
 
 DtWidget (const DtWidget &other)=delete
 
DtWidgetoperator= (const DtWidget &other)=delete
 
 DtWidget (const DtWidget &&other)=delete
 
DtWidgetoperator= (const DtWidget &&other)=delete
 
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 setOriginOffset (int xOffset, int yOffset)=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
 
virtual void registerUpdater (DtWidgetUpdater *updater)
 
virtual void unregisterUpdater (DtWidgetUpdater *updater)
 
virtual DtWidgetUpdaterupdater ()
 

Additional Inherited Members

- Protected Member Functions inherited from makVrv::DtWidget
virtual void updateEventSignals ()=0
 
- Protected Attributes inherited from makVrv::DtWidget
DtDemyDe
 
DtUniqueID myId
 
DtUniqueID myParentId
 
DtSignalConnectionManager mySignalConnectionManager
 
DtWidgetUpdatermyUpdater
 

Member Enumeration Documentation

Policy that determines how label is aligned within its bounds - only used when the Size Constraint Policy is Constrain To Bounds.

Enumerator
AlignLeft 
AlignCenter 
AlignRight 
AlignJustify 

Policy that determines where the origin of the label is.

Enumerator
BottomLeft 
BottomRight 
BottomMiddle 
LeftMiddle 
RightMiddle 
Center 
BelowBottomLeftByLineHeight 
BelowBottomLeftByHalfLineHeight 
BelowBottomRightByLineHeight 
BelowBottomRightByHalfLineHeight 
OffsetFromBottomLeftByBounds 
OffsetFromBottomRightByBounds 

Policy that determines which bounds to use when rendering the text-portion of the label.

Enumerator
ConstrainToLine 
ConstrainToBounds 
ConstrainToText 
ConstrainToNone 

Constructor & Destructor Documentation

makVrv::DtWidgetLabel::DtWidgetLabel ( DtDe de,
DtUniqueID  id 
)

A widget label CTOR.

virtual makVrv::DtWidgetLabel::~DtWidgetLabel ( )
virtual

DTOR.

makVrv::DtWidgetLabel::DtWidgetLabel ( )
delete

Default Constructor not implemented.

makVrv::DtWidgetLabel::DtWidgetLabel ( const DtWidgetLabel other)
delete

Copy Constructor not implemented - Copy not allowed.

makVrv::DtWidgetLabel::DtWidgetLabel ( const DtWidgetLabel &&  other)
delete

Move Constructor not implemented - Move not allowed.

Member Function Documentation

DtWidgetLabel& makVrv::DtWidgetLabel::operator= ( const DtWidgetLabel other)
delete

Assignment Operator not implemented - Assignment not allowed.

DtWidgetLabel& makVrv::DtWidgetLabel::operator= ( const DtWidgetLabel &&  other)
delete

Move Assignment Operator not implemented - Move Assignment not allowed.

virtual void makVrv::DtWidgetLabel::setText ( const DtUnicode string)
pure virtual

Set the string for the label. Labels support multi lines when the string contains new line characters.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setTextColor ( float  r,
float  g,
float  b,
float  a 
)
pure virtual

Set the font color for the label.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setTextHorizontalAlignmentPolicy ( TextHorizontalAlignmentPolicy  ha)
pure virtual

Set the Text Alignment Policy for the label. Only used when the Size Constraint Policy is Constrain To Bounds.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setFont ( const std::string &  fontFace,
float  size 
)
pure virtual

Set the font and point size for the label.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setTextBoundsPolicy ( TextBoundsPolicy  )
pure virtual

Sets the Text Bounds Policy for the label.

virtual void makVrv::DtWidgetLabel::setFontScale ( float  scale)
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.

virtual float makVrv::DtWidgetLabel::fontScale ( double  minimumAltitudeForUse = std::numeric_limits< double >::min()) const
pure virtual

Returns the font scale used for the provided MSL altitude.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setAltitudeBasedConfigurations ( const makArchives::DtAltitudeBasedScaleConfigurationRecordCollection configs)
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.

virtual void makVrv::DtWidgetLabel::clearAltitudeBasedConfigurations ( )
pure virtual

Clear altitude-based fonts, if any were defined. Altitude-specific fonts are defined using: setFontScaleByMinimumAltitude(...).

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setIsForcedAltitudeBasedFontScaleEnabled ( bool  enabled)
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.

virtual void makVrv::DtWidgetLabel::setBaseAltitudeToUseForForcedFontScale ( double  baseAltitude)
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.

virtual void makVrv::DtWidgetLabel::setLodOutAltitude ( double  lodOutAltitude)
pure virtual

Set the altitude, in meters, at which this label will no longer appear. This is only used if setIsLodOutAltitudeEnabled(true).

Implements makVrv::DtWidget.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setIsLodOutAltitudeEnabled ( bool  isLodOutAltitudeEnabled)
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(...).

Implements makVrv::DtWidget.

Implemented in makVrv::DtOsgWidgetLabel.

virtual bool makVrv::DtWidgetLabel::isLodOutAltitudeEnabled ( ) const
pure virtual

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setBoundsLength ( int  len)
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.

virtual void makVrv::DtWidgetLabel::setOriginPlacementPolicy ( OriginPlacementPolicy  gcp)
pure virtual

Sets the policy for how the glyph is located with respect to its position.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setRotation ( float  angle)
pure virtual

Sets the rotation applied to the label.

See Also
setIsRotationInScreenSpace(bool)

Implements makVrv::DtWidget.

Implemented in makVrv::DtOsgWidgetLabel.

virtual double makVrv::DtWidgetLabel::getRotation ( ) const
pure virtual

Return the current rotation.

See Also
isRotationInScreenSpace()

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setIsRotationInScreenSpace ( bool  isRotationInScreenSpace)
pure virtual

Set whether or not the rotation of the text object is in screen space. If rotation is in screen space, a 0 degrees rotation means the top of the user's computer monitor. If rotation is not in screen space, it is in world space with a 0 degrees rotation meaning the direction of True North. Default is true.

Implemented in makVrv::DtOsgWidgetLabel.

virtual bool makVrv::DtWidgetLabel::isRotationInScreenSpace ( ) const
pure virtual

Get whether or not the rotation of the text object is in screen space.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setMaximumWorldHeight ( double  worldHeightInMeters)
pure virtual

Set the maximum world-space width for the this widget, in meters. Once the widget exceeds the maximum world-space height, the widget will not be rendered. To disable this mechanism altogether (for height), set this property to -1.0. By default, this property is set to -1.0 (and as a result this mechanism is unused by default).

Implemented in makVrv::DtOsgWidgetLabel.

virtual double makVrv::DtWidgetLabel::maximumWorldHeight ( ) const
pure virtual

Returns the maximum world-space height for the this widget, in meters.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setMaximumWorldWidth ( double  worldWidthInMeters)
pure virtual

Set the maximum world-space width for the this proxy, in meters. Once the widget exceeds the maximum world-space width the widget will not be rendered. To disable this mechanism altogether (for width), set this property to -1.0. By default, this property is set to -1.0 (and as a result this mechanism is unused by default).

Implemented in makVrv::DtOsgWidgetLabel.

virtual double makVrv::DtWidgetLabel::maximumWorldWidth ( ) const
pure virtual

Returns the maximum world-space width for the this widget, in meters.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setSize ( float  width,
float  height 
)
pure virtual

Sets the size of the widget's text area.

Implements makVrv::DtWidget.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::getSize ( float &  width,
float &  height 
)
pure virtual

Returns the size of the widget set by setSize.

Implemented in makVrv::DtOsgWidgetLabel.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)