CARMA C++
|
Realtime display - the whole enchilada. More...
#include <carma/ui/rtd/common/RtDisplay.h>
Public Member Functions | |
virtual void | checkReconfig () |
Check to see if reconfiguration has occurred and then call setReconfigured() if necessary. More... | |
::std::string | getProgramName () const |
Get the program name. More... | |
std::string | getTimestring () |
Get the time string from the time panel. More... | |
int | getUpdateRate () |
Get the update rate in milliseconds. More... | |
::std::string | getUpdateRateString () const |
Get a string representing the update rate. More... | |
void | incRequestCount () |
Increment the requestCount - normally this is done internally. More... | |
int | replyUpdate (int fontSize,::rtdproto::UIMessageReply &msg) |
Reply to "Upd" command; returns 0 on failure. More... | |
RtDisplay (const ::std::string &programName, const char *subtitle, const char *ut, const char *lst, bool visibleTimePanel=true) | |
Constructor. More... | |
RtDisplay (const ::std::string &programName, const char *subtitle, bool visibleTimePanel=true) | |
Constructor. More... | |
virtual void | serialize (bool initialize, int fontSize,::rtdproto::RtObject *rtobj) |
Static description of display to stdout. More... | |
virtual void | serialize (bool initialize, int fontSize,::rtdproto::UIMessageReply &msg) |
bool | serveData (bool forceInit=false) |
Serve the data. More... | |
void | setGenericHelp (const std::string &helpString) |
Set generic help string. More... | |
void | setGenericHelpFromTextFile (const ::std::string &filePath) |
Set help generic from a text file. More... | |
void | setGenericHelpFromTextFile (const ::std::string &title, const ::std::string &filePath) |
Set help specific to this display from a text file. More... | |
void | setReconfigured () |
Set that display has been reconfigured and that the client needs to be re-initialized. More... | |
void | setSpecificHelp (const ::std::string &helpString) |
Set help specific to this display. More... | |
void | setSpecificHelp (const ::std::string &title, const ::std::string &helpString) |
Set help specific to this display. More... | |
void | setSpecificHelpFromTextFile (const ::std::string &filePath) |
Set help specific to this display from a text file. More... | |
void | setSpecificHelpFromTextFile (const ::std::string &title, const ::std::string &filePath) |
Set help specific to this display from a text file. More... | |
void | setUpdateRate (int milliSeconds) |
Set update rate in milliseconds. More... | |
![]() | |
RtObjectPtr | add (RtObjectPtr rtObject) |
Insert an object into the container. More... | |
Border | getBorder () const |
::size_t | getNumObjects () const |
Get the number of objects in the container. More... | |
RtObjectPtr | getObj (::size_t index) const |
Get object from the container by index. More... | |
RtObjectPtr | replace (unsigned int i, RtObjectPtr rtObject) |
Replace an object in the container. More... | |
RtObjectPtr | replace (RtObjectPtr oldObj, RtObjectPtr newObj) |
void | setBorder (Border border) |
Set the border code. More... | |
virtual void | update () |
Update all objects contained by container. More... | |
virtual | ~RtContainer () |
Destructor. More... | |
![]() | |
std::string | getTitle () |
Get title. More... | |
void | setTitle (const std::string &title) |
Set title for object. More... | |
![]() | |
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 () |
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 | ~RtObject () |
Destructor. More... | |
Static Public Member Functions | |
static void | appendToFile (std::string str) |
Protected Member Functions | |
std::string | makeTitle (const std::string &subtitle) |
Make the title. Default is to prepend the sysName to the subtitle. More... | |
![]() | |
RtContainer () | |
Constructor. More... | |
RtContainer (const ::std::string &title) | |
Constructor. More... | |
RtContainer (Border border) | |
Constructor. More... | |
RtContainer (const ::std::string &title, Border border) | |
Constructor. More... | |
![]() | |
RtTitledObj (const std::string &title) | |
Constructor. More... | |
![]() | |
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... | |
Protected Attributes | |
std::string | genericHelp_ |
The genric help as one long string. More... | |
std::string | genericHelpTitle |
A title bar for the generic help. More... | |
std::string | specificHelp |
The help for this specific window as one long string. More... | |
std::string | specificHelpTitle |
A title bar for the specific help for this window. More... | |
const char * | sysName |
System name (prefix to every title bar) More... | |
![]() | |
size_t | numObjects_ |
ObjectContainerType | objects_ |
![]() | |
std::string | title_ |
Object title. More... | |
Additional Inherited Members | |
![]() | |
typedef ::std::vector < RtObjectPtr > | ObjectContainerType |
Realtime display - the whole enchilada.
The display contains all of the graphical object. It responds to "Ini" by describing itself (and everything that it contains) to stdout. This will include menu configuration and help text, so it can be several thousand characters. It responds to "Upd" with an update of its contents. This update string is simply the concatenation of the update strings of all of its contained components.
The Java client sends the "Upd" command and then the RtDisplay executes the preInternalUpdate() and internalUpdate() methods before calling the update() methods for all of the components. By over-ridding the private internalUpdate() method, variables can be evaluated before being used by the update() methods for individual components.
Definition at line 2315 of file RtDisplay.h.
carma::ui::rtd::RtDisplay::RtDisplay | ( | const ::std::string & | programName, |
const char * | subtitle, | ||
const char * | ut, | ||
const char * | lst, | ||
bool | visibleTimePanel = true |
||
) |
Constructor.
log | Reference to Program logger |
programName | As passed in to start program |
subtitle | put on the title bar of the display; this is prefaced by the system name |
ut | string for ut in time panel |
lst | string for lst in time panel |
visibleTimePanel | flag to make time panel visible |
carma::ui::rtd::RtDisplay::RtDisplay | ( | const ::std::string & | programName, |
const char * | subtitle, | ||
bool | visibleTimePanel = true |
||
) |
Constructor.
log | Reference to Program logger |
programName | As passed in to start program |
subtitle | put on the title bar of the display but is prefaced by the system name |
visibleTimePanel | flag to make time panel visible |
|
virtual |
Check to see if reconfiguration has occurred and then call setReconfigured() if necessary.
::std::string carma::ui::rtd::RtDisplay::getProgramName | ( | ) | const |
Get the program name.
std::string carma::ui::rtd::RtDisplay::getTimestring | ( | ) |
Get the time string from the time panel.
int carma::ui::rtd::RtDisplay::getUpdateRate | ( | ) |
Get the update rate in milliseconds.
::std::string carma::ui::rtd::RtDisplay::getUpdateRateString | ( | ) | const |
Get a string representing the update rate.
void carma::ui::rtd::RtDisplay::incRequestCount | ( | ) |
Increment the requestCount - normally this is done internally.
|
protected |
Make the title. Default is to prepend the sysName to the subtitle.
int carma::ui::rtd::RtDisplay::replyUpdate | ( | int | fontSize, |
::rtdproto::UIMessageReply & | msg | ||
) |
Reply to "Upd" command; returns 0 on failure.
|
virtual |
Static description of display to stdout.
Implements carma::ui::rtd::RtContainer.
bool carma::ui::rtd::RtDisplay::serveData | ( | bool | forceInit = false | ) |
Serve the data.
Listen for commands and reply appropriately.
forceInit | Does initization even when client does not request |
void carma::ui::rtd::RtDisplay::setGenericHelp | ( | const std::string & | helpString | ) |
Set generic help string.
void carma::ui::rtd::RtDisplay::setGenericHelpFromTextFile | ( | const ::std::string & | filePath | ) |
Set help generic from a text file.
void carma::ui::rtd::RtDisplay::setGenericHelpFromTextFile | ( | const ::std::string & | title, |
const ::std::string & | filePath | ||
) |
Set help specific to this display from a text file.
void carma::ui::rtd::RtDisplay::setReconfigured | ( | ) |
Set that display has been reconfigured and that the client needs to be re-initialized.
void carma::ui::rtd::RtDisplay::setSpecificHelp | ( | const ::std::string & | helpString | ) |
Set help specific to this display.
void carma::ui::rtd::RtDisplay::setSpecificHelp | ( | const ::std::string & | title, |
const ::std::string & | helpString | ||
) |
Set help specific to this display.
void carma::ui::rtd::RtDisplay::setSpecificHelpFromTextFile | ( | const ::std::string & | filePath | ) |
Set help specific to this display from a text file.
void carma::ui::rtd::RtDisplay::setSpecificHelpFromTextFile | ( | const ::std::string & | title, |
const ::std::string & | filePath | ||
) |
Set help specific to this display from a text file.
void carma::ui::rtd::RtDisplay::setUpdateRate | ( | int | milliSeconds | ) |
Set update rate in milliseconds.
|
protected |
The genric help as one long string.
It will automatically be wrapped on output n
Definition at line 2410 of file RtDisplay.h.
|
protected |
A title bar for the generic help.
Definition at line 2407 of file RtDisplay.h.
|
protected |
The help for this specific window as one long string.
Definition at line 2414 of file RtDisplay.h.
|
protected |
A title bar for the specific help for this window.
Definition at line 2412 of file RtDisplay.h.
|
protected |
System name (prefix to every title bar)
Definition at line 2403 of file RtDisplay.h.