Composite object containing a "Value" and "Units" Text Box. More...
#include <TextBox.h>
Public Member Functions | |
| TextBox (Canvas &DestCanvas, uint16_t x, uint16_t y, uint16_t textWidth, uint16_t unitsWidth, uint16_t height, uint16_t baseline, FontList::FontID TextFont, FontList::FontID UnitsFont) | |
| Generic Constructor. | |
| TextBox (Canvas &DestCanvas, const ConfigTextBox_t *config) | |
| Simplified construct that accepts one of the pre-defined configuration structures. | |
| void | begin (void) |
| Initializes a specific TextBoxUnits instance. | |
| uint16_t | width (void) const |
Static Public Member Functions | |
| static void | initializeFonts (void) |
| Initializes the fonts and configuration data used by TextBox. | |
Public Attributes | |
| DynamicText | Value |
| Text box containing the value to be displayed. | |
| DynamicText | Units |
| Text box containing the units to be displayed. | |
| const uint16_t | X |
| const uint16_t | Y |
| const uint16_t | WIDTH |
| const uint16_t | HEIGHT |
Static Public Attributes | |
| static Shape_t | shape |
| static ConfigList_t | config |
| Data structure containing a collection of TextBox configuration. | |
Composite object containing a "Value" and "Units" Text Box.
Before attempting to use this class, the caller must do two things. First the caller must fully initialize the fonts used by this class. This is accomplished by making a call to TextBox::initializeFonts(). Second, the caller must call the TextBox::begin() method after object instantiation.
|
inline |
Generic Constructor.
| [in] | DestCanvas | Canvas that will 'display' the TextBox |
| [in] | x | UL x-position of the TextBox within Canvas |
| [in] | y | UL y-position of the TextBox within Canvas |
| [in] | textWidth | Width of the "Value" TextBox in pixels |
| [in] | unitsWidth | Width of Text Box holding the "Units" |
| [in] | height | Height of the TextBox in pixels |
| [in] | baseline | Position of the font's baseline within the TextBox |
| [in] | TextFont | GrFont object for "Value" |
| [in] | UnitsFont | GrFont object for "Units" |
|
inline |
Simplified construct that accepts one of the pre-defined configuration structures.
|
inline |
Initializes a specific TextBoxUnits instance.
|
static |
|
inline |
|
static |
Data structure containing a collection of TextBox configuration.
| const uint16_t TextBox::HEIGHT |
|
static |
| DynamicText TextBox::Units |
Text box containing the units to be displayed.
| DynamicText TextBox::Value |
Text box containing the value to be displayed.
| const uint16_t TextBox::WIDTH |
| const uint16_t TextBox::X |
| const uint16_t TextBox::Y |