Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
InputSystem Class Reference

Input Method Edit Message Dispatcher. More...

#include <InputSystem.h>

Public Member Functions

 ~InputSystem ()
 @lua NA
Rect getNodeNativeWindowRect (Node *node) const
 Unified bridging utility to extract a node's UI bounding rect in native OS window coordinates.
void setInteractive (bool interactive)
 Enable or disable pointer interactions.
void dispatchPerformEditAction (EditAction action)
 Dispatch a request to perform the given edit action.
bool hasAttachedDelegate () const
 Returns the delegate attached to the IME, or nullptr if no delegate is attached.
bool dispatchHitTestWithIME (const Vec2 &location)
 Returns the delegate attached to the IME, or nullptr if no delegate is attached.
void dispatchInsertText (std::string_view text)
 Dispatches the input text from IME.
void dispatchDeleteBackward (unsigned int numChars)
 Dispatches the delete-backward operation.
void dispatchControlKey (KeyboardEvent::KeyCode keyCode)
 Dispatches the press control key operation.
void dispatchKeyboardWillShow (IMEKeyboardNotificationInfo &info)
 @lua NA
void dispatchKeyboardDidShow (IMEKeyboardNotificationInfo &info)
 @lua NA
void dispatchKeyboardWillHide (IMEKeyboardNotificationInfo &info)
 @lua NA
void dispatchKeyboardDidHide (IMEKeyboardNotificationInfo &info)
 @lua NA
void dispatchEvent (Event *event, bool immediate=false)
 Centralized event dispatch.
Vec2 getLastPointerPosition () const
 Returns the last recorded pointer position.

Static Public Member Functions

static InputSystem * getInstance ()
 Returns the shared InputSystem object for the system.

Detailed Description

Input Method Edit Message Dispatcher.

Member Function Documentation

◆ getInstance()

InputSystem * getInstance ( )
static

Returns the shared InputSystem object for the system.

@lua NA

◆ setInteractive()

void setInteractive ( bool interactive)

Enable or disable pointer interactions.

When disabled, active pointers are canceled and new pointer events are ignored.

◆ dispatchPerformEditAction()

void dispatchPerformEditAction ( EditAction action)

Dispatch a request to perform the given edit action.

Called from the platform view on the main/UI thread. If no delegate is attached, this call is a no-op.

◆ dispatchHitTestWithIME()

bool dispatchHitTestWithIME ( const Vec2 & location)

Returns the delegate attached to the IME, or nullptr if no delegate is attached.

@lua NA

◆ dispatchInsertText()

void dispatchInsertText ( std::string_view text)

Dispatches the input text from IME.

@lua NA

◆ dispatchDeleteBackward()

void dispatchDeleteBackward ( unsigned int numChars)

Dispatches the delete-backward operation.

@lua NA

◆ dispatchControlKey()

void dispatchControlKey ( KeyboardEvent::KeyCode keyCode)

Dispatches the press control key operation.

@lua NA

◆ dispatchEvent()

void dispatchEvent ( Event * event,
bool immediate = false )

Centralized event dispatch.

InputSystem will apply input scaling to mouse/touch events before forwarding to EventDispatcher.

◆ getLastPointerPosition()

Vec2 getLastPointerPosition ( ) const
inline

Returns the last recorded pointer position.

This value is expressed in the platform's raw screen/canvas coordinate system (native pixels as reported by the platform input layer). It represents the most recent pointer location prior to the current update and is shared for mouse, touch and pen input.

Returns
Vec2 The last pointer position in screen (canvas) pixels.
Note
This position is in the platform/native screen coordinate space and has not been transformed by any world or UI layout conversions. If your code expects scaled or world coordinates, convert using the appropriate helper (for example, nativeToScreen / screenToCanvas).

The documentation for this class was generated from the following file:
  • InputSystem.h