Skip to content

Class evab::KeyModifier

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

ClassList > evab > KeyModifier

Decorator that modifies values using increment/decrement keys. More...

  • #include <evabKeyModifier.h>

Inherits the following classes: T

Public Functions

Type Name
KeyModifier (Args &&... args)
Constructor for KeyModifier .
bool OnKey (Keys aKey) override
Handles key events for increment/decrement.

Detailed Description

This class wraps any element and adds behavior for increment and decrement keys. It calls the underlying element's Increment() method with +/- 1.

Template parameters:

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

Public Functions Documentation

function KeyModifier

Constructor for KeyModifier .

template<typename... Args>
inline evab::KeyModifier::KeyModifier (
    Args &&... args
) 

Parameters:

  • args Arguments forwarded to the base element constructor

function OnKey

Handles key events for increment/decrement.

inline bool evab::KeyModifier::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/evabKeyModifier.h