1 #ifndef CARMA_UI_RTD_RTDISPLAY_H
2 #define CARMA_UI_RTD_RTDISPLAY_H
25 #include <boost/shared_ptr.hpp>
28 class UIMessageRequest;
43 class ReaderWithTimeout;
52 EOL_RIGHT_JUSTIFIED_LAYOUT,
53 EOL_LEFT_JUSTIFIED_LAYOUT
97 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj) = 0;
104 virtual void update( ) = 0;
166 std::string toolTipText_;
170 typedef boost::shared_ptr<RtObject> RtObjectPtr;
240 explicit Format(
const char * s );
245 void fmt(
const char * s );
272 LIGHT_GRAY_CELL_COLOR,
273 STRIPE_LIGHT_CELL_COLOR,
274 STRIPE_DARK_CELL_COLOR,
275 LIGHT_GRAY_TEXT_CELL_COLOR,
280 typedef boost::shared_ptr<Cell> CellPtr;
317 explicit Cell(
const char* fmt,
int altLen=0);
327 explicit Cell(
const Format& fmt,
int altLen=0);
342 void setGrayedOut(
bool state) { grayedOut_ = state; }
344 bool isGrayedOut() {
return grayedOut_; }
350 void setEmpty(
bool state);
388 void setBorderRightEnabled(
bool state) { borderRightEnabled_ = state; }
389 void setBorderBottomEnabled(
bool state) { borderBottomEnabled_ = state; }
390 void setBorderLeftEnabled(
bool state) { borderLeftEnabled_ = state; }
410 void clearActiveAlternative( );
412 bool alternativeIsActive( )
const;
447 void setPlotLabel(
int a,
bool dev, const ::std::string & s);
459 void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
472 void setCellName(
const std::string &s) {
476 std::string getCellName()
const {
480 void setDynamicDescription(
const std::string &s) {
481 dynamicDescription_ = s;
484 std::string getDynamicDescription()
const {
485 return dynamicDescription_;
523 char getPlottableCode( )
const;
532 ::std::string centerString( const ::std::string & s,
533 bool fmtMode )
const;
541 const int maxAlternativeLength_;
544 int activeAlternative_;
547 ::std::vector< Alternative > alternatives_;
550 ::std::string alternativesErrText_;
562 ::std::string plotLabel_;
565 ::std::string invalString_;
568 ::std::string overflowString_;
574 ::std::string naString_;
577 ::std::string noHwString_;
584 bool borderTopEnabled_;
585 bool borderRightEnabled_;
586 bool borderBottomEnabled_;
587 bool borderLeftEnabled_;
589 std::string cellName_;
590 std::string dynamicDescription_;
623 const ::std::string& dataStringRef );
626 const ::std::string& dataStringRef,
639 const ::std::string& dataStringRef,
649 const ::std::string& dataStringRef );
652 const ::std::string& dataStringRef,
665 const ::std::string& dataStringRef,
680 const ::std::string & dataStringRef_;
786 CellCatString(
const char* fmt,
const char* legit,
const char* pre,
787 const char* suf,
int altLen);
795 CellCatString(
const char* fmt,
const char* pre,
const char* suf);
818 const char* suf,
int altLen);
877 CellFloat(
const char* fmt,
int rod,
const char* legit,
const float& data,
886 CellFloat(
const char* fmt,
int rod,
const float& data);
925 CellDble(
const char* fmt,
int rod,
const char* legit,
const double& data,
934 CellDble(
const char* fmt,
int rod,
const double& data);
973 CellRADEC(
const char* fmt,
int rod,
const double& radec,
const char* sourceType);
980 ::std::ostringstream scratchOSS_;
996 CellRA(
const char* fmt,
int rod,
const char*
legit,
const double& ra,
1007 CellRA(
const char* fmt,
int rod,
const double& ra,
const char* sourceType);
1024 CellDEC(
const char* fmt,
int rod,
const char*
legit,
const double& dec,
1035 CellDEC(
const char* fmt,
int rod,
const double& dec,
const char* sourceType);
1052 CellUT(
const char* fmt,
int rod,
const char*
legit,
const double& _mjd);
1061 CellUT(
const char* fmt,
int rod,
const double& _mjd);
1073 ::std::ostringstream scratchOSS_;
1097 CellDateUT(
const char* fmt,
int rod,
const char*
legit,
const double& _mjd,
1108 CellDateUT(
const char* fmt,
int rod,
const double& _mjd,
int choice=0);
1141 CellInt(
const char* fmt,
const char* legit,
const int& data,
int altLen);
1184 CellShort(
const char* fmt,
const char* legit,
const short& data,
int altLen);
1191 CellShort(
const char* fmt,
const short& data);
1223 CellChar(
const char* fmt,
const char* legit,
const char& data,
int altLen);
1230 CellChar(
const char* fmt,
const char& data);
1270 CellUChar(
const char* fmt,
const char* legit,
const unsigned char& data,
1278 CellUChar(
const char* fmt,
const unsigned char& data);
1305 void setTitle(
const std::string& title);
1312 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj) = 0;
1330 typedef boost::shared_ptr<RtRow> RtRowPtr;
1342 RtRow(const ::std::string & rowLabel);
1343 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
1344 static RtRowPtr makeRow(const ::std::string & rowLabel) {
1345 return RtRowPtr(
new RtRow(rowLabel));
1352 typedef boost::shared_ptr<RtColumn> RtColPtr;
1353 typedef boost::shared_ptr<RtColumn> RtColumnPtr;
1365 RtColumn(const ::std::string& colLabel);
1366 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
1367 static RtColPtr makeCol(const ::std::string& colLabel) {
1368 return RtColPtr(
new RtColumn(colLabel));
1370 static RtColPtr makeColumn(const ::std::string& colLabel) {
1371 return RtColPtr(
new RtColumn(colLabel));
1379 TWO_PIXELS_ALL_SIDES_BORDER,
1380 TWO_PIXELS_LEFT_RIGHT_BOTTOM_BORDER,
1381 TWO_PIXELS_BELOW_BORDER,
1382 ONE_PIXEL_ABOVE_BORDER,
1383 ONE_PIXEL_BELOW_BORDER,
1384 ONE_PIXEL_RIGHT_BORDER,
1385 ONE_PIXEL_LEFT_BORDER,
1405 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj) = 0;
1412 Border getBorder()
const;
1421 RtObjectPtr
add(RtObjectPtr rtObject);
1427 RtObjectPtr
replace(
unsigned int i, RtObjectPtr rtObject);
1428 RtObjectPtr
replace(RtObjectPtr oldObj, RtObjectPtr newObj);
1434 RtObjectPtr
getObj( ::
size_t index )
const;
1460 typedef ::std::vector< RtObjectPtr > ObjectContainerType;
1461 ObjectContainerType objects_;
1466 std::string::size_type updateReserve_;
1489 explicit RtLabel(
const std::string& label);
1498 RtLabel(
const std::string& label,
char layoutCode);
1506 RtLabel(
const std::string& label,
int relFontSize);
1509 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
1524 void setLabel(
const std::string& label);
1539 ::std::string label_;
1546 typedef boost::shared_ptr<RtLabel> RtLabelPtr;
1593 explicit RtArea( const ::std::string & title );
1604 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
1630 CellPtr
addItem(RtLabelPtr label, CellPtr cell, RtLabelPtr units);
1638 CellPtr
addItem(const ::std::string & label, CellPtr cell,
const char* units);
1646 CellPtr
addItem(const ::std::string & label, CellPtr cell, RtLabelPtr units);
1653 CellPtr
addItem(const ::std::string & label, CellPtr cell);
1661 CellPtr
addCell(
const char* fmt,
char* legit,
const char*
string);
1669 CellPtr
addCell(
const char* fmt,
const char*
string);
1678 CellPtr
addItem(const ::std::string & label,
const char* fmt,
char* legit,
const char*
string);
1687 CellPtr
addItem(const ::std::string & label,
const char* fmt,
const char*
string);
1696 CellPtr
addItem(const ::std::string & label,
const char* fmt,
char* legit,
short& data);
1706 CellPtr
addItem(const ::std::string & label,
const char* fmt,
char* legit,
int& data);
1715 CellPtr
addItem(const ::std::string & label,
const char* fmt,
int rod,
char* legit,
double& data);
1729 typedef boost::shared_ptr<RtArea> RtAreaPtr;
1762 explicit RtTable( const ::std::string & title );
1776 RtRowPtr
addRow( RtRowPtr rowObj );
1779 RtColPtr
addCol( RtColPtr colObj );
1782 CellPtr
addCell(CellPtr cell);
1785 void addCols(
int numOfCols,
const char* names[]);
1810 void setRowLabel(
int rowNo,
const std::string& label);
1831 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
1845 std::string::size_type tableUpdateReserve_;
1848 char displayRowLabelsCode_;
1851 char displayColLabelsCode_;
1870 ::std::string labelPrefix_;
1873 std::vector< RtColPtr > cols_;
1876 std::vector< RtRowPtr > rows_;
1879 std::vector<CellPtr> cells_;
1882 typedef boost::shared_ptr<RtTable> RtTablePtr;
1929 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
1938 STRETCH_PROPORTIONAL,
1947 RtBox(BoxType type,
const std::string& title);
1960 RtBox(BoxType type,
const std::string& title,
Border border);
1964 const BoxType boxType_;
1966 StretchType stretchType_;
1968 double stretchFactor_;
1973 typedef boost::shared_ptr<RtBox> RtBoxPtr;
1986 explicit RtVBox(
const std::string& title);
2004 typedef boost::shared_ptr<RtVBox> RtVBoxPtr;
2017 explicit RtHBox(
const std::string& title);
2035 typedef boost::shared_ptr<RtHBox> RtHBoxPtr;
2049 explicit RtFolder(
const std::string & title);
2067 typedef boost::shared_ptr<RtFolder> RtFolderPtr;
2080 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj) = 0;
2100 RtSpring(
int minWidth,
int prefWidth,
double springiness);
2108 RtSpring(
int minWidth,
double springiness);
2116 RtSpring(
int minWidth,
int prefWidth);
2139 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
2145 const int prefWidth;
2147 const double springiness;
2150 typedef boost::shared_ptr<RtSpring> RtSpringPtr;
2165 RtSpacer(
int minWidth,
int prefWidth,
double weight);
2172 RtSpacer(
int minWidth,
int prefWidth);
2179 RtSpacer(
int minWidth,
double weight);
2186 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
2191 const int prefWidth;
2193 const double weight;
2196 typedef boost::shared_ptr<RtSpacer> RtSpacerPtr;
2216 void change(
const char* ut,
const char* lst);
2222 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
2228 const int lstWidth_;
2231 const int localWidth_;
2234 const ::std::auto_ptr< services::AstroTime > astroTime_;
2243 ::std::ostringstream scratchOSS_;
2246 ::std::string output_;
2268 RtTimePanel(
const char* ut,
const char* lst,
bool visible);
2275 void change(
const char* ut,
const char* lst,
bool visible =
true);
2284 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
2293 typedef boost::shared_ptr<RtTimePanel> RtTimePanelPtr;
2327 RtDisplay( const ::std::string & programName,
2328 const char * subtitle,
2331 bool visibleTimePanel =
true );
2341 RtDisplay( const ::std::string & programName,
2342 const char * subtitle,
2343 bool visibleTimePanel =
true );
2345 static void appendToFile(std::string str);
2351 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::RtObject *rtobj);
2352 virtual void serialize(
bool initialize,
int fontSize, ::rtdproto::UIMessageReply &msg);
2374 const ::std::string & helpString );
2380 const ::std::string & filePath );
2386 const ::std::string& filePath );
2395 int replyUpdate(
int fontSize, ::rtdproto::UIMessageReply &msg);
2405 std::string
makeTitle(
const std::string& subtitle);
2419 int replyIni(
int fontSize, ::rtdproto::UIMessageReply &msg,
bool reInitialize=
false);
2429 char visibleTimePanel;
2433 ::std::string formatUpdateRate(const ::std::string &);
2441 virtual void preInternalUpdate( ) { }
2449 virtual void internalUpdate( ) { }
2451 void setUpdateRateString( const ::std::string & s );
2454 const ::std::string programName_;
2456 ::std::string updateRateString_;
2459 boost::shared_ptr< ::rtdproto::UIMessageReply > legacyMessage_;
int getFontSize() const
Get the absolute font size for this object.
RtFolder(const std::string &title)
Constructor.
RtSpacer(int minWidth, int prefWidth, double weight)
Constructor.
void setNotruncate()
Set cell to not truncate string, but display stars if it overflows cell.
Cell(int indent, int chars, int width)
Constructor.
Base class for everything that can be put in a realtime display.
void setSpecificHelp(const ::std::string &helpString)
Set help specific to this display.
virtual void update()
Updates the cell contents.
void setPrefRows(::size_t prefRows)
Set the default number of rows to display.
Time string sends over the UT, LST and local time.
A base bordered container class for RtObjects.
CellPtr addCell(CellPtr cell)
Add a cell to the table.
RtTable(const ::std::string &title)
Constructor.
RtObjectPtr add(RtObjectPtr rtObject)
Insert an object into the container.
int idTranslation
A 1 or a zero that is added to the data for output (index to id)
RtColumn(const ::std::string &colLabel)
Constructor.
void setNohwColor(CellColor color)
Sets the single character background color to use when there is no hardware.
virtual void update()
Creates a new string that is the dynamic ascii contents of this object.
std::string getTimestring()
Get the time string from the time panel.
int indent
Left indent of chars.
Cell & getCell(int index)
Get cell.
void setTruncate(bool truncate)
Set cell to truncate string, but display stars if it overflows cell.
static std::vector< std::string > getBimaAntNames()
Get a vector of bima antenna labels.
CellDble(const char *fmt, int rod, const char *legit, const double &data)
Constructor.
RtTimePanel(const char *ut, const char *lst)
Constructor.
Border
Possible border styles for RtContainer objects.
void appendToolTipText(const std::string &text)
Append more text to the existing tool tip text.
void setProp()
Set stretchType to proportional.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Creates static description of container to stdout.
A vertical box that defines a folder.
const char * prefix
Pointer to the prefix data string.
CellColorEnum
Cell color choices.
void setLayout(Layout layout)
Set the layout for this object.
int getUpdateRate()
Get the update rate in milliseconds.
int getIndent() const
Get the indentation for the text.
void setBorderTopEnabled(bool state)
Enable/disbable an edge of the cell border.
virtual void checkReconfig()
Check to see if reconfiguration has occurred and then call setReconfigured() if necessary.
std::string dataString
Data string.
virtual void update()
Update cell contents.
std::string specificHelpTitle
A title bar for the specific help for this window.
void addBimaAntCols()
Add columns with bima antenna labels.
RtBox(BoxType type, const std::string &title)
Constructor.
virtual void updateColor()
Automatically called as part of the update cycle to set background color.
virtual void update()=0
Creates a new string that is the dynamic ascii contents of this object.
void setPlottable(bool yesOrNo)
Sets whether the cell data may be plotted.
std::string genericHelp_
The genric help as one long string.
CellRADEC(const char *fmt, int rod, const char *legit, const double &radec, const char *sourceType)
Constructor.
int getEndPad()
Get the padding (in pixels) at the end of the units label.
void setUpdateRate(int milliSeconds)
Set update rate in milliseconds.
FontType getFontType() const
Get the font type code.
CellRA(const char *fmt, int rod, const char *legit, const double &ra, const char *sourceType)
Constructor.
A static component that provides spacing inside of boxes (with BoxLayout).
void setBorder(Border border)
Set the border code.
A Cell with integer (long) data.
virtual void updateColor()
Automatically called as part of the update cycle to set background color.
void incRequestCount()
Increment the requestCount - normally this is done internally.
void setUnitPad(int p)
Set the padding (in pixels) between the value and the units label.
bool truncateFlag
Flag (1/0) that determines whether data is truncated.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)=0
Describes the static structure of this object in ascii to stdout.
Takes an MJD and formats output as UT.
char audio
Audio cell control ('E'/'Y'/'N') - enabled,y,n.
const int & data
Pointer to the data.
void setReverseOrder()
Reverse the row/column order of the cells.
CellString(const char *fmt, const ::std::string &dataStringRef)
Constructor.
bool truncateFlag
Flag that determines whether data is truncated.
std::string specificHelp
The help for this specific window as one long string.
void setNotruncate()
Set cell to not truncate string, but display stars if it overflows cell.
CellChar(const char *fmt, const char *legit, const char &data)
Constructor.
bool isValid()
Check validity of cell.
Base class for the RA and DEC Cells.
RtRowPtr addRow(RtRowPtr rowObj)
Add a row title.
A Cell containing a string based on a std::string.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Create the static description of this object to stdout.
CellShort(const char *fmt, const char *legit, const short &data)
Constructor.
void setFontSize(int fontSize)
Set the absolute font size for this object.
bool serveData(bool forceInit=false)
Serve the data.
std::string getTitle()
Get title.
virtual void update()
Updates the cell contents.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Creates static description of container to stdout.
A Cell with short integer data.
virtual void update()
Update dynamic contents of this label - a null routine.
static std::vector< std::string > getOvroAntNames()
Get a vector of ovro antenna labels.
CellPtr addCell(const char *fmt, char *legit, const char *string)
Add a dynamicValue string to the layout.
CellPtr addItem(RtLabelPtr label, CellPtr cell, RtLabelPtr units)
Add a label/dynamicValue/units triplet to the layout.
virtual void update()
Update cell contents.
CellUChar(const char *fmt, const char *legit, const unsigned char &data)
Constructor.
CellCharString(const char *fmt, const char *string)
Constructor.
const char * sourceType
Code for type of source.
virtual void update()
Creates a new string that is the dynamic ascii contents of this object.
void setTitle(const std::string &title)
Set title for object.
void setActiveAlternative(int index)
Select which alternate string to use.
const double TWOPI
Constant definition for 2 pi.
virtual void update()
Updates the cell contents.
int getLabelPad()
Get the padding (in pixels) between the label and the value.
virtual void updateColor()
Automatically called as part of the update cycle to set background color.
void replaceCell(int index, CellPtr cell)
Replace cell.
A Cell with MJD data formatted as Date followed by the UT.
::std::string getLabel() const
Retrieve the label text.
::std::string text
Formatted text.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Describe this component to stdout.
RtBox with horizontal layout.
CellUT(const char *fmt, int rod, const char *legit, const double &_mjd)
Constructor.
::size_t getNumRows() const
Get the number of rows.
CellDEC(const char *fmt, int rod, const char *legit, const double &dec, const char *sourceType)
Constructor.
void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Describe (serialize) the static description of the cell.
const int rod
Number of characters to right of the decimal point.
int idTranslation
a 1 or a zero that is added to the data for output (index to id)
RtObjectPtr replace(unsigned int i, RtObjectPtr rtObject)
Replace an object in the container.
virtual void update()
Updates the cell contents.
Container that handles layout of components with a "BoxLayout".
CellChar * idTranslate()
Set the cell up to translate the ID.
void addOvroAntCols()
Add columns with ovro antenna labels.
const char * suffix
Pointer to the suffix data string.
RtRow(const ::std::string &rowLabel)
Constructor.
Base class for RtObjects with titles, such as a container.
::std::string getUpdateRateString() const
Get a string representing the update rate.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Creates static description of container to stdout.
void setEndPad(int p)
Set the padding (in pixels) at the end of the units label.
int getLen() const
Get the length of the text string.
An abstract class for static components that are not updated and do not contain other components...
static std::vector< std::string > getSzaAntNames()
Get a vector of sza antenna labels.
std::string makeUTstring()
Internal function for creating the ut string.
void setSpecificHelpFromTextFile(const ::std::string &filePath)
Set help specific to this display from a text file.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Static description of display to stdout.
Read a series of bytes with a timeout and return a raw byte string with the contents of the read...
const char * legit
Deprecated...
virtual void update()
Creates a new string that is the dynamic ascii contents of this object.
CellCatString(const char *fmt, const char *legit, const char *pre, const char *suf)
Constructor.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Create the static description of this object to standard out.
Realtime display - the whole enchilada.
RtObjectPtr getObj(::size_t index) const
Get object from the container by index.
RtTimeString(const char *ut, const char *lst)
Constructor.
virtual void update()
Creates a new string that is the dynamic ascii contents for this cell.
virtual void update()
Update dynamic representation of data.
A panel with time strings.
Displays Cells in a tabular format.
std::string title_
Object title.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)=0
Describe this component to stdout.
virtual void update()
Update cell contents.
void noColLabels()
Don't display column labels.
A Cell with unsigned character data treated as an int.
::size_t getNumCols() const
Get the number of columns.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Describe this component to stdout.
const int rod
Number of characters to right of the decimal point.
virtual void update()
Creates a new string that is the dynamic ascii contents of this object.
virtual void update()
Update the time string.
A static component that provides spacing inside of boxes (with BoxLayout).
int len
Total number of chars.
const float & data
Reference to the data.
RtHBox(const std::string &title)
Constructor.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Create static representation of object to stdout.
virtual ~RtContainer()
Destructor.
void setFontType(const FontType type)
Set the font type code, a single character code.
virtual void update()
Creates a new string that is the dynamic ascii contents for this cell.
std::string getToolTipText()
virtual std::string getUpdate()
Get string for update.
const double & data
Reference to the data.
int getRelFontSize() const
Get the relative font size.
void setRowLabel(int rowNo, const std::string &label)
Change the default label of the given row.
int getNumCells() const
Get number of cells.
const unsigned char & data
The data for the cell.
const double & mjd
Pointer to the data.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)=0
Create the static description of this object to standard out.
::std::string getProgramName() const
Get the program name.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Create the static description of this object to standard out.
RtArea(const ::std::string &title)
Constructor, border style defaults to none.
A Cell that displays the contents of a double.
static std::vector< std::string > getAntNames()
Get a vector of all antenna labels.
CellFloat(const char *fmt, int rod, const char *legit, const float &data)
Constructor.
Layout getLayout() const
Get the layout for this object.
A Cell for Right Ascension.
void setSpring()
Set stretchType to SPRING.
void setToolTipText(const std::string &text)
Set the tool tip text for this RtObject.
void noRowLabels()
Don't display row labels.
virtual void update()
A null update routine.
std::string makeTitle(const std::string &subtitle)
Make the title. Default is to prepend the sysName to the subtitle.
void setGenericHelp(const std::string &helpString)
Set generic help string.
const char & data
The data for the cell.
RtLabel()
Default constructor.
A Cell that displays the contents of a float.
void setPlotLabel(const ::std::string &s)
Sets the label for a plot.
bool isReplaceText() const
Is this the dynamically formatted text or is it a replacement string set by nohw, overflow or an altS...
void setNa(bool tf)
Set the "not applicable" flag to true/false.
int replyUpdate(int fontSize,::rtdproto::UIMessageReply &msg)
Reply to "Upd" command; returns 0 on failure.
A Cell containing a string composed of 2 pieces which are concatenated together.
void setLabelPrefix(const ::std::string &labelPrefix)
Set a prefix for the label used for cell functions (like a plot label).
A Cell that is empty that can be used as filler in tables.
An abstract realtime (dynamic) text Cell.
RtDisplay(const ::std::string &programName, const char *subtitle, const char *ut, const char *lst, bool visibleTimePanel=true)
Constructor.
void setGenericHelpFromTextFile(const ::std::string &filePath)
Set help generic from a text file.
FontType
Font type choices.
std::string genericHelpTitle
A title bar for the generic help.
RtVBox(const std::string &title)
Constructor.
void setMinRows(::size_t minRows)
Set the minimum number of rows to display.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)
Creates static description of container to stdout.
int getUnitPad()
Get the padding (in pixels) between the value and the units label.
void addCols(int numOfCols, const char *names[])
add general column headings
RtColPtr addCol(RtColPtr colObj)
Add a column title.
A Cell with character data (signed) treated as an int.
void setColor(CellColor color)
Sets the single character background color code.
CellDateUT(const char *fmt, int rod, const char *legit, const double &_mjd, int choice=0)
Constructor.
virtual void updateColor()
Automatically called as part of the update cycle to set background color.
virtual void update()
Update the object.
A Cell containing a string based on a char*.
A container and an associated line oriented layout manager suitable for multiline layout of grouped o...
CellUChar * idTranslate()
Enable ID translation.
void setLabel(const std::string &label)
Set the label text.
virtual std::string getUpdate()
Get the update string.
CellInt(const char *fmt, const char *legit, const int &data)
Constructor.
void setNohw(bool tf)
Set the "no hardware" flag to true/false.
const char * sysName
System name (prefix to every title bar)
::std::ostringstream fmtOss_
Formatted text stream.
void updateInt(int data)
Create an output string for an integer.
void setValidity(bool validity)
Set the validity of cell.
void change(const char *ut, const char *lst, bool visible=true)
Change time strings and visibility.
void setRelFontSize(int relFontSize)
Set the relative font size.
void setAudio(char c)
Set audio state code.
void setReconfigured()
Set that display has been reconfigured and that the client needs to be re-initialized.
void change(const char *ut, const char *lst)
Change time strings.
virtual void update()
Update all objects contained by container.
void setNoAudio()
Turn off audio capability for the cell.
const short & data
Pointer to the data.
void setLabelPad(int p)
Set the padding (in pixels) between the label and the value.
virtual void serialize(bool initialize, int fontSize,::rtdproto::RtObject *rtobj)=0
Creates static description of container to stdout.
::size_t getNumObjects() const
Get the number of objects in the container.
virtual ~RtTable()
Destructor.
bool isPlottable() const
Can contents be plotted (can it be converted to a number)?
void setStretchFactor(double stretchFactor)
Set stretch factor.
enum carma::ui::rtd::CellColorEnum CellColor
Cell color choices.
RtContainer()
Constructor.
const Format format_
Format for cell data.
std::string getText()
Get the dynamic text.
RtBox with vertical layout.
virtual ~RtObject()
Destructor.
virtual void update()
Update cell contents.
::std::string centerStringFmt(const ::std::string &s) const
Helper to trim and center the formatted string.
char getAudio()
Get audio state code.
int addAlternative(const ::std::string &text, CellColor color)
Add an alternate text string.
::std::string getPlotLabel() const
Get the plot label.