Solo Controller Documentation 1.0
Documentation for the Solo Controller
 
Loading...
Searching...
No Matches
TextBox Class Reference

#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, GrFont *TextFont, GrFont *UnitsFont)
 Generic Constructor.
 
 TextBox (Canvas &DestCanvas, const ConfigTextBox_t *config)
 Simplified construct that accepts one of the pre-defined configuration structures.
 
void begin (void)
 Initiatizes a specific TectBoxUnits instance.
 

Static Public Member Functions

static void initializeFonts (void)
 Iniitlizes 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 ConfigList_t config
 Data structure containing a collection of TextBox configuration.
 

Constructor & Destructor Documentation

◆ TextBox() [1/2]

TextBox::TextBox ( Canvas & DestCanvas,
uint16_t x,
uint16_t y,
uint16_t textWidth,
uint16_t unitsWidth,
uint16_t height,
uint16_t baseline,
GrFont * TextFont,
GrFont * UnitsFont )
inline

Generic Constructor.

Note
A call to TextBox::begin() must be completed after this object is instantiated
Parameters
[in]DestCanvasCanvas that will 'display' the TextBox
[in]xUL x-position of the TextBox within Canvas
[in]yUL y-position of the TextBox within Canvas
[in]textWidthWidth of the "Value" TextBox in pixels
[in]unitsWidthWidth of Text Box holding the "Units"
[in]heightHeight of the TextBox in pixels
[in]baselinePosition of the font's baseline within the TextBox
[in]TextFontGrFont object for "Value"
[in]UnitsFontGrFont object for "Units"

◆ TextBox() [2/2]

TextBox::TextBox ( Canvas & DestCanvas,
const ConfigTextBox_t * config )
inline

Simplified construct that accepts one of the pre-defined configuration structures.

Note
A call to TextBox::begin() must be completed after this object is instantiated
Parameters
[in]DestCanvasCanvas that will 'display' the TextBox
[in]configConfiguration information

Member Function Documentation

◆ begin()

void TextBox::begin ( void )
inline

Initiatizes a specific TectBoxUnits instance.

Note
This medhod should be called immediately after an object is instantiated. This method configures the internal data structures used by this object.
Parameters
None.

◆ initializeFonts()

void TextBox::initializeFonts ( void )
static

Iniitlizes the fonts and configuration data used by TextBox.

Note
This method must be called before instantiating any TextBox objects
Parameters
None.

Member Data Documentation

◆ config

ConfigList_t TextBox::config
static

Data structure containing a collection of TextBox configuration.

◆ HEIGHT

const uint16_t TextBox::HEIGHT

◆ Units

DynamicText TextBox::Units

Text box containing the units to be displayed.

◆ Value

DynamicText TextBox::Value

Text box containing the value to be displayed.

◆ WIDTH

const uint16_t TextBox::WIDTH

◆ X

const uint16_t TextBox::X

◆ Y

const uint16_t TextBox::Y

The documentation for this class was generated from the following files: