Skip to content

Class evab::Titled

template <class T, typename TAlign, typename TText>

ClassList > evab > Titled

Decorator that adds a label to any element with alignment. More...

  • #include <evabTitled.h>

Inherits the following classes: T

Public Functions

Type Name
TText GetLabel () const
Gets current label text.
void SetLabel (TText aName)
Sets new label text and redraws.
Titled (TText aName, Args &&... args)
Constructor for Titled .

Protected Functions

Type Name
void drawer (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused) override
Draws the Titled element.

Detailed Description

Wraps an element and adds a text label either to the left (single line) or above (multi-line).

Template parameters:

  • T Element type to label
  • TAlign Alignment strategy for label (LeftAlign, CenterAlign, RightAlign)
  • TText Text type (const char*, __FlashStringHelper*)

Public Functions Documentation

function GetLabel

Gets current label text.

inline TText evab::Titled::GetLabel () const

Returns:

Current label text


function SetLabel

Sets new label text and redraws.

inline void evab::Titled::SetLabel (
    TText aName
) 

Parameters:

  • aName New label text

function Titled

Constructor for Titled .

template<typename... Args>
inline evab::Titled::Titled (
    TText aName,
    Args &&... args
) 

Parameters:

  • aName Label text
  • args Arguments forwarded to the base element constructor

Protected Functions Documentation

function drawer

Draws the Titled element.

inline void evab::Titled::drawer (
    Screen * aScreen,
    Coor aPos,
    Coor aSize,
    unsigned char aIsFocused
) override

Parameters:

  • aScreen Screen to draw on
  • aPos Position on screen
  • aSize Size of the element
  • aIsFocused Focus state (1 = focused, 0 = not focused)


The documentation for this class was generated from the following file src/evabTitled.h