Class evab::Labeled¶
template <class T, typename TAlign, typename TText>
Decorator that adds a label to any element with alignment. More...
#include <evabLabeled.h>
Inherits the following classes: T
Public Functions¶
| Type | Name |
|---|---|
| TText | GetLabel () const Gets current label text. |
| Labeled (TText aName, Args &&... args) Constructor for Labeled . |
|
| void | SetLabel (TText aName) Sets new label text and redraws. |
Protected Functions¶
| Type | Name |
|---|---|
| void | drawer (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused) override Draws the labeled element. |
Detailed Description¶
Wraps an element and adds a text label either to the left (single line) or above (multi-line).
Template parameters:
TElement type to labelTAlignAlignment strategy for label (LeftAlign, CenterAlign, RightAlign)TTextText type (const char*, __FlashStringHelper*)
Public Functions Documentation¶
function GetLabel¶
Gets current label text.
inline TText evab::Labeled::GetLabel () const
Returns:
Current label text
function Labeled¶
Constructor for Labeled .
template<typename... Args>
inline evab::Labeled::Labeled (
TText aName,
Args &&... args
)
Parameters:
aNameLabel textargsArguments forwarded to the base element constructor
function SetLabel¶
Sets new label text and redraws.
inline void evab::Labeled::SetLabel (
TText aName
)
Parameters:
aNameNew label text
Protected Functions Documentation¶
function drawer¶
Draws the labeled element.
inline void evab::Labeled::drawer (
Screen * aScreen,
Coor aPos,
Coor aSize,
unsigned char aIsFocused
) override
Parameters:
aScreenScreen to draw onaPosPosition on screenaSizeSize of the elementaIsFocusedFocus state (1 = focused, 0 = not focused)
The documentation for this class was generated from the following file src/evabLabeled.h