CARMA C++
carma::ui::rtd::RtObject Class Referenceabstract

Base class for everything that can be put in a realtime display. More...

#include <carma/ui/rtd/common/RtDisplay.h>

Inheritance diagram for carma::ui::rtd::RtObject:
carma::ui::rtd::Cell carma::ui::rtd::RtLabel carma::ui::rtd::RtStatic carma::ui::rtd::RtTimePanel carma::ui::rtd::RtTimeString carma::ui::rtd::RtTitledObj carma::ui::rtd::CellCatString carma::ui::rtd::CellChar carma::ui::rtd::CellCharString carma::ui::rtd::CellDble carma::ui::rtd::CellEmpty carma::ui::rtd::CellFloat carma::ui::rtd::CellInt carma::ui::rtd::CellShort carma::ui::rtd::CellString carma::ui::rtd::CellUChar carma::ui::rtd::CellUT carma::ui::rtd::MonitorCell carma::ui::rtd::RtSpacer carma::ui::rtd::RtSpring carma::ui::rtd::RtColumn carma::ui::rtd::RtContainer carma::ui::rtd::RtMenu carma::ui::rtd::RtRow

Public Member Functions

void appendToolTipText (const std::string &text)
 Append more text to the existing tool tip text. More...
 
Layout getLayout () const
 Get the layout for this object. More...
 
std::string getToolTipText ()
 
virtual void serialize (bool initialize, int fontSize,::rtdproto::RtObject *rtobj)=0
 Describes the static structure of this object in ascii to stdout. More...
 
void setFontSize (int fontSize)
 Set the absolute font size for this object. More...
 
void setLayout (Layout layout)
 Set the layout for this object. More...
 
void setToolTipText (const std::string &text)
 Set the tool tip text for this RtObject. More...
 
virtual void update ()=0
 Creates a new string that is the dynamic ascii contents of this object. More...
 
virtual ~RtObject ()
 Destructor. More...
 

Protected Member Functions

int getFontSize (int parentFontSize) const
 Get the absolute font size for this object. More...
 
int getFontSize () const
 Get the absolute font size for this object. More...
 
 RtObject ()
 Constructor. More...
 

Detailed Description

Base class for everything that can be put in a realtime display.

As with most graphical representations, a display is created by nesting containers inside of containers that eventually contain the base graphical elements. The base graphical elements can be static items, like spaces or labels, or dynamic elements that change with time. Most of the dynamic items are displayed inside of realtime cells that contain ascii text. The standard way of creating the display is to nest (by creating and adding into other elements) the graphical containers and elements that make up the display. The dynamic data elements are referred to by address when those elements are created. The display can then be "updated()", and all graphical elements within it updated by referring to the data by address. Two fundamental constructs are embedded in this class: type code and layout code

Definition at line 84 of file RtDisplay.h.

Constructor & Destructor Documentation

virtual carma::ui::rtd::RtObject::~RtObject ( )
virtual

Destructor.

carma::ui::rtd::RtObject::RtObject ( )
explicitprotected

Constructor.

Member Function Documentation

void carma::ui::rtd::RtObject::appendToolTipText ( const std::string &  text)

Append more text to the existing tool tip text.

Parameters
textThe text to append for this RtObject
int carma::ui::rtd::RtObject::getFontSize ( int  parentFontSize) const
protected

Get the absolute font size for this object.

If it hasn't been set, then the font size of the parent will be used.

Parameters
parentFontSizein points
int carma::ui::rtd::RtObject::getFontSize ( ) const
protected

Get the absolute font size for this object.

Note that it is initialized to zero, so it is preferable to use getFontSize(parentFontSize)

Layout carma::ui::rtd::RtObject::getLayout ( ) const

Get the layout for this object.

Layouts are hints to the RtArea layout manager,

std::string carma::ui::rtd::RtObject::getToolTipText ( )
Returns
the tool tip text for this RtObject
virtual void carma::ui::rtd::RtObject::serialize ( bool  initialize,
int  fontSize,
::rtdproto::RtObject *  rtobj 
)
pure virtual

Describes the static structure of this object in ascii to stdout.

This virtual method must be provided for each new type of object. Each will have its own way of serializing itself that must be understood by the Java client (based on the object type). Its actually pretty simple.

Parameters
fontSizefont size of the parent

Implemented in carma::ui::rtd::RtDisplay, carma::ui::rtd::RtTimePanel, carma::ui::rtd::RtTimeString, carma::ui::rtd::RtSpacer, carma::ui::rtd::RtSpring, carma::ui::rtd::RtStatic, carma::ui::rtd::RtBox, carma::ui::rtd::RtTable, carma::ui::rtd::RtArea, carma::ui::rtd::RtLabel, carma::ui::rtd::RtContainer, carma::ui::rtd::RtColumn, carma::ui::rtd::RtRow, carma::ui::rtd::RtTitledObj, carma::ui::rtd::Cell, and carma::ui::rtd::RtMenu.

void carma::ui::rtd::RtObject::setFontSize ( int  fontSize)

Set the absolute font size for this object.

Parameters
fontSizein points
void carma::ui::rtd::RtObject::setLayout ( Layout  layout)

Set the layout for this object.

Layouts are hints to the RtArea layout manager, but not all objects will use RtArea so this layout will not always be used.

Parameters
layoutlayout to use
See Also
RtArea
void carma::ui::rtd::RtObject::setToolTipText ( const std::string &  text)

Set the tool tip text for this RtObject.

Parameters
textThe text of the tool tip for this RtObject

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