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 | Protected Member Functions | Protected Attributes
makVrv::Dt2DTextBoxFacade Class Reference

Contains Dt2DTextBoxFacade class. More...

Public Member Functions

 Dt2DTextBoxFacade (DtAgentManagerInterface &, DtSceneObjectAgent *agent, DtElementID id, int modelSet)
 Constructor that will take an existing scene object agent.
 Dt2DTextBoxFacade (DtAgentManagerInterface &, int modelSet, DtElementID id, bool distribute=true)
 Will create a new scene object agent for the given model set and element id.
virtual ~Dt2DTextBoxFacade ()
 DTOR.
virtual void setFont (const std::string &font, int size)
 Sets the font and font size of the object.
virtual void getFont (std::string &, int &)
 Returns the font currently used and the font size.
virtual void setFontScale (float)
 Sets the scale of the font separate from the font size.
virtual float fontScale () const
 Returns the scale of the font.
virtual void setText (const DtUnicode &t)
 Sets the text to display in the object.
virtual const DtUnicodetext () const
 Returns the text in the text box.
virtual void setTextColor (float r, float g, float b, float a)
 Sets the color of the text.
virtual void setVisible (bool)
 Sets this text facade to be shown/hidden.
virtual void setSize (double w, double h)
 Sets size of text box. Text box will wrap at text box width.
virtual void getSize (double &w, double &h) const
 Gets the size of the text box.
virtual void setBoundsLength (int)
 Sets the number of characters to display per line.
virtual int boundsLength () const
 Returns number of characters to display per line.
virtual void setSizeConstraints (DtWidgetLabel::SizeConstraints)
 Sets the size contrainsts.
virtual void setTextAlignment (DtWidgetLabel::HorizontalAlignment)
 Sets the alignment.
virtual void setGlyphCenterPolicy (DtWidgetLabel::GlyphCenterPolicy)
 Sets the center policy.
virtual void setColor (float r, float g, float b, float a)
 Sets the background color.
virtual void setOrigin (float x, float y)
 Sets the offset position.
virtual makVrv::DtUniqueID uniqueId () const
 Returns the unique id of the scene object agent.
virtual makVrv::DtElementID elementId () const
 Returns the element id of the scene object agent.
virtual int modelSet () const
 Returns the model set.
virtual void setEventsEnabled (bool)
 Sets whether or not facade is pickable. Default is true.
virtual void setDatabaseOrigin (const DtVector &)
 Sets the origin of the text box in database space.
DtSceneObjectAgent * sceneObjectAgent () const
DtWidgetLabelAgent * widgetLabelAgent () const
DtProjectedWidgetModelAgent * projectedWidgetAgent () const

Protected Member Functions

void createTextAgents ()
 Creates the agents used to display text. Called from constructor.

Protected Attributes

DtUnicode myText
DtSceneObjectAgent * mySceneObjectAgent
DtAgentManagerInterfacemyAgentManagerInterface
bool myOwnsSceneObjectAgent
DtWidgetLabelAgent * myTextAgent
DtProjectedWidgetModelAgent * myProjectedWidgetAgent
int myModelSet
double myWidth
double myHeight
std::string myFont
int myPointSize
int myBoundsLength
float myFontScale
bool myAdjustYOffsetToTextHeight
float myOriginX
float myOriginY
makVrv::DtElementID myElementId

Detailed Description

Contains Dt2DTextBoxFacade class.

Facade for a 2D (overlay) TextBox.

Constructor & Destructor Documentation

makVrv::Dt2DTextBoxFacade::Dt2DTextBoxFacade ( DtAgentManagerInterface ,
DtSceneObjectAgent *  agent,
DtElementID  id,
int  modelSet 
)

Constructor that will take an existing scene object agent.

makVrv::Dt2DTextBoxFacade::Dt2DTextBoxFacade ( DtAgentManagerInterface ,
int  modelSet,
DtElementID  id,
bool  distribute = true 
)

Will create a new scene object agent for the given model set and element id.

virtual makVrv::Dt2DTextBoxFacade::~Dt2DTextBoxFacade ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::Dt2DTextBoxFacade::setFont ( const std::string &  font,
int  size 
)
virtual

Sets the font and font size of the object.

virtual void makVrv::Dt2DTextBoxFacade::getFont ( std::string &  ,
int  
)
virtual

Returns the font currently used and the font size.

virtual void makVrv::Dt2DTextBoxFacade::setFontScale ( float  )
virtual

Sets the scale of the font separate from the font size.

The font scale will be multiplied by the existing fontSize to effect a larger font without changing the point size of the font

virtual float makVrv::Dt2DTextBoxFacade::fontScale ( ) const
virtual

Returns the scale of the font.

virtual void makVrv::Dt2DTextBoxFacade::setText ( const DtUnicode t)
virtual

Sets the text to display in the object.

virtual const DtUnicode& makVrv::Dt2DTextBoxFacade::text ( ) const
virtual

Returns the text in the text box.

virtual void makVrv::Dt2DTextBoxFacade::setTextColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color of the text.

virtual void makVrv::Dt2DTextBoxFacade::setVisible ( bool  )
virtual

Sets this text facade to be shown/hidden.

virtual void makVrv::Dt2DTextBoxFacade::setSize ( double  w,
double  h 
)
virtual

Sets size of text box. Text box will wrap at text box width.

virtual void makVrv::Dt2DTextBoxFacade::getSize ( double w,
double h 
) const
virtual

Gets the size of the text box.

virtual void makVrv::Dt2DTextBoxFacade::setBoundsLength ( int  )
virtual

Sets the number of characters to display per line.

virtual int makVrv::Dt2DTextBoxFacade::boundsLength ( ) const
virtual

Returns number of characters to display per line.

virtual void makVrv::Dt2DTextBoxFacade::setSizeConstraints ( DtWidgetLabel::SizeConstraints  )
virtual

Sets the size contrainsts.

See Also
makVrv::DtWidgetLabel::SizeConstraints
virtual void makVrv::Dt2DTextBoxFacade::setTextAlignment ( DtWidgetLabel::HorizontalAlignment  )
virtual

Sets the alignment.

See Also
makVrv::DtWidgetLabel::HorizontalAlignment. Centered by default
virtual void makVrv::Dt2DTextBoxFacade::setGlyphCenterPolicy ( DtWidgetLabel::GlyphCenterPolicy  )
virtual

Sets the center policy.

See Also
makVrv::DtWidgetLabel::GlyphCenterPolicy. AlignTextToHeight by default
virtual void makVrv::Dt2DTextBoxFacade::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the background color.

virtual void makVrv::Dt2DTextBoxFacade::setOrigin ( float  x,
float  y 
)
virtual

Sets the offset position.

virtual makVrv::DtUniqueID makVrv::Dt2DTextBoxFacade::uniqueId ( ) const
virtual

Returns the unique id of the scene object agent.

virtual makVrv::DtElementID makVrv::Dt2DTextBoxFacade::elementId ( ) const
virtual

Returns the element id of the scene object agent.

virtual int makVrv::Dt2DTextBoxFacade::modelSet ( ) const
virtual

Returns the model set.

virtual void makVrv::Dt2DTextBoxFacade::setEventsEnabled ( bool  )
virtual

Sets whether or not facade is pickable. Default is true.

virtual void makVrv::Dt2DTextBoxFacade::setDatabaseOrigin ( const DtVector )
virtual

Sets the origin of the text box in database space.

DtSceneObjectAgent* makVrv::Dt2DTextBoxFacade::sceneObjectAgent ( ) const

Returns the various agents used by this class

DtWidgetLabelAgent* makVrv::Dt2DTextBoxFacade::widgetLabelAgent ( ) const
DtProjectedWidgetModelAgent* makVrv::Dt2DTextBoxFacade::projectedWidgetAgent ( ) const
void makVrv::Dt2DTextBoxFacade::createTextAgents ( )
protected

Creates the agents used to display text. Called from constructor.

Member Data Documentation

DtUnicode makVrv::Dt2DTextBoxFacade::myText
protected
DtSceneObjectAgent* makVrv::Dt2DTextBoxFacade::mySceneObjectAgent
protected
DtAgentManagerInterface& makVrv::Dt2DTextBoxFacade::myAgentManagerInterface
protected
bool makVrv::Dt2DTextBoxFacade::myOwnsSceneObjectAgent
protected
DtWidgetLabelAgent* makVrv::Dt2DTextBoxFacade::myTextAgent
protected
DtProjectedWidgetModelAgent* makVrv::Dt2DTextBoxFacade::myProjectedWidgetAgent
protected
int makVrv::Dt2DTextBoxFacade::myModelSet
protected
double makVrv::Dt2DTextBoxFacade::myWidth
protected
double makVrv::Dt2DTextBoxFacade::myHeight
protected
std::string makVrv::Dt2DTextBoxFacade::myFont
protected
int makVrv::Dt2DTextBoxFacade::myPointSize
protected
int makVrv::Dt2DTextBoxFacade::myBoundsLength
protected
float makVrv::Dt2DTextBoxFacade::myFontScale
protected
bool makVrv::Dt2DTextBoxFacade::myAdjustYOffsetToTextHeight
protected
float makVrv::Dt2DTextBoxFacade::myOriginX
protected
float makVrv::Dt2DTextBoxFacade::myOriginY
protected
makVrv::DtElementID makVrv::Dt2DTextBoxFacade::myElementId
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)