VR-Forces 5.0.3 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  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
 
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 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
DtDemyDe
 
DtUniqueID myId
 
DtUniqueID myParentId
 

Member Enumeration Documentation

Enumerator
AlignLeft 
AlignCenter 
AlignRight 
AlignJustify 
Enumerator
CenterNone 
CenterHorizontal 
CenterVertical 
CenterBoth 
AlignToTextHeight 
Enumerator
ConstrainToText 
ConstrainToBounds 

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.

Member Function Documentation

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

Assignment Operator not implemented - Assignment not allowed.

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

Set the labels string. 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 label's font color.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setTextAlignment ( HorizontalAlignment  ha)
pure virtual

Set the text alignment mode.

Implemented in makVrv::DtOsgWidgetLabel.

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

Set the font for the label.

Implemented in makVrv::DtOsgWidgetLabel.

virtual void makVrv::DtWidgetLabel::setSizeConstraints ( SizeConstraints  )
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.

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.

Implemented in makVrv::DtOsgWidgetLabel.

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

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(...).

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::setGlyphCenterPolicy ( GlyphCenterPolicy  gcp)
pure virtual

Sets the policy for how the glyph is located wrt its origin.

Implemented in makVrv::DtOsgWidgetLabel.

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

Sets the rotation applied to the label.

Implements makVrv::DtWidget.

Implemented in makVrv::DtOsgWidgetLabel.

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

Return the current rotation.

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 Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)