VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtBaseTextAttribute Class Reference

The attribute layout tells DtAttributes where to draw. More...

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

Public Member Functions

 DtBaseTextAttribute (DtDe &de)
 CTOR.
virtual ~DtBaseTextAttribute ()
 DTOR.
virtual void setString (const DtUnicode &str)
 Set the string to render.
virtual void setPosition (float x, float y, float z, float w)
 Set the position of the attribute in world space, using vrvGraphics float packing.
virtual void getMinSize (double &xOut, double &yOut)
 Get the size of the attribute.
virtual void setOffset (double x, double y)
 Set the Top left corner of the text.
virtual void setVisible (bool isVisible)
 Set the text visible or invisible.
virtual void setColor (float r, float g, float b, float a)
 Set the text's color.
virtual void setFont (const std::string &fontFile, float sizeInPoints)
 Set the font file and size in points to display the text in.
virtual bool visible () const
 Get the text's visibility status.
virtual void setSize (double x, double y)
 Set the size of the text box.
virtual void setOverlay (unsigned int overlayId)
 Set the overlay to draw the attribute on Overlay ids are defined in DtOverlayManager.
virtual void setGroup (unsigned int group)
 Set the group to draw the atribute on.
virtual void setForegroundGroup (unsigned int group)
 Set the group to draw the text's foreground on.
virtual void setBackgroundGroup (unsigned int group)
 Set the group to draw the text's background (shadow) on.
virtual float fontSize ()
 Get the text's font size in points.
virtual const std::string & fontFile ()
 Get the text's font file name.
virtual void setShadowText (bool enabled)
 Set whether text shadows should be displayed.
- Public Member Functions inherited from makVrv::DtAttribute
 DtAttribute ()
 CTOR.
virtual ~DtAttribute ()
 DTOR.

Static Public Member Functions

static float pointsToPixelsAprox (float points)
 Convert a dimension in points to an approximatation of pixels (The exact correct value depends on monitor DPI)

Protected Member Functions

void setStringForText (const DtUnicode &str, DtTextProxy &text)
 setString for a specific text proxy
void setFontForText (const std::string &fontFile, float sizeInPoints, DtTextProxy &text)
 setFont for a specific text proxy
void setOffsetForText (double x, double y, DtTextProxy &text)
 setOffset for a specific text proxy
void setVisibleForText (DtTextProxy &text)
 set a specific text object visible
void createText ()
 Create the text object.

Protected Attributes

DtDemyDe
float myColorR
float myColorG
float myColorB
float myColorA
std::string myFontFile
float myFontSize
float myWidth
float myOffsetX
float myOffsetY
float myWorldX
float myWorldY
float myWorldZ
float myWorldW
double mySizeX
double mySizeY
DtFont::TextAlignement myAlignment
DtTextProxymyText
DtTextProxymyShadowText
DtUnicode myString
unsigned int myOverlayId
unsigned int myForegroundOverlayGroup
unsigned int myBackgroundOverlayGroup
bool myShadowTextFlag

Additional Inherited Members

- Public Attributes inherited from makVrv::DtAttribute
boost::signal< void(DtAttribute
*, double, double)> 
signal_sizeChanged
 Emitted when the attribute's size changes.

Detailed Description

The attribute layout tells DtAttributes where to draw.

Constructor & Destructor Documentation

makVrv::DtBaseTextAttribute::DtBaseTextAttribute ( DtDe de)

CTOR.

virtual makVrv::DtBaseTextAttribute::~DtBaseTextAttribute ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtBaseTextAttribute::setString ( const DtUnicode str)
virtual

Set the string to render.

virtual void makVrv::DtBaseTextAttribute::setPosition ( float  x,
float  y,
float  z,
float  w 
)
virtual

Set the position of the attribute in world space, using vrvGraphics float packing.

Implements makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::getMinSize ( double xOut,
double yOut 
)
virtual

Get the size of the attribute.

Implements makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::setOffset ( double  x,
double  y 
)
virtual

Set the Top left corner of the text.

Reimplemented from makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::setVisible ( bool  isVisible)
virtual

Set the text visible or invisible.

Implements makVrv::DtAttribute.

Reimplemented in makVrv::DtNumericAttribute, and makVrv::DtTextAttribute.

virtual void makVrv::DtBaseTextAttribute::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the text's color.

Implements makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::setFont ( const std::string &  fontFile,
float  sizeInPoints 
)
virtual

Set the font file and size in points to display the text in.

virtual bool makVrv::DtBaseTextAttribute::visible ( ) const
virtual

Get the text's visibility status.

Implements makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::setSize ( double  x,
double  y 
)
virtual

Set the size of the text box.

Implements makVrv::DtAttribute.

static float makVrv::DtBaseTextAttribute::pointsToPixelsAprox ( float  points)
static

Convert a dimension in points to an approximatation of pixels (The exact correct value depends on monitor DPI)

virtual void makVrv::DtBaseTextAttribute::setOverlay ( unsigned int  overlayId)
virtual

Set the overlay to draw the attribute on Overlay ids are defined in DtOverlayManager.

Implements makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::setGroup ( unsigned int  group)
virtual

Set the group to draw the atribute on.

This sets the text's foreground and background to use the same (given group ID). Using separate IDs for the text and shadow (via the setForegroundGroup(..) and setBackgroundGroup(..) methods) is recommended in order to avoid cases where the shadow text appears on top of the text itself.

Implements makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::setForegroundGroup ( unsigned int  group)
virtual

Set the group to draw the text's foreground on.

Reimplemented from makVrv::DtAttribute.

virtual void makVrv::DtBaseTextAttribute::setBackgroundGroup ( unsigned int  group)
virtual

Set the group to draw the text's background (shadow) on.

Reimplemented from makVrv::DtAttribute.

virtual float makVrv::DtBaseTextAttribute::fontSize ( )
virtual

Get the text's font size in points.

virtual const std::string& makVrv::DtBaseTextAttribute::fontFile ( )
virtual

Get the text's font file name.

virtual void makVrv::DtBaseTextAttribute::setShadowText ( bool  enabled)
virtual

Set whether text shadows should be displayed.

Implements makVrv::DtAttribute.

void makVrv::DtBaseTextAttribute::setStringForText ( const DtUnicode str,
DtTextProxy text 
)
protected

setString for a specific text proxy

void makVrv::DtBaseTextAttribute::setFontForText ( const std::string &  fontFile,
float  sizeInPoints,
DtTextProxy text 
)
protected

setFont for a specific text proxy

void makVrv::DtBaseTextAttribute::setOffsetForText ( double  x,
double  y,
DtTextProxy text 
)
protected

setOffset for a specific text proxy

void makVrv::DtBaseTextAttribute::setVisibleForText ( DtTextProxy text)
protected

set a specific text object visible

void makVrv::DtBaseTextAttribute::createText ( )
protected

Create the text object.

Member Data Documentation

DtDe& makVrv::DtBaseTextAttribute::myDe
protected
float makVrv::DtBaseTextAttribute::myColorR
protected
float makVrv::DtBaseTextAttribute::myColorG
protected
float makVrv::DtBaseTextAttribute::myColorB
protected
float makVrv::DtBaseTextAttribute::myColorA
protected
std::string makVrv::DtBaseTextAttribute::myFontFile
protected
float makVrv::DtBaseTextAttribute::myFontSize
protected
float makVrv::DtBaseTextAttribute::myWidth
protected
float makVrv::DtBaseTextAttribute::myOffsetX
protected
float makVrv::DtBaseTextAttribute::myOffsetY
protected
float makVrv::DtBaseTextAttribute::myWorldX
protected
float makVrv::DtBaseTextAttribute::myWorldY
protected
float makVrv::DtBaseTextAttribute::myWorldZ
protected
float makVrv::DtBaseTextAttribute::myWorldW
protected
double makVrv::DtBaseTextAttribute::mySizeX
protected
double makVrv::DtBaseTextAttribute::mySizeY
protected
DtFont::TextAlignement makVrv::DtBaseTextAttribute::myAlignment
protected
DtTextProxy* makVrv::DtBaseTextAttribute::myText
protected
DtTextProxy* makVrv::DtBaseTextAttribute::myShadowText
protected
DtUnicode makVrv::DtBaseTextAttribute::myString
protected
unsigned int makVrv::DtBaseTextAttribute::myOverlayId
protected
unsigned int makVrv::DtBaseTextAttribute::myForegroundOverlayGroup
protected
unsigned int makVrv::DtBaseTextAttribute::myBackgroundOverlayGroup
protected
bool makVrv::DtBaseTextAttribute::myShadowTextFlag
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)