Skip to content

Class eva::ScrollButton

template <class TReader>

ClassList > eva > ScrollButton

Button with auto-repeat (typematic) functionality.More...

  • #include <evaScrollButton.h>

Inherits the following classes: eva::Button

Public Functions inherited from eva::Switch

See eva::Switch

Type Name
Switch ()
Switch (IHandler * listener, unsigned short eventMask)
Switch * enable (bool enabled)
Enables or disables the switch.
signed short getValue ()
Gets the current level code.
Switch * setListener (IHandler * listener, unsigned short eventMask)
Sets the event listener for this switch.

Public Functions inherited from eva::Tickable

See eva::Tickable

Type Name
Tickable ()
Tickable (const Tickable &) = delete
Tickable (Tickable &&) = delete
Tickable & operator= (const Tickable &) = delete
Tickable & operator= (Tickable &&) = delete
virtual ~Tickable ()

Public Static Functions inherited from eva::Tickable

See eva::Tickable

Type Name
void tac ()
Triggers tick on this and all linked tickables.

Protected Attributes inherited from eva::Button

See eva::Button

Type Name
unsigned long pressTime = 0

Protected Attributes inherited from eva::Switch

See eva::Switch

Type Name
unsigned char curiosity = 0
signed char levelCode = 0
IHandler * listener = nullptr

Protected Functions inherited from eva::Button

See eva::Button

Type Name
bool checkLongPress (unsigned long now)
void handleActivating (unsigned long now)
void handleDeactivating (unsigned char wasLevelCode, unsigned long now)
void handleLongPress ()

Protected Functions inherited from eva::Switch

See eva::Switch

Type Name
bool checkActivating (unsigned char wasLevelCode)
inactive or different -> active
bool checkChanging (unsigned char wasLevelCode)
bool checkDeactivating (unsigned char wasLevelCode)
active -> inactive or different state
void handleActivating ()
void handleChanging ()
void handleDeactivating (unsigned char wasLevelCode)
void notify (unsigned short eventType, signed short eventCode)
bool updateState ()

Detailed Description

This class extends Button by adding periodic ON_REPEAT events while the button is held down. The naming reflects the primary use case (keyboard-like repeat).

  • ON_CHANGE - Any state change
  • ON_PRESS - Button becomes active (switch to active state)
  • ON_RELEASE - Button becomes inactive (switch to inactive state)
  • ON_SHORTCLICK - Press and release within LONGPRESS_DELAY
  • ON_LONGCLICK - Press and hold longer than LONGPRESS_DELAY then release
  • ON_LONGPRESS - Press and hold longer than LONGPRESS_DELAY (no release)
  • ON_REPEATKEY - Periodic events while holding (after LONGPRESS_DELAY)

Template parameters:

  • TReader Input reader type that returns numeric codes (0 = no button, >0 = button identifier)

See also: Button Base class for click detection


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