Inner class that Kanzi uses to detect hardware key gestures and to invoke a function associated with a specific key. More...
#include <kanzi/core.ui/input/text_input_manipulator.hpp>
Public Types | |
| using | KeyGestureFunction) = void(TextInputManipulator::*)( |
| Type of the function associated to a key gesture. More... | |
Public Member Functions | |
| void | cancel () |
| Cancels the key-pressed and key-released gestures for the cursor navigation keys. More... | |
| KeyGesture (LogicalKey key, KeyModifier modifier, TextInputManipulator &manipulator, KeyGestureFunction onPressed, KeyGestureFunction onReleased, KeyGestureFunction onCanceled, bool allowedOnReadOnly) | |
| Constructor. More... | |
| void | notifyKeyPressGesture (KeyInputConcept &) |
| KeyInputConceptImpl calls this method to notify a key manipulator that Kanzi recognized a full key-pressed gesture. More... | |
| void | notifyKeyReleaseGesture (KeyInputConcept &) |
| KeyInputConceptImpl calls this method to notify a key manipulator that Kanzi recognized a key-released gesture. More... | |
| void | notifyPartialKeyPressGesture (KeyInputConcept &) |
| KeyInputConceptImpl calls this method to notify a key manipulator that Kanzi recognized a partial key-pressed gesture. More... | |
| void | onPress () |
| Activates the function associated to the key press gesture. More... | |
| void | onRelease () |
| Activates the function associated to the key release gesture. More... | |
| void | reset () |
| Resets the key-pressed and key-released gestures for the cursor navigation keys. More... | |
Public Member Functions inherited from kanzi::KeyInputConceptImpl< KeyGesture > | |
| 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from kanzi::KeyInputConceptImpl< KeyGesture > | |
| void | grabGesture () |
| Grabs the gesture. More... | |
| KeyInputConceptImpl ()=default | |
| Constructor. More... | |
| void | ungrabGesture () |
| Ungrabs the gesture. More... | |
Protected Member Functions inherited from kanzi::KeyInputGestureDetector< KeyGesture, 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... | |
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... | |
Inner class that Kanzi uses to detect hardware key gestures and to invoke a function associated with a specific key.
| using kanzi::TextInputManipulator::KeyGesture::KeyGestureFunction = void (TextInputManipulator::*)( |
Type of the function associated to a key gesture.
|
explicit |
Constructor.
Creates an instance of a key gesture detection.
| key | The logical key value to handle. |
| key | The key modifier values to handle. |
| manipulator | The manipulator that owns this key gesture. |
| onPressed | The function to call when the key is pressed. Pass nullptr to ignore the gesture. |
| onReleased | The function to call when the key is released. Pass nullptr to ignore the gesture. |
| onCanceled | The function to call when the key gesture is canceled. Pass nullptr to ignore the gesture. |
| allowedOnReadOnly | If the key handling is allowed on read-only text input manipulators, pass true as argument. If the key handling is forbidden on read-only text input manipulators, pass . |
| void kanzi::TextInputManipulator::KeyGesture::cancel | ( | ) |
Cancels the key-pressed and key-released gestures for the cursor navigation keys.
|
inline |
Resets the key-pressed and key-released gestures for the cursor navigation keys.
|
inline |
Activates the function associated to the key press gesture.
|
inline |
Activates the function associated to the key release gesture.
| void kanzi::TextInputManipulator::KeyGesture::notifyPartialKeyPressGesture | ( | KeyInputConcept & | ) |
KeyInputConceptImpl calls this method to notify a key manipulator that Kanzi recognized a partial key-pressed gesture.
| void kanzi::TextInputManipulator::KeyGesture::notifyKeyPressGesture | ( | KeyInputConcept & | ) |
KeyInputConceptImpl calls this method to notify a key manipulator that Kanzi recognized a full key-pressed gesture.
| void kanzi::TextInputManipulator::KeyGesture::notifyKeyReleaseGesture | ( | KeyInputConcept & | ) |
KeyInputConceptImpl calls this method to notify a key manipulator that Kanzi recognized a key-released gesture.