VR-Forces 4.8 Class Documentation
 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. More...

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 Member Functions

 DtWidgetLabel (DtDe &de, DtUniqueID id)
 A widget label CTOR. More...
 
virtual ~DtWidgetLabel ()
 DTOR. More...
 
virtual void setText (const DtUnicode &string)=0
 Set the labels string. More...
 
virtual void setTextColor (float r, float g, float b, float a)=0
 Set the label's font color. More...
 
virtual void setTextAlignment (HorizontalAlignment ha)=0
 Set the text alignment mode. More...
 
virtual void setFont (const std::string &fontFace, float size)=0
 Set the font for the label. More...
 
virtual void setSizeConstraints (SizeConstraints)=0
 Sets the constraint of the text box. More...
 
virtual void setFontScale (float scale)=0
 Set the font scale for the label. More...
 
virtual float fontScale () const =0
 Returns the font scale. More...
 
virtual void setBoundsLength (int len)=0
 Sets the length of the string to check when determining bounds. More...
 
virtual void setGlyphCenterPolicy (GlyphCenterPolicy gcp)=0
 Sets the policy for how the glyph is located wrt its origin. More...
 
virtual void setRotation (float angle)=0
 Sets the rotation applied to the label. More...
 
virtual double getRotation () const =0
 Return the current rotation. More...
 
virtual void setSize (float width, float height)=0
 Sets the size of the widget's text area. More...
 
virtual void getSize (float &width, float &height)=0
 Returns the size of the widget set by setSize. More...
 
- 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. More...
 
virtual unsigned int overlay () const =0
 Gets the overlay of the widget. More...
 
virtual void setOrderGroup (unsigned int group)=0
 Sets the overlay of the widget. More...
 
virtual unsigned int orderGroup () const =0
 Gets the overlay of the widget. More...
 
virtual void setParentId (DtUniqueID id)
 Set the parent id. More...
 
virtual void setPosition (float x, float y, float z, float w=0)=0
 Set the position of the widget in screen space. More...
 
virtual void setBackgroundImage (const std::string &filename)=0
 Set the background image. More...
 
virtual void setColor (float r, float g, float b, float a)=0
 Set the color of the widget. More...
 
virtual void setOrigin (float originX, float originY)=0
 Sets the origin location, by default it is 0,0. More...
 
virtual void setPadding (float paddingX, float paddingY)=0
 Sets the size of the widget in overlay coordinate space. More...
 
virtual void setModelDefinition (const std::string &str)=0
 Sets the model definition of the widget (optional, since widgets are not models) More...
 
virtual void setEventsEnabled (bool enabled)=0
 Enable or disable events for this widget. More...
 
virtual void setVisible (bool visible)=0
 Set whether the widget is visible or not. More...
 
virtual DtUniqueID id () const
 Return this widget's id. More...
 
virtual DtUniqueID parentId () const
 Return the unique id specified as the parent of this widget. More...
 

Additional Inherited Members

- Protected Attributes inherited from makVrv::DtWidget
DtDemyDe
 
DtUniqueID myId
 
DtUniqueID myParentId
 

Detailed Description

This is the implementation independent widget class for showing text.

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.

Member Function Documentation

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

Implemented in makVrv::DtOsgWidgetLabel.

virtual float makVrv::DtWidgetLabel::fontScale ( ) const
pure virtual

Returns the font scale.

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 Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)