Table of Contents

Class InputEventSystem

Namespace
Icy.Input
Assembly
IcyUI.dll

Represents the default event system implementation. It uses default handlers for all event types.

public class InputEventSystem : IInputEventSystem, IInputEventProvider, IUpdateableInput, IInitializable
Inheritance
InputEventSystem
Implements
Inherited Members
Extension Methods

Constructors

InputEventSystem(IInputSystem, IDeviceEvents?, IDragEvents?, INavigationEvents?, IScrollEvents?, ITextEvents?, ITouchEvents?, IGestureEvents?)

Initializes a new instance of the InputEventSystem class.

public InputEventSystem(IInputSystem inputSystem, IDeviceEvents? devices = null, IDragEvents? drag = null, INavigationEvents? navigation = null, IScrollEvents? scroll = null, ITextEvents? text = null, ITouchEvents? touch = null, IGestureEvents? gestures = null)

Parameters

inputSystem IInputSystem

An instance of the IInputSystem to initialize all internal event listeners.

devices IDeviceEvents

Implementation of the events processor for the devices update.

drag IDragEvents

Implementation of the events processor for the drag and drop events.

navigation INavigationEvents

Implementation of the events processor for the navigation events.

scroll IScrollEvents

Implementation of the events processor for the scroll events.

text ITextEvents

Implementation of the events processor for the text events.

touch ITouchEvents

Implementation of the events processor for the touch events.

gestures IGestureEvents

The gesture recognizer, or null for the built-in one.

Properties

Devices

Gets the listener for the input devices' related events.

public IDeviceEvents Devices { get; }

Property Value

IDeviceEvents

Drag

Gets the listener for the drag and drop events.

public IDragEvents Drag { get; }

Property Value

IDragEvents

Gestures

Gets the gestures recognized from touch contacts and mouse buttons. They update before every other event provider, and the touch and drag providers are built on top of them.

public IGestureEvents Gestures { get; }

Property Value

IGestureEvents

InputSystem

Gets the input system instance for the current input event provider.

public IInputSystem InputSystem { get; }

Property Value

IInputSystem

IsInitialized

Gets a value indicating whether the object has been initialized.

public bool IsInitialized { get; }

Property Value

bool

Navigation

Gets the listener for the navigation events.

public INavigationEvents Navigation { get; }

Property Value

INavigationEvents

Scroll

Gets the listener for the scroll events.

public IScrollEvents Scroll { get; }

Property Value

IScrollEvents

Text

Gets the listener for the text input events.

public ITextEvents Text { get; }

Property Value

ITextEvents

Touch

Gets the listener for the touch events.

public ITouchEvents Touch { get; }

Property Value

ITouchEvents

Methods

Initialize()

Initializes the current input event system instance with the provided input event listeners.

public void Initialize()

RegisterCommand(ICommand, KeyGesture, object?, bool)

Registers a command to invoke when the specified key combination is pressed.

public void RegisterCommand(ICommand command, KeyGesture gesture, object? argument = null, bool handlesGesture = false)

Parameters

command ICommand

Command instance to register.

gesture KeyGesture

Keys combination to trigger the command.

argument object

Argument to pass to the command when the gesture is pressed.

handlesGesture bool

true to let this command take the gesture over: commands registered this way are tried before the others, the most recently registered first, and the first whose CanExecute(object) returns true runs alone. When none of them can execute, every other command for the gesture runs as usual. false (the default) runs the command together with the gesture's other ordinary commands.

UnregisterCommand(KeyGesture)

Unregisters every command bound to the specified key combination.

public void UnregisterCommand(KeyGesture gesture)

Parameters

gesture KeyGesture

Keyboard combination to remove the commands for.

UnregisterCommand(ICommand, KeyGesture)

Unregisters one command from the specified key combination, leaving the gesture's other commands in place.

public void UnregisterCommand(ICommand command, KeyGesture gesture)

Parameters

command ICommand

The command to remove.

gesture KeyGesture

The key combination it was registered for.

Update(TimeSpan)

Performs the update for the component.

public void Update(TimeSpan deltaTime)

Parameters

deltaTime TimeSpan

Time since the last frame.