CARMA C++
|
A Cell containing a string composed of 2 pieces which are concatenated together. More...
#include <carma/ui/rtd/common/RtDisplay.h>
Public Member Functions | |
CellCatString (const char *fmt, const char *legit, const char *pre, const char *suf) | |
Constructor. More... | |
CellCatString (const char *fmt, const char *legit, const char *pre, const char *suf, int altLen) | |
Constructor. More... | |
CellCatString (const char *fmt, const char *pre, const char *suf) | |
Constructor that assumes data is always legitimate. More... | |
CellCatString (const Format &fmt, const char *legit, const char *pre, const char *suf) | |
Constructor. More... | |
CellCatString (const Format &fmt, const char *legit, const char *pre, const char *suf, int altLen) | |
Constructor. More... | |
CellCatString (const Format &fmt, const char *pre, const char *suf) | |
Constructor that assumes data is always legitimate. More... | |
void | setNotruncate () |
Set cell to not truncate string, but display stars if it overflows cell. More... | |
virtual void | update () |
Creates a new string that is the dynamic ascii contents for this cell. More... | |
virtual void | updateColor () |
Automatically called as part of the update cycle to set background color. More... | |
![]() | |
int | addAlternative (const ::std::string &text, CellColor color) |
Add an alternate text string. More... | |
bool | alternativeIsActive () const |
Cell (int indent, int chars, int width) | |
Constructor. More... | |
Cell (const char *fmt, int altLen=0) | |
Constructor. More... | |
Cell (const Format &fmt, int altLen=0) | |
Constructor. More... | |
void | clearActiveAlternative () |
char | getAudio () |
Get audio state code. More... | |
std::string | getCellName () const |
std::string | getDynamicDescription () const |
int | getIndent () const |
Get the indentation for the text. More... | |
int | getLen () const |
Get the length of the text string. More... | |
::std::string | getPlotLabel () const |
Get the plot label. More... | |
std::string | getText () |
Get the dynamic text. More... | |
bool | isGrayedOut () |
bool | isPlottable () const |
Can contents be plotted (can it be converted to a number)? More... | |
bool | isReplaceText () const |
Is this the dynamically formatted text or is it a replacement string set by nohw, overflow or an altString? More... | |
bool | isValid () |
Check validity of cell. More... | |
void | serialize (bool initialize, int fontSize,::rtdproto::RtObject *rtobj) |
Describe (serialize) the static description of the cell. More... | |
void | setActiveAlternative (int index) |
Select which alternate string to use. More... | |
void | setAudio (char c) |
Set audio state code. More... | |
void | setBorderBottomEnabled (bool state) |
void | setBorderLeftEnabled (bool state) |
void | setBorderRightEnabled (bool state) |
void | setBorderTopEnabled (bool state) |
Enable/disbable an edge of the cell border. More... | |
void | setCellName (const std::string &s) |
void | setColor (CellColor color) |
Sets the single character background color code. More... | |
void | setDynamicDescription (const std::string &s) |
void | setEmpty (bool state) |
void | setGrayedOut (bool state) |
void | setNa (bool tf) |
Set the "not applicable" flag to true/false. More... | |
void | setNoAudio () |
Turn off audio capability for the cell. More... | |
void | setNohw (bool tf) |
Set the "no hardware" flag to true/false. More... | |
void | setNohwColor (CellColor color) |
Sets the single character background color to use when there is no hardware. More... | |
void | setPlotLabel (const ::std::string &s) |
Sets the label for a plot. More... | |
void | setPlotLabel (int a, bool dev, const ::std::string &s) |
Creates a label string for a plot based on antenna & rx. More... | |
void | setPlottable (bool yesOrNo) |
Sets whether the cell data may be plotted. More... | |
void | setValidity (bool validity) |
Set the validity of cell. 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... | |
Protected Attributes | |
const char * | prefix |
Pointer to the prefix data string. More... | |
const char * | suffix |
Pointer to the suffix data string. More... | |
bool | truncateFlag |
Flag (1/0) that determines whether data is truncated. More... | |
![]() | |
char | audio |
Audio cell control ('E'/'Y'/'N') - enabled,y,n. More... | |
::std::ostringstream | fmtOss_ |
Formatted text stream. More... | |
const Format | format_ |
Format for cell data. More... | |
int | indent |
Left indent of chars. More... | |
const char * | legit |
Deprecated... More... | |
int | len |
Total number of chars. More... | |
::std::string | text |
Formatted text. More... | |
Additional Inherited Members | |
![]() | |
::std::string | centerStringFmt (const ::std::string &s) const |
Helper to trim and center the formatted string. More... | |
void | updateInt (int data) |
Create an output string for an integer. 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... | |
A Cell containing a string composed of 2 pieces which are concatenated together.
By default, the string is truncated if its length exceeds the amount of space allocated in the cell. This behavior may be changed to give the standard overflow message of a string of stars with the setNotruncate option.
Definition at line 763 of file RtDisplay.h.
carma::ui::rtd::CellCatString::CellCatString | ( | const char * | fmt, |
const char * | legit, | ||
const char * | pre, | ||
const char * | suf | ||
) |
Constructor.
fmt | standard text cell format string |
legit | pointer to legitimate data flag |
pre | the location of the dynamic prefix string to insert into the cell |
suf | the location of the dynamic suffix string to insert into the cell |
carma::ui::rtd::CellCatString::CellCatString | ( | const char * | fmt, |
const char * | legit, | ||
const char * | pre, | ||
const char * | suf, | ||
int | altLen | ||
) |
Constructor.
fmt | standard text cell format string |
legit | pointer to legitimate data flag |
pre | the location of the dynamic prefix string to insert into the cell |
suf | the location of the dynamic suffix string to insert into the cell |
altLen | maximum length of an alternate string. This is not important if you don't have alt strings. If you do, make sure it is as long as the longest alt string. |
carma::ui::rtd::CellCatString::CellCatString | ( | const char * | fmt, |
const char * | pre, | ||
const char * | suf | ||
) |
Constructor that assumes data is always legitimate.
fmt | standard text cell format string |
pre | the location of the dynamic prefix string to insert into the cell |
suf | the location of the dynamic suffix string to insert into the cell |
carma::ui::rtd::CellCatString::CellCatString | ( | const Format & | fmt, |
const char * | legit, | ||
const char * | pre, | ||
const char * | suf | ||
) |
Constructor.
fmt | standard text cell format |
legit | pointer to legitimate data flag |
pre | the location of the dynamic prefix string to insert into the cell |
suf | the location of the dynamic suffix string to insert into the cell |
carma::ui::rtd::CellCatString::CellCatString | ( | const Format & | fmt, |
const char * | legit, | ||
const char * | pre, | ||
const char * | suf, | ||
int | altLen | ||
) |
Constructor.
fmt | standard text cell format |
legit | pointer to legitimate data flag |
pre | the location of the dynamic prefix string to insert into the cell |
suf | the location of the dynamic suffix string to insert into the cell |
altLen | maximum length of an alternate string. This is not important if you don't have alt strings. If you do, make sure it is as long as the longest alt string. |
carma::ui::rtd::CellCatString::CellCatString | ( | const Format & | fmt, |
const char * | pre, | ||
const char * | suf | ||
) |
Constructor that assumes data is always legitimate.
fmt | standard text cell format |
pre | the location of the dynamic prefix string to insert into the cell |
suf | the location of the dynamic suffix string to insert into the cell |
void carma::ui::rtd::CellCatString::setNotruncate | ( | ) |
Set cell to not truncate string, but display stars if it overflows cell.
Definition at line 834 of file RtDisplay.h.
|
virtual |
Creates a new string that is the dynamic ascii contents for this cell.
Implements carma::ui::rtd::RtObject.
|
virtual |
Automatically called as part of the update cycle to set background color.
Reimplemented from carma::ui::rtd::Cell.
|
protected |
Pointer to the prefix data string.
Definition at line 839 of file RtDisplay.h.
|
protected |
Pointer to the suffix data string.
Definition at line 841 of file RtDisplay.h.
|
protected |
Flag (1/0) that determines whether data is truncated.
Definition at line 843 of file RtDisplay.h.