Skip to content

Class evab::KeyReactor

template <class T, unsigned char kDec, unsigned char kInc>

ClassList > evab > KeyReactor

Decorator that triggers events when values change via increment/decrement. More...

  • #include <evabKeyReactor.h>

Inherits the following classes: T

Public Functions

Type Name
KeyReactor (eva::IHandler * aListener, Args &&... args)
Constructor for KeyReactor .
bool OnKey (Keys aKey) override
Handles key events, triggers event on value change.

Detailed Description

Similar to KeyModifier but additionally sends event notifications when the value changes through increment/decrement operations.

Template parameters:

  • T Base element type (must have Increment(signed char) and Selected() methods)
  • kDec Key code for decrement
  • kInc Key code for increment

Public Functions Documentation

function KeyReactor

Constructor for KeyReactor .

template<typename... Args>
inline evab::KeyReactor::KeyReactor (
    eva::IHandler * aListener,
    Args &&... args
) 

Parameters:

  • aListener Pointer to the event listener
  • args Arguments forwarded to the base element constructor

function OnKey

Handles key events, triggers event on value change.

inline bool evab::KeyReactor::OnKey (
    Keys aKey
) override

Parameters:

  • aKey The key code to process

Returns:

true if the key was handled, false otherwise



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