kanzi::InputManager Class Reference

InputManager converts the events from the given event queue into input specific messages. More...

#include <kanzi/core.ui/input/input_manager.hpp>

Public Member Functions

 InputManager (Domain *domain)
 Create an input manager. More...
 
virtual ~InputManager ()
 
FocusManagergetFocusManager () const
 Returns the instance of the focus manager. More...
 
void processEvents (const struct KzsEventQueue *queue, Node2D *node)
 Processes a queue of input events. More...
 
NodeSharedPtr setFocus (NodeSharedPtr newFocusNode)
 Attempts to set focus to an object. More...
 
NodeSharedPtr getFocus () const
 Gets currently focused node. More...
 

Friends

class InputManipulator
 

Detailed Description

InputManager converts the events from the given event queue into input specific messages.

The events supported are key, touch, and mouse pointer events. The key events are dispatched through Keyboard::KeyDownMessage and Keyboard::KeyUpMessage. The touch and pointer events are unified into press, change and release messages, and forwarded to InputManipulators, which in turn handles the input and dispatch those through proprietary messages. The input manipulators are gathered automatically from the node or its children passed as argument to the processEvents() method.

See also
Keyboard, InputManipulator

Constructor & Destructor Documentation

kanzi::InputManager::InputManager ( Domain domain)
explicit

Create an input manager.

virtual kanzi::InputManager::~InputManager ( )
virtual

Member Function Documentation

FocusManager* kanzi::InputManager::getFocusManager ( ) const

Returns the instance of the focus manager.

void kanzi::InputManager::processEvents ( const struct KzsEventQueue *  queue,
Node2D node 
)

Processes a queue of input events.

NodeSharedPtr kanzi::InputManager::setFocus ( NodeSharedPtr  newFocusNode)

Attempts to set focus to an object.

Deprecated:
in version 3.6.3. Use FocusManager's trySetActiveFocus() instead.
NodeSharedPtr kanzi::InputManager::getFocus ( ) const

Gets currently focused node.

Deprecated:
in version 3.6.3. Use FocusManager's getActiveFocus() instead.

Friends And Related Function Documentation

friend class InputManipulator
friend

The documentation for this class was generated from the following file: