Table of Contents

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

bool

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 IInputReceiver

The 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 bool

true 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 Rectangle

The selected area in pixels.

accumulate bool

true when the user wants the new selection to be added to the old one.

done bool

True 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 MouseEventArgs

The original event arguments from the click.

accumulate bool

true 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 MouseEventArgs

The original event arguments from the click.

OnHover(Point)

Raises all registered Hover(Point)s.

protected virtual void OnHover(Point target)

Parameters

target Point

The 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 Point

Horizontal XY-panning in pixels.

rotation int

Horizontal rotation in pixels.

zoom int

Vertical 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 IInputReceiver

The object to no longer receive the commands.