Skip to content

Class evab::TextLabel

template <typename T, typename TAlign>

ClassList > evab > TextLabel

Text label widget with alignment. More...

  • #include <evabTextLabel.h>

Inherits the following classes: evab::ElementBase

Public Functions

Type Name
T GetText () const
Gets current text.
void SetText (T aText)
Sets new text and redraws.
TextLabel (T aText)
Constructor with text.

Public Functions inherited from evab::ElementBase

See evab::ElementBase

Type Name
void Draw (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused)
Draws the element on the specified screen.
void Freeze ()
Make element insensitive to redraw method.
virtual bool OnKey (Keys aKey)
Handles key events for the element.

Protected Functions

Type Name
virtual void drawer (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused) override
Draws the label with alignment.
virtual void freezer () override
Virtual method for freezing the element.

Protected Functions inherited from evab::ElementBase

See evab::ElementBase

Type Name
virtual void drawer (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused) = 0
Pure virtual method for drawing the element.
virtual void freezer ()
Virtual method for freezing the element.
bool isFrozen ()
Checks if the element is currently freezed.
void redraw ()
Redraws the element on the current screen.

Detailed Description

Template parameters:

Public Functions Documentation

function GetText

Gets current text.

inline T evab::TextLabel::GetText () const

Returns:

Current text


function SetText

Sets new text and redraws.

inline void evab::TextLabel::SetText (
    T aText
) 

Parameters:

  • aText New text

function TextLabel

Constructor with text.

inline explicit evab::TextLabel::TextLabel (
    T aText
) 

Parameters:

  • aText Text to display

Protected Functions Documentation

function drawer

Draws the label with alignment.

inline virtual void evab::TextLabel::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)

Implements evab::ElementBase::drawer


function freezer

Virtual method for freezing the element.

inline virtual void evab::TextLabel::freezer () override

Override to implement custom freezing behavior.

Implements evab::ElementBase::freezer



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