VR-Forces 4.1.1 Class Documentation
List of all members | Public Types | Public Member Functions | Protected Attributes
trpgLabel Class Reference
Inheritance diagram for trpgLabel:
Inheritance graph
[legend]

Public Types

enum  AlignmentType { Left, Center, Right, MaxAlignmentType }

Public Member Functions

 trpgLabel (void)
 ~trpgLabel (void)
bool isValid (void) const
 Returns the state of the valid flag, or can be overriden by a subclass to do a more complex check.
void SetProperty (int)
 Set the label property ID. This is an index into a tprgLabelPropertyTable.
int GetProperty () const
void SetText (const std::string &)
 Set the text for this label. See GetText() for more information.
const std::string * GetText (void) const
void SetAlignment (AlignmentType)
 Set the text alignment. See GetAlignmentType() for more information.
AlignmentType GetAlignment (void) const
void SetTab (int)
 Set the number of spaces between tabs.
int GetTab (void) const
 Get the number of spaces between tabs.
void SetScale (float32)
 Set the text scaling value: font size * scale = real world text size in meter.
float32 GetScale () const
void SetThickness (float32)
 Set the text thickness: use to draw 3D text.
float32 GetThickness () const
void SetDesc (const std::string &)
 Set the description for this label. Set GetDesc() for more information.
const std::string * GetDesc (void) const
void SetURL (const std::string &)
 Set the URL for this label. See GetURL() for more information.
const std::string * GetURL (void) const
void SetTabSize (int)
 Set the number of spaces between tabs.
int GetTabSize (void) const
 Get the number of spaces between tabs.
void SetLocation (const trpg3dPoint &)
 Set the location of the label.
const trpg3dPointGetLocation () const
void AddSupport (const trpg3dPoint &)
 Add a support. See GetSupports() for more information.
const std::vector< trpg3dPoint > * GetSupports (void) const
bool Write (trpgWriteBuffer &)
 Writes this class to a write buffer.
bool Read (trpgReadBuffer &)
 Reads this class from a read buffer.
bool Print (trpgPrintBuffer &) const
 Prints this class to a print buffer.
void Reset (void)
 Resets the contents back to empty.
- Public Member Functions inherited from trpgReadWriteable
 trpgReadWriteable ()
const char * getErrMess () const
- Public Member Functions inherited from trpgCheckable
 trpgCheckable (void)
virtual ~trpgCheckable (void)
virtual TeAttrHdl GetHandle () const
virtual void SetHandle (TeAttrHdl hdl)

Protected Attributes

int propertyId
std::string text
AlignmentType alignment
 Actual label text. May contain formatting.
int tabSize
float32 scale
float32 thickness
std::string desc
std::string url
trpg3dPoint location
std::vector< trpg3dPointsupports
- Protected Attributes inherited from trpgReadWriteable
char errMess [512]
- Protected Attributes inherited from trpgCheckable
bool valid
TeAttrHdl handle
bool writeHandle

Member Enumeration Documentation

Enumerator:
Left 
Center 
Right 
MaxAlignmentType 

Constructor & Destructor Documentation

trpgLabel::trpgLabel ( void  )
trpgLabel::~trpgLabel ( void  )

Member Function Documentation

bool trpgLabel::isValid ( void  ) const

Returns the state of the valid flag, or can be overriden by a subclass to do a more complex check.

Reimplemented from trpgCheckable.

void trpgLabel::SetProperty ( int  )

Set the label property ID. This is an index into a tprgLabelPropertyTable.

int trpgLabel::GetProperty ( ) const
void trpgLabel::SetText ( const std::string &  )

Set the text for this label. See GetText() for more information.

const std::string* trpgLabel::GetText ( void  ) const
void trpgLabel::SetAlignment ( AlignmentType  )

Set the text alignment. See GetAlignmentType() for more information.

AlignmentType trpgLabel::GetAlignment ( void  ) const
void trpgLabel::SetTab ( int  )

Set the number of spaces between tabs.

int trpgLabel::GetTab ( void  ) const

Get the number of spaces between tabs.

void trpgLabel::SetScale ( float32  )

Set the text scaling value: font size * scale = real world text size in meter.

float32 trpgLabel::GetScale ( ) const
void trpgLabel::SetThickness ( float32  )

Set the text thickness: use to draw 3D text.

if thickness = 0, we have 2D text only.

float32 trpgLabel::GetThickness ( ) const
void trpgLabel::SetDesc ( const std::string &  )

Set the description for this label. Set GetDesc() for more information.

const std::string* trpgLabel::GetDesc ( void  ) const
void trpgLabel::SetURL ( const std::string &  )

Set the URL for this label. See GetURL() for more information.

const std::string* trpgLabel::GetURL ( void  ) const
void trpgLabel::SetTabSize ( int  )

Set the number of spaces between tabs.

int trpgLabel::GetTabSize ( void  ) const

Get the number of spaces between tabs.

void trpgLabel::SetLocation ( const trpg3dPoint )

Set the location of the label.

const trpg3dPoint& trpgLabel::GetLocation ( ) const
void trpgLabel::AddSupport ( const trpg3dPoint )

Add a support. See GetSupports() for more information.

const std::vector<trpg3dPoint>* trpgLabel::GetSupports ( void  ) const
bool trpgLabel::Write ( trpgWriteBuffer )
virtual

Writes this class to a write buffer.

Implements trpgReadWriteable.

bool trpgLabel::Read ( trpgReadBuffer )
virtual

Reads this class from a read buffer.

Reimplemented from trpgReadWriteable.

bool trpgLabel::Print ( trpgPrintBuffer ) const
virtual

Prints this class to a print buffer.

Reimplemented from trpgReadWriteable.

void trpgLabel::Reset ( void  )
virtual

Resets the contents back to empty.

Implements trpgReadWriteable.

Member Data Documentation

int trpgLabel::propertyId
protected
std::string trpgLabel::text
protected
AlignmentType trpgLabel::alignment
protected

Actual label text. May contain formatting.

int trpgLabel::tabSize
protected
float32 trpgLabel::scale
protected
float32 trpgLabel::thickness
protected
std::string trpgLabel::desc
protected
std::string trpgLabel::url
protected
trpg3dPoint trpgLabel::location
protected
std::vector<trpg3dPoint> trpgLabel::supports
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)