VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Attributes | Private Member Functions
DtSdcText2DObject Class Reference

A 2D Text Stealth Draw Control Object. More...

Inheritance diagram for DtSdcText2DObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtSdcText2DObject (DtExerciseConn *exConn, unsigned id, const DtString &text, const DtSdcVector2D &position, DtSdcColor color=DtSdcColor::DtSdcWhite, bool flashing=false)
 Construct the text Draw Control Object.
virtual ~DtSdcText2DObject ()
virtual DtString text () const
 text accessor
virtual void setText (const DtString &text)
 text mutator
virtual DtSdcVector2D position () const
 position accessor
virtual void setPosition (const DtSdcVector2D &position)
 position mutator
virtual const DtSdcColorcolor () const
 color accessor
virtual void setColor (const DtSdcColor &color)
 color mutator
virtual bool flashing () const
 flashing accessor
virtual void setFlashing (bool flashing)
 flashing mutator
virtual void setFont (const char *fontFile, float size)
 font mutator
virtual void setRemoteGraphicSet (const std::string &setName)
virtual void update ()
 update the internal pdu

Protected Attributes

DtSdcVector2D myPosition
DtSdcColor myColor
bool myFlashing
DtString myText
Dt2DGraphicalObjectTextStateRecordmyStateRecord

Private Member Functions

 DtSdcText2DObject ()
 Default constructor.

Detailed Description

A 2D Text Stealth Draw Control Object.

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


Constructor & Destructor Documentation

DtSdcText2DObject::DtSdcText2DObject ( DtExerciseConn *  exConn,
unsigned  id,
const DtString text,
const DtSdcVector2D position,
DtSdcColor  color = DtSdcColor::DtSdcWhite,
bool  flashing = false 
)

Construct the text Draw Control Object.

Parameters:
idPassed to DtSdcObject 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

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 DtSdcText2DObject::text ( ) const [virtual]

text accessor

Get the actual text to draw

Returns:
Text
virtual void DtSdcText2DObject::setText ( const DtString text) [virtual]

text mutator

Set the text to be drawn

Parameters:
textThe actual text to draw
virtual DtSdcVector2D DtSdcText2DObject::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 DtSdcText2DObject::setPosition ( const DtSdcVector2D 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 DtSdcColor& DtSdcText2DObject::color ( ) const [virtual]

color accessor

Get the color assigned to the text

Returns:
Instance of DtSdcColor

Reimplemented from DtSdcObject.

virtual void DtSdcText2DObject::setColor ( const DtSdcColor color) [virtual]

color mutator

Set the color to use when drawing the text

Parameters:
colorThe DtSdcColor to use

Reimplemented from DtSdcObject.

virtual bool DtSdcText2DObject::flashing ( ) const [virtual]

flashing accessor

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

Returns:
true or false

Reimplemented from DtSdcObject.

virtual void DtSdcText2DObject::setFlashing ( bool  flashing) [virtual]

flashing mutator

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

Parameters:
flashingtrue or false

Reimplemented from DtSdcObject.

virtual void DtSdcText2DObject::setFont ( const char *  fontFile,
float  size 
) [virtual]

font mutator

Set the font

virtual void DtSdcText2DObject::setRemoteGraphicSet ( const std::string &  setName) [virtual]

Reimplemented from DtSdcObject.

virtual void DtSdcText2DObject::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 DtSdcObject.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)