interface Tinman.Engine.Application.IInputConsumer

Base interface for classes that consume input events (see InputEvent).

Public / Methods


public method ConsumeInput → (1)

inputEvent in : InputEvent

The user input event.

returns → bool

true if the input event has been consumed, false if not.

Consumes the given user input event.

Input events are provided to an IInputConsumer object only if it has the input focus (see InputEventType.FocusGained and InputEventType.FocusLost). Mouse events are provided when the mouse cursor is inside of the input bounds (InputEventType.MouseEnter and InputEventType.MouseLeave). The InputEventType.Closing event can be provided at any time.

  1. InputEventType.FocusGained: gained input focus

  2. Keyboard events:

  3. Mouse events:

  4. InputEventType.FocusLost: lost input focus

  5. InputEventType.Closing: user request to shut down

Mouse cursor coordinates that are provided with InputEvent.MouseCursor refer to the client-area of the enclosing application window.