Common functions of collections of attached InputManipulators processing a specific input event type. More...
#include <kanzi/core.ui/input/input_manipulator.hpp>
Public Types | |
using | NotifierFunc = function< ProcessingResult(InputManipulator &)> |
Notifier functor type. More... | |
enum | ProcessingResult { ProcessingResult::Continue, ProcessingResult::StopRouting, ProcessingResult::Abort } |
Input processing result. More... | |
Public Member Functions | |
void | add (InputManipulator *inputManipulator) |
Adds a manipulator to the collection. More... | |
void | cancelAllActiveManipulators () |
Cancels all manipulators in the collection. More... | |
void | cancelAllActiveManipulators (const OverlayScope &overlay) |
Cancels the input manipulators that are attached to child nodes of the overlay focus scope. More... | |
void | cancelAllManipulatorsInSubtree (const Node &root) |
Cancels all active cancelable manipulators for the root node and its descendant nodes in the same overlay scope. More... | |
void | cancelIncompatibleManipulators (InputManipulator *inputManipulator) |
Cancels all manipulators in the collection, except the one that you pass to the function. More... | |
void | clearCanceledStatus () |
Clears the handled status of all attached input manipulators that are in the Canceled state. More... | |
void | clearCanceledStatus (const OverlayScope &overlay) |
Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope and are in Canceled state. More... | |
void | clearStatus () |
Clears handled status of all attached input manipulators. More... | |
void | clearStatus (const OverlayScope &overlay) |
Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope. More... | |
Collection (InputManager &inputManager) | |
Collection constructor. More... | |
void | compact () |
Erases all null-manipulator elements from the collection. More... | |
InputManager * | getInputManager () const |
Returns the input manager that owns the collection. More... | |
bool | hasInvalid () const |
Checks whether there are invalid attached manipulators. More... | |
bool | isAllowed (InputManipulator *inputManipulator) |
Checks whether the manipulator that you pass to the function is allowed. More... | |
bool | isEmpty () const |
Returns whether the collection is empty. More... | |
bool | isLocked () const |
Returns whether the collection is locked against changes not performed during event processing. More... | |
void | lock () |
Locks the collection to guard it from external changes. More... | |
EventQueue::ProcessingResult | processEvent (InputEvent &event, Node2D &rootNode) |
Processes an input event. More... | |
void | purgeTouchPoints () |
Removes from the touch point cache all touch points that are in the "up" state. More... | |
void | remove (InputManipulator *inputManipulator) |
Removes a manipulator from the collection. More... | |
void | removeAllManipulators () |
Removes all manipulators from the collection. More... | |
void | removeCanceledManipulators () |
Removes the canceled manipulators from the collection. More... | |
void | removeIncompatibleManipulators (InputManipulator *inputManipulator) |
Removes all manipulators from the collection, except the one that you pass to the function. More... | |
void | unlock () |
Unlocks a previously locked collection. More... | |
ProcessingResult | updateManipulator (InputManipulator *inputManipulator, const NotifierFunc ¬ifier) |
Updates the inputManipulator calling the notifier function on it. More... | |
Common functions of collections of attached InputManipulators processing a specific input event type.
using kanzi::InputManipulator::Collection::NotifierFunc = function<ProcessingResult(InputManipulator&)> |
Notifier functor type.
Input processing result.
The result is returned by the notifier functions and drives the input propagation in the hit test, or the focus node tree.
|
inlineexplicit |
Collection constructor.
|
inline |
Returns the input manager that owns the collection.
|
inline |
Returns whether the collection is empty.
void kanzi::InputManipulator::Collection::add | ( | InputManipulator * | inputManipulator | ) |
Adds a manipulator to the collection.
inputManipulator | The manipulator that you want to add to the collection. |
void kanzi::InputManipulator::Collection::remove | ( | InputManipulator * | inputManipulator | ) |
Removes a manipulator from the collection.
inputManipulator | The manipulator that you want to remove from the collection. |
void kanzi::InputManipulator::Collection::removeIncompatibleManipulators | ( | InputManipulator * | inputManipulator | ) |
Removes all manipulators from the collection, except the one that you pass to the function.
inputManipulator | The manipulator that you want to keep in the collection. |
void kanzi::InputManipulator::Collection::removeCanceledManipulators | ( | ) |
Removes the canceled manipulators from the collection.
void kanzi::InputManipulator::Collection::removeAllManipulators | ( | ) |
Removes all manipulators from the collection.
void kanzi::InputManipulator::Collection::cancelIncompatibleManipulators | ( | InputManipulator * | inputManipulator | ) |
Cancels all manipulators in the collection, except the one that you pass to the function.
inputManipulator | The manipulator that you do not want to cancel. |
void kanzi::InputManipulator::Collection::cancelAllActiveManipulators | ( | ) |
Cancels all manipulators in the collection.
void kanzi::InputManipulator::Collection::cancelAllActiveManipulators | ( | const OverlayScope & | overlay | ) |
Cancels the input manipulators that are attached to child nodes of the overlay focus scope.
overlay | The overlay focus scope for which to cancel the input manipulators. |
void kanzi::InputManipulator::Collection::cancelAllManipulatorsInSubtree | ( | const Node & | root | ) |
Cancels all active cancelable manipulators for the root node and its descendant nodes in the same overlay scope.
root | The root node of the subtree in which to cancel the manipulators. |
void kanzi::InputManipulator::Collection::compact | ( | ) |
Erases all null-manipulator elements from the collection.
bool kanzi::InputManipulator::Collection::hasInvalid | ( | ) | const |
Checks whether there are invalid attached manipulators.
void kanzi::InputManipulator::Collection::clearStatus | ( | ) |
Clears handled status of all attached input manipulators.
void kanzi::InputManipulator::Collection::clearStatus | ( | const OverlayScope & | overlay | ) |
Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope.
overlay | The overlay focus scope for which to cancel the input manipulators. |
void kanzi::InputManipulator::Collection::clearCanceledStatus | ( | ) |
Clears the handled status of all attached input manipulators that are in the Canceled state.
void kanzi::InputManipulator::Collection::clearCanceledStatus | ( | const OverlayScope & | overlay | ) |
Clears the handled status of the input manipulators in the collection, which are attached to child nodes of the overlay focus scope and are in Canceled state.
overlay | The overlay focus scope for which to cancel the input manipulators. |
bool kanzi::InputManipulator::Collection::isAllowed | ( | InputManipulator * | inputManipulator | ) |
Checks whether the manipulator that you pass to the function is allowed.
inputManipulator | The manipulator for which you want to check whether it is allowed. |
ProcessingResult kanzi::InputManipulator::Collection::updateManipulator | ( | InputManipulator * | inputManipulator, |
const NotifierFunc & | notifier | ||
) |
Updates the inputManipulator calling the notifier function on it.
void kanzi::InputManipulator::Collection::purgeTouchPoints | ( | ) |
Removes from the touch point cache all touch points that are in the "up" state.
EventQueue::ProcessingResult kanzi::InputManipulator::Collection::processEvent | ( | InputEvent & | event, |
Node2D & | rootNode | ||
) |
Processes an input event.
event | The input event to process. This is either a touch, a pointer or a key event. |
rootNode | The root node that receives the events that are processed. |
void kanzi::InputManipulator::Collection::lock | ( | ) |
Locks the collection to guard it from external changes.
void kanzi::InputManipulator::Collection::unlock | ( | ) |
Unlocks a previously locked collection.
|
inline |
Returns whether the collection is locked against changes not performed during event processing.