Class InputProvider
- Namespace
- OmegaEngine.Input
- Assembly
- OmegaEngine.dll
Processes events from an input device into higher-level navigational commands.
public abstract class InputProvider : IDisposable
- Inheritance
-
InputProvider
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
HasReceivers
Indicates whether this handler currently has IInputReceiver attached to it.
public bool HasReceivers { get; }
Property Value
Methods
AddReceiver(IInputReceiver)
Adds an object that wishes to be notified about navigational commands that are triggered by input.
public void AddReceiver(IInputReceiver receiver)
Parameters
receiver
IInputReceiverThe object to receive the commands.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
To be called by Dispose() and the object destructor.
protected abstract void Dispose(bool disposing)
Parameters
disposing
booltrue
if called manually and not by the garbage collector.
~InputProvider()
protected ~InputProvider()
OnAreaSelection(Rectangle, bool, bool)
Raises all registered AreaSelection(Rectangle, bool, bool)s.
protected virtual void OnAreaSelection(Rectangle area, bool accumulate, bool done = false)
Parameters
area
RectangleThe selected area in pixels.
accumulate
booltrue
when the user wants the new selection to be added to the old one.done
boolTrue when the user has finished his selection (e.g. released the mouse).
OnClick(MouseEventArgs, bool)
Raises all registered Click(MouseEventArgs, bool)s.
protected virtual void OnClick(MouseEventArgs e, bool accumulate)
Parameters
e
MouseEventArgsThe original event arguments from the click.
accumulate
booltrue
when the user wants the action to have an accumulative effect (usually for selections).
OnDoubleClick(MouseEventArgs)
Raises all registered DoubleClick(MouseEventArgs)s.
protected virtual void OnDoubleClick(MouseEventArgs e)
Parameters
e
MouseEventArgsThe original event arguments from the click.
OnHover(Point)
Raises all registered Hover(Point)s.
protected virtual void OnHover(Point target)
Parameters
target
PointThe point the user is hovering over in pixels.
OnPerspectiveChange(Point, int, int)
Raises all registered PerspectiveChange(Point, int, int)s.
protected virtual void OnPerspectiveChange(Point pan, int rotation, int zoom)
Parameters
pan
PointHorizontal XY-panning in pixels.
rotation
intHorizontal rotation in pixels.
zoom
intVertical zooming in pixels. Greater than 0 to zoom in; less than 0 to zoom out.
RemoveReceiver(IInputReceiver)
Removes an object that no longer wishes to be notified about navigational commands.
public void RemoveReceiver(IInputReceiver receiver)
Parameters
receiver
IInputReceiverThe object to no longer receive the commands.