![]() |
VR-Vantage API Documentation
|
A 2D Text Stealth Draw Control Object. More...

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 DtSdcColor & | color () 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 | |
Public Member Functions inherited from DtSdcObject | |
| DtSdcObject (DtExerciseConn *exConn, unsigned id, const DtString &objName) | |
| Parameterized constructor. | |
| virtual | ~DtSdcObject () |
| Virtual destructor. | |
| virtual unsigned | id () const |
| id accessor | |
| virtual void | setId (unsigned id) |
| id mutator | |
| virtual const DtGlobalObjectDesignator & | globalId () const |
| virtual void | setVisible (bool yesNo) |
| virtual bool | visible () const |
Protected Attributes | |
| DtSdcVector2D | myPosition |
| DtSdcColor | myColor |
| bool | myFlashing |
| DtString | myText |
| Dt2DGraphicalObjectTextStateRecord * | myStateRecord |
Protected Attributes inherited from DtSdcObject | |
| unsigned | myId |
| DtEnvironmentProcessPublisher | myPublisher |
| bool | myVisible |
| DtSdcColor | myEmptyColor |
Private Member Functions | |
| DtSdcText2DObject () | |
| Default constructor. | |
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.
| 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.
| id | Passed to DtSdcObject 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 |
References Dt2DGraphicalObjectCategoryText, Dt2DGraphicalObjectKind, DtEnv2DGraphicalObjectTextStateRecordType, DtSdcObject::id(), myColor, myFlashing, myPosition, DtSdcObject::myPublisher, myStateRecord, myText, setColor(), setFlashing(), setFont(), Dt2DGraphicalObjectStateRecord::setNumberOfVertices(), setPosition(), and setText().
|
virtual |
|
private |
Default constructor.
Private and not implemented - you must supply an id and basic geometric parameters to construct the ellipse or rectangle
|
virtual |
|
virtual |
text mutator
Set the text to be drawn
| text | The actual text to draw |
References myStateRecord, myText, Dt2DGraphicalObjectStateRecord::setUserData(), and text().
Referenced by DtSdcText2DObject().
|
virtual |
position accessor
Get the text's bottom-left corner position
References myPosition.
Referenced by setPosition().
|
virtual |
position mutator
Set the text's bottom-left corner position
| position | [0.,0] (left, bottom) to [1.,1.] (right, top) |
References myPosition, myStateRecord, position(), Dt2DGraphicalObjectStateRecord::setVertex(), and DtSdcVector2D::vector3D().
Referenced by DtSdcText2DObject().
|
virtual |
color accessor
Get the color assigned to the text
Reimplemented from DtSdcObject.
References myColor.
Referenced by setColor().
|
virtual |
color mutator
Set the color to use when drawing the text
| color | The DtSdcColor to use |
Reimplemented from DtSdcObject.
References DtSdcColor::alpha(), DtSdcColor::blue(), color(), DtSdcColor::green(), myColor, myStateRecord, DtSdcColor::red(), and Dt2DGraphicalObjectStateRecord::setColor().
Referenced by DtSdcText2DObject().
|
virtual |
flashing accessor
Get the boolean that indicates whether or not the text should flash
Reimplemented from DtSdcObject.
References myFlashing.
Referenced by setFlashing().
|
virtual |
flashing mutator
Set the boolean that indicates whether or not the text should flash
| flashing | true or false |
Reimplemented from DtSdcObject.
References flashing(), myFlashing, myStateRecord, and Dt2DGraphicalObjectStateRecord::setFlashing().
Referenced by DtSdcText2DObject().
|
virtual |
font mutator
Set the font
References myStateRecord, Dt2DGraphicalObjectTextStateRecord::setFontName(), and Dt2DGraphicalObjectTextStateRecord::setFontSize().
Referenced by DtSdcText2DObject().
|
virtual |
Reimplemented from DtSdcObject.
References myStateRecord, Dt2DGraphicalObjectStateRecord::setNumberOfParentOverlays(), and Dt2DGraphicalObjectStateRecord::setParentOverlay().
|
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.
References DtSdcObject::myPublisher, and myStateRecord.
|
protected |
Referenced by DtSdcText2DObject(), position(), and setPosition().
|
protected |
Referenced by color(), DtSdcText2DObject(), and setColor().
|
protected |
Referenced by DtSdcText2DObject(), flashing(), and setFlashing().
|
protected |
Referenced by DtSdcText2DObject(), setText(), and text().
|
protected |
Referenced by DtSdcText2DObject(), setColor(), setFlashing(), setFont(), setPosition(), setRemoteGraphicSet(), setText(), and update().