This template class enables you to implement key gestures recognition for a single key and its attached modifiers. More...
#include <kanzi/core.ui/input/key_input_concept.hpp>
Public Member Functions | |
| bool | detectKeyGesture (const KeyEvent &event) |
| Detects key gestures from the event that you pass as an argument. More... | |
Public Member Functions inherited from kanzi::KeyInputConcept | |
| CapsLockState | getCapsLock () const |
| Returns the required Caps Lock state for the key gesture. More... | |
| pair< LogicalKey, KeyModifier > | getKey () const |
| Returns the composing elements of a key gesture. More... | |
| bool | isCapsLockGrabbed () const |
| Returns whether the Caps Lock mode was on when the gesture detector set this key gesture as grabbed. More... | |
| bool | isEnabled () const |
| Returns the enabled state of a key gesture. More... | |
| bool | isGrabbed () const |
| Returns the grabbed state of a key gesture. More... | |
| KeyInputConcept ()=default | |
| Constructor. More... | |
| KeyInputConcept (LogicalKey key, KeyModifier modifier, CapsLockState caps) | |
| Constructor. More... | |
| KeyInputConcept (LogicalKey key, KeyModifier modifier) | |
| Constructor. More... | |
| KeyInputConcept (LogicalKey key) | |
| Constructor. More... | |
| void | setCapsLock (CapsLockState capsLock) |
| Sets the required Caps Lock state for the key gesture. More... | |
| void | setCapsLockGrabbed (bool capsLock) |
| Sets whether the Caps Lock mode of the keyboard is on at the time Kanzi grabs the key gesture. More... | |
| void | setEnabled (bool enabled) |
| Sets the enabled state of the key gesture. More... | |
| void | setGrabbed (bool grabbed) |
| Sets the grabbed state of the key gesture. More... | |
| void | setKey (LogicalKey key, KeyModifier modifiers) |
| Sets the key gesture composing elements to handle. More... | |
| void | setKey (LogicalKey key) |
| Sets the key gesture composed of a logical key value with no key modifier. More... | |
| virtual | ~KeyInputConcept ()=default |
| Destructor. More... | |
Protected Member Functions | |
| void | grabGesture () |
| Grabs the gesture. More... | |
| KeyInputConceptImpl ()=default | |
| Constructor. More... | |
| void | ungrabGesture () |
| Ungrabs the gesture. More... | |
Protected Member Functions inherited from kanzi::KeyInputGestureDetector< TDerivedClass, KeyInputConcept > | |
| bool | detectKeyGesture (const KeyEvent &event, KeyInputConcept &gesture) |
| Detects key gestures from the event that you pass as an argument. More... | |
| void | grabGesture (KeyInputConcept &gesture) |
| Grabs a gesture. More... | |
| KeyInputGestureDetector ()=default | |
| Constructor. More... | |
| void | ungrabGesture (KeyInputConcept &gesture) |
| Ungrabs a gesture. More... | |
Additional Inherited Members | |
Protected Attributes inherited from kanzi::KeyInputConcept | |
| bool | m_capsLock |
| Holds the Caps Lock state at the time Kanzi grabs the key gesture. More... | |
| CapsLockState | m_capsLockState |
| Holds the required Caps Lock state for the key gesture. More... | |
| LogicalKey | m_code |
| The logical key value. More... | |
| bool | m_isEnabled |
| Holds the enabled state of a gesture. More... | |
| bool | m_isGrabbed |
| Holds the grabbed state of a gesture. More... | |
| KeyModifier | m_modifiers |
| The key modifiers. More... | |
This template class enables you to implement key gestures recognition for a single key and its attached modifiers.
To create a simple key manipulator:
|
explicitprotecteddefault |
Constructor.
| bool kanzi::KeyInputConceptImpl< TDerivedClass >::detectKeyGesture | ( | const KeyEvent & | event | ) |
Detects key gestures from the event that you pass as an argument.
Call this method to detect a key gesture from a key event.
| event | The event to detect the key gesture. |
|
protected |
Grabs the gesture.
|
protected |
Ungrabs the gesture.