Skip to content

Class evab::StretchBarPx

template <typename TTileset, typename TOrientationTilesetPolicy>

ClassList > evab > StretchBarPx

Stretch bar input element with Tilesetgram support. More...

  • #include <evabStretchBarPx.h>

Inherits the following classes: evab::ElementBase

Public Functions

Type Name
unsigned char GetPercent ()
void Increment (signed char delta)
Increments the value by a delta.
void SetPercent (unsigned char aPercent)
Sets the value and redraws.
StretchBarPx (unsigned char aValue=0, unsigned char aStep=0)
Constructor for StretchBarPx .

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 stretch bar on screen.

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

Displays a progress/scroll bar using Tilesetgrams with variable fill levels.

Template parameters:

  • TTileset Tileset class providing Tilesetgram data
  • TOrientationTilesetPolicy Policy for orientation (vertical/horizontal)

Public Functions Documentation

function GetPercent

inline unsigned char evab::StretchBarPx::GetPercent () 

function Increment

Increments the value by a delta.

inline void evab::StretchBarPx::Increment (
    signed char delta
) 

Parameters:

  • delta Amount to add (positive or negative)

function SetPercent

Sets the value and redraws.

inline void evab::StretchBarPx::SetPercent (
    unsigned char aPercent
) 

Parameters:

  • aPercent New value (0-100)

function StretchBarPx

Constructor for StretchBarPx .

inline evab::StretchBarPx::StretchBarPx (
    unsigned char aValue=0,
    unsigned char aStep=0
) 

Parameters:

  • aValue Initial percent value (0-100)
  • aStep Increment step (0 = auto-calculate from resolution)

Protected Functions Documentation

function drawer

Draws the stretch bar on screen.

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



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