![]() |
VR-Forces 4.0.4 Class Documentation
|
A 2D Text Stealth Draw Control Object. More...

Public Member Functions | |
| DtText2DObject (DtExerciseConn *exConn, unsigned id, const DtString &text, const DtVdcVector2D &position, DtVdcColor color=DtVdcColor::DtVdcWhite, bool flashing=false) | |
| Construct the text Draw Control Object. | |
| virtual | ~DtText2DObject () |
| virtual DtString | text () const |
| text accessor | |
| virtual void | setText (const DtString &text) |
| text mutator | |
| virtual DtVdcVector2D | position () const |
| position accessor | |
| virtual void | setPosition (const DtVdcVector2D &position) |
| position mutator | |
| virtual const DtVdcColor & | color () const |
| color accessor | |
| virtual void | setColor (const DtVdcColor &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 | |
| DtVdcVector2D | myPosition |
| DtVdcColor | myColor |
| bool | myFlashing |
| DtString | myText |
| Dt2DGraphicalObjectTextStateRecord * | myStateRecord |
Private Member Functions | |
| DtText2DObject () | |
| Default constructor. | |
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.
| 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.
| id | Passed to DtDrawControlObject base (see) |
| text | The text to draw |
| position | X,Y position of bottom-left corner of text on the screen - values go from [0.,0.] (left,bottom) to [1.,1.] (right, top) |
| color | The color of the text |
| flashing | A 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
| virtual DtString vrvControlToolkit::DtText2DObject::text | ( | ) | const [virtual] |
text accessor
Get the actual text to draw
| virtual void vrvControlToolkit::DtText2DObject::setText | ( | const DtString & | text | ) | [virtual] |
text mutator
Set the text to be drawn
| text | The actual text to draw |
| virtual DtVdcVector2D vrvControlToolkit::DtText2DObject::position | ( | ) | const [virtual] |
position accessor
Get the text's bottom-left corner position
| virtual void vrvControlToolkit::DtText2DObject::setPosition | ( | const DtVdcVector2D & | position | ) | [virtual] |
position mutator
Set the text's bottom-left corner position
| 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
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| virtual void vrvControlToolkit::DtText2DObject::setColor | ( | const DtVdcColor & | color | ) | [virtual] |
color mutator
Set the color to use when drawing the text
| color | The 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
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
| flashing | true or false |
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| virtual void vrvControlToolkit::DtText2DObject::setFont | ( | const char * | fontFile, |
| float | size | ||
| ) | [virtual] |
font mutator
Set the font
| virtual void vrvControlToolkit::DtText2DObject::setRemoteGraphicSet | ( | const std::string & | setName | ) | [virtual] |
Reimplemented from vrvControlToolkit::DtDrawControlObject.
| 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.
DtVdcColor vrvControlToolkit::DtText2DObject::myColor [protected] |
bool vrvControlToolkit::DtText2DObject::myFlashing [protected] |
DtString vrvControlToolkit::DtText2DObject::myText [protected] |