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
inputSystemIInputSystemAn instance of the IInputSystem to initialize all internal event listeners.
devicesIDeviceEventsImplementation of the events processor for the devices update.
dragIDragEventsImplementation of the events processor for the drag and drop events.
navigationINavigationEventsImplementation of the events processor for the navigation events.
scrollIScrollEventsImplementation of the events processor for the scroll events.
textITextEventsImplementation of the events processor for the text events.
touchITouchEventsImplementation of the events processor for the touch events.
gesturesIGestureEventsThe 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
Drag
Gets the listener for the drag and drop events.
public IDragEvents Drag { get; }
Property Value
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
InputSystem
Gets the input system instance for the current input event provider.
public IInputSystem InputSystem { get; }
Property Value
IsInitialized
Gets a value indicating whether the object has been initialized.
public bool IsInitialized { get; }
Property Value
Navigation
Gets the listener for the navigation events.
public INavigationEvents Navigation { get; }
Property Value
Scroll
Gets the listener for the scroll events.
public IScrollEvents Scroll { get; }
Property Value
Text
Gets the listener for the text input events.
public ITextEvents Text { get; }
Property Value
Touch
Gets the listener for the touch events.
public ITouchEvents Touch { get; }
Property Value
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
commandICommandCommand instance to register.
gestureKeyGestureKeys combination to trigger the command.
argumentobjectArgument to pass to the command when the gesture is pressed.
handlesGesturebooltrue 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
gestureKeyGestureKeyboard 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
commandICommandThe command to remove.
gestureKeyGestureThe key combination it was registered for.
Update(TimeSpan)
Performs the update for the component.
public void Update(TimeSpan deltaTime)
Parameters
deltaTimeTimeSpanTime since the last frame.