Skip to content

Class evab::InputFloatDiscrete

ClassList > evab > InputFloatDiscrete

Discrete float input element. More...

  • #include <evabInputFloat.h>

Inherits the following classes: evab::InputFloat

Public Functions

Type Name
unsigned short Count () const
Returns the total number of steps.
void Increment (signed char aSteps)
Increments value by discrete grid steps.
InputFloatDiscrete (float aValue, float aMin, float aMax, float aStep=0.1f)
Constructs a discrete float input.
void Select (unsigned short aIndex)
Selects a step by index (0 to Count() -1).
signed short Selected () const
Returns the currently selected index.
void SetValue (float aValue)
Sets the float value snapped to grid and redraws.

Public Functions inherited from evab::InputFloat

See evab::InputFloat

Type Name
float GetValue () const
Gets the current float value.
void Increment (signed char aSteps)
Increments the value by a step.
InputFloat (float aValue=0)
Constructor for InputFloat .
void SetValue (float aValue)
Sets the float value and redraws.

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 inherited from evab::InputFloat

See evab::InputFloat

Type Name
virtual void drawer (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused) override
Draws the float value centered 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

Adds step-grid bound control to InputFloat.

Public Functions Documentation

function Count

Returns the total number of steps.

unsigned short evab::InputFloatDiscrete::Count () const

function Increment

Increments value by discrete grid steps.

void evab::InputFloatDiscrete::Increment (
    signed char aSteps
) 

Parameters:

  • aSteps Amount of steps to increment (positive or negative)

function InputFloatDiscrete

Constructs a discrete float input.

evab::InputFloatDiscrete::InputFloatDiscrete (
    float aValue,
    float aMin,
    float aMax,
    float aStep=0.1f
) 

Parameters:

  • aValue Initial value.
  • aMin Minimum value / start of the step grid.
  • aMax Maximum boundary limit.
  • aStep Grid step size (must be > 0.0f).

function Select

Selects a step by index (0 to Count() -1).

void evab::InputFloatDiscrete::Select (
    unsigned short aIndex
) 

function Selected

Returns the currently selected index.

signed short evab::InputFloatDiscrete::Selected () const

function SetValue

Sets the float value snapped to grid and redraws.

void evab::InputFloatDiscrete::SetValue (
    float aValue
) 

Parameters:

  • aValue New float value


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