CARMA C++
|
Base class for everything that can be put in a realtime display. More...
#include <carma/ui/rtd/common/RtDisplay.h>
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... | |
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.
|
virtual |
Destructor.
|
explicitprotected |
Constructor.
void carma::ui::rtd::RtObject::appendToolTipText | ( | const std::string & | text | ) |
Append more text to the existing tool tip text.
text | The text to append for this RtObject |
|
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.
parentFontSize | in points |
|
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 | ( | ) |
|
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.
fontSize | font 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.
fontSize | in points |
void carma::ui::rtd::RtObject::setLayout | ( | Layout | layout | ) |
void carma::ui::rtd::RtObject::setToolTipText | ( | const std::string & | text | ) |
|
pure virtual |
Creates a new string that is the dynamic ascii contents of this object.
The size of the string is fixed and described by serialize().
Implemented in carma::ui::rtd::RtTimePanel, carma::ui::rtd::RtTimeString, carma::ui::rtd::RtStatic, carma::ui::rtd::RtLabel, carma::ui::rtd::RtContainer, carma::ui::rtd::RtTitledObj, carma::ui::rtd::CellUChar, carma::ui::rtd::CellChar, carma::ui::rtd::CellShort, carma::ui::rtd::CellInt, carma::ui::rtd::CellDateUT, carma::ui::rtd::CellUT, carma::ui::rtd::CellDEC, carma::ui::rtd::CellRA, carma::ui::rtd::CellDble, carma::ui::rtd::CellFloat, carma::ui::rtd::CellCatString, carma::ui::rtd::CellCharString, carma::ui::rtd::CellString, carma::ui::rtd::CellEmpty, and carma::ui::rtd::MonitorCell.