VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
vrvControlToolkit::DtText2DObject Class Reference

A 2D Text Stealth Draw Control Object.

DtText2DObject represents text that can be positioned and displayed on the screen. A color can be specified; and the text can flash, if desired.

Inheritance diagram for vrvControlToolkit::DtText2DObject:
Inheritance graph
[legend]

Public Member Functions

 DtText2DObject (DtExerciseConn *exConn, unsigned id, const DtString &text, const DtVdcVector2D &position, DtVdcColor color=DtVdcColor::DtVdcWhite, bool flashing=false)
 
virtual ~DtText2DObject ()
 
virtual DtString text () const
 
virtual void setText (const DtString &text)
 
virtual DtVdcVector2D position () const
 
virtual void setPosition (const DtVdcVector2D &position)
 
virtual const DtVdcColorcolor () const
 
virtual void setColor (const DtVdcColor &color)
 
virtual bool flashing () const
 
virtual void setFlashing (bool flashing)
 
virtual void setFont (const char *fontFilePath, float size)
 
virtual void setRemoteGraphicSet (const std::string &setName)
 
virtual void update ()
 
- Public Member Functions inherited from vrvControlToolkit::DtDrawControlObject
 DtDrawControlObject (DtExerciseConn *exConn, unsigned id, const DtString &objName)
 
virtual ~DtDrawControlObject ()
 
virtual unsigned id () const
 
virtual void setId (unsigned id)
 
virtual const
DtGlobalObjectDesignator & 
globalId () const
 
virtual void setVisible (bool yesNo)
 
virtual bool visible () const
 

Protected Attributes

DtVdcVector2D myPosition
 
DtVdcColor myColor
 
bool myFlashing
 
DtString myText
 
Dt2DGraphicalObjectTextStateRecordmyStateRecord
 
- Protected Attributes inherited from vrvControlToolkit::DtDrawControlObject
unsigned myId
 
DtEnvironmentProcessPublishermyPublisher
 
bool myVisible
 
DtVdcColor myEmptyColor
 

Private Member Functions

 DtText2DObject ()
 

Additional Inherited Members

- Static Public Member Functions inherited from vrvControlToolkit::DtDrawControlObject
static void setPublisherCreator (DtEnvironmentProcessPublisherCreator *creator)
 
- Static Protected Attributes inherited from vrvControlToolkit::DtDrawControlObject
static
DtEnvironmentProcessPublisherCreator
thePublisherCreator
 

Constructor & Destructor Documentation

vrvControlToolkit::DtText2DObject::DtText2DObject ( DtExerciseConn *  exConn,
unsigned  id,
const DtString text,
const DtVdcVector2D position,
DtVdcColor  color = DtVdcColor::DtVdcWhite,
bool  flashing = false 
)

Construct the text Draw Control Object.

Parameters
idPassed to DtDrawControlObject base (see)
textThe text to draw
positionX,Y position of bottom-left corner of text on the screen - values go from [0.,0.] (left,bottom) to [1.,1.] (right, top)
colorThe color of the text
flashingA boolean parameter indicating whether or not the text should be flashing
virtual vrvControlToolkit::DtText2DObject::~DtText2DObject ( )
virtual
vrvControlToolkit::DtText2DObject::DtText2DObject ( )
private

Default constructor.

Private and not implemented - you must supply an id and basic geometric parameters to construct the ellipse or rectangle

Member Function Documentation

virtual DtString vrvControlToolkit::DtText2DObject::text ( ) const
virtual

text accessor

Get the actual text to draw

Returns
Text
virtual void vrvControlToolkit::DtText2DObject::setText ( const DtString text)
virtual

text mutator

Set the text to be drawn

Parameters
textThe actual text to draw
virtual DtVdcVector2D vrvControlToolkit::DtText2DObject::position ( ) const
virtual

position accessor

Get the text's bottom-left corner position

Returns
[0.,0] (left, bottom) to [1.,1.] (right, top)
virtual void vrvControlToolkit::DtText2DObject::setPosition ( const DtVdcVector2D position)
virtual

position mutator

Set the text's bottom-left corner position

Parameters
position[0.,0] (left, bottom) to [1.,1.] (right, top)
virtual const DtVdcColor& vrvControlToolkit::DtText2DObject::color ( ) const
virtual

color accessor

Get the color assigned to the text

Returns
Instance of DtVdcColor

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual void vrvControlToolkit::DtText2DObject::setColor ( const DtVdcColor color)
virtual

color mutator

Set the color to use when drawing the text

Parameters
colorThe DtVdcColor to use

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual bool vrvControlToolkit::DtText2DObject::flashing ( ) const
virtual

flashing accessor

Get the boolean that indicates whether or not the text should flash

Returns
true or false

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual void vrvControlToolkit::DtText2DObject::setFlashing ( bool  flashing)
virtual

flashing mutator

Set the boolean that indicates whether or not the text should flash

Parameters
flashingtrue or false

Reimplemented from vrvControlToolkit::DtDrawControlObject.

virtual void vrvControlToolkit::DtText2DObject::setFont ( const char fontFilePath,
float  size 
)
virtual

font mutator

Set the font file and font point size to use. The fontFilePath provided can make use of VRV Path Macros, e.g. the fontFilePath could be: /Fonts/arial.ttf

See Also
DtDePathConfiguration
virtual void vrvControlToolkit::DtText2DObject::setRemoteGraphicSet ( const std::string &  setName)
virtual
virtual void vrvControlToolkit::DtText2DObject::update ( )
virtual

update the internal pdu

Make sure the internal pdu reflects the actual state of the draw control object's members. This is necessary because some members can be modified directly (which make the interface easier to use). DtStealthRemoteDrawer::update() calls this, so the user doesn't need to; but if the user is accessing the pdu directly (via the pdu() accessor) this should be called before using the pdu.

Implements vrvControlToolkit::DtDrawControlObject.

Member Data Documentation

DtVdcVector2D vrvControlToolkit::DtText2DObject::myPosition
protected
DtVdcColor vrvControlToolkit::DtText2DObject::myColor
protected
bool vrvControlToolkit::DtText2DObject::myFlashing
protected
DtString vrvControlToolkit::DtText2DObject::myText
protected
Dt2DGraphicalObjectTextStateRecord* vrvControlToolkit::DtText2DObject::myStateRecord
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)