Skip to content

Class evab::InputAnimationPx

template <class TAlbum, unsigned char tMaxSpeed>

ClassList > evab > InputAnimationPx

Animation input element with configurable speed. More...

  • #include <evabInputAnimationPx.h>

Inherits the following classes: evab::ElementBase, eva::Tickable

Public Functions

Type Name
unsigned char Count () const
void Increment (signed char aSteps)
Increments the speed value by a delta.
InputAnimationPx (unsigned char aValue=0)
Constructor for InputAnimationPx .
void Select (unsigned char aValue)
Sets the animation speed.
unsigned char Selected () const
Gets the current speed value.
virtual ~InputAnimationPx ()
Destructor - removes from Tickable list.

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 animation on screen.
virtual void freezer () override
Hides the element and pauses animation.

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

This element displays an animated pictogram where the animation speed can be adjusted by the user. The animation cycles through available pictograms at a speed determined by the current value.

The element uses the eva::Tickable system for periodic updates. The speed value ranges from 0 (stopped) to tMaxSpeed (maximum animation speed). Animation is automatically paused when the element is hidden and resumed when it becomes visible again.

Redraws occur only on timer ticks to maintain consistent animation timing.

Template parameters:

  • TAlbum Album class providing pictogram data and count
  • tMaxSpeed Maximum speed value (must be > 0)

See also: InputPictogram For static pictogram selection

See also: eva::Tickable Base class for periodic updates

Public Functions Documentation

function Count

inline unsigned char evab::InputAnimationPx::Count () const

function Increment

Increments the speed value by a delta.

inline void evab::InputAnimationPx::Increment (
    signed char aSteps
) 

Parameters:

  • aSteps Amount to add (positive or negative)

function InputAnimationPx

Constructor for InputAnimationPx .

inline evab::InputAnimationPx::InputAnimationPx (
    unsigned char aValue=0
) 

Parameters:

  • aValue Initial speed value (0 to tMaxSpeed)

function Select

Sets the animation speed.

inline void evab::InputAnimationPx::Select (
    unsigned char aValue
) 

Parameters:

  • aValue Speed value (0 = stopped, 1..tMaxSpeed = animation speed)

function Selected

Gets the current speed value.

inline unsigned char evab::InputAnimationPx::Selected () const

Returns:

Current speed value (0 to tMaxSpeed)


function ~InputAnimationPx

Destructor - removes from Tickable list.

inline virtual evab::InputAnimationPx::~InputAnimationPx () 

Protected Functions Documentation

function drawer

Draws the animation on screen.

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

Resumes animation if element is visible and speed > 0.

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

Hides the element and pauses animation.

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

Implements evab::ElementBase::freezer



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