Class for an Label indicator that is drawing a string to the screen.
More...
#include <Label.h>
|
| Label (const char *text, uint16_t color=LABEL_COLOR_NOTSET, const GFXfont *font=NULL, uint16_t locX=0, uint16_t locY=0, uint16_t maxStringLength=DEFAULT_LABEL_STRING_LENGTH) |
| Constructor of the Label.
|
|
| ~Label () |
| Destructor of the Label.
|
|
virtual void | Draw (bool redraw) override |
| Method used for drawing of the Label.
|
|
void | SetText (const char *text) |
| Change the string that is drawn to the screen by this Label.
|
|
virtual void | RecalculateDimensions () override |
| Recalculate the Height and Width of the UIElement.
|
|
| UIElement (UIElementType type) |
| Constructor of the UIElement.
|
|
| UIElement (uint16_t locX, uint16_t locY, UIElementType type) |
| Constructor of the UIElement.
|
|
virtual bool | KeyInput (Keys_t key) |
| Process the given key.
|
|
virtual bool | TouchInput (uint16_t x, uint16_t y, TouchTypes touchType) |
| Process a touch input at the given point (x, y)
|
|
virtual void | RecalculateLayout () |
| Recalculate the UIElement layout (containers update the X- and Y-Location of all their items, all other items can do other layout update stuff)
|
|
bool | HitTest (uint16_t x, uint16_t y) |
| Check if the given point (x, y) is inside this UIElement.
|
|
Class for an Label indicator that is drawing a string to the screen.
◆ Label()
Constructor of the Label.
- Parameters
-
text | String that is draw to the screen by the label. |
color | Text color that is used to draw the Label. The color is only used to draw this Label. All other UIElements are using the default color again. |
font | Font that is used to draw the Label. The font is only used to draw this Label. All other UIElements are using the default font again. |
locX | X Location of the upper left corner of the Label |
locY | Y Location of the upper left corner of the Label |
maxStringLength | Maximum string length that the Label can hold. This is used as buffer length for the internal character buffer. |
◆ Draw()
void Label::Draw |
( |
bool | redraw | ) |
|
|
overridevirtual |
◆ RecalculateDimensions()
void Label::RecalculateDimensions |
( |
| ) |
|
|
overridevirtual |
◆ SetText()
void Label::SetText |
( |
const char * | text | ) |
|
Change the string that is drawn to the screen by this Label.
- Parameters
-
text | New text string of the Label. |
◆ _color
Text color that is used to draw the Label.
The color is only used to draw this Label. All other UIElements are using the default color again. Use values < 0 to use the UiManager.ColorForeground
◆ _font
const GFXfont* Label::_font |
|
private |
Font that is used to draw the Label.
The font is only used to draw this Label. All other UIElements are using the default font again.
◆ _maxStringLength
uint16_t Label::_maxStringLength |
|
private |
Maximum string length that the Label can hold.
This is used as buffer length for the internal character buffer.
◆ WasTextChangedSinceLastDraw
bool Label::WasTextChangedSinceLastDraw |
Flag indicating if the Text was changed since the last draw.
This is set to true by the SetText() method and back to false after drawing.
The documentation for this class was generated from the following files:
- /github/workspace/include/Indicators/Label.h
- /github/workspace/src/Indicators/Label.cpp