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:
TBase element type (must have Increment(signed char) method)kDecKey code for decrementkIncKey code for increment
Public Functions Documentation¶
function KeyModifier¶
Constructor for KeyModifier .
template<typename... Args>
inline evab::KeyModifier::KeyModifier (
Args &&... args
)
Parameters:
argsArguments forwarded to the base element constructor
function OnKey¶
Handles key events for increment/decrement.
inline bool evab::KeyModifier::OnKey (
Keys aKey
) override
Parameters:
aKeyThe 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