OmegaEngine API  1.0.3
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
OmegaEngine.Input.InputProvider Class Referenceabstract

Processes events from an input device into higher-level navigational commands. More...

Inheritance diagram for OmegaEngine.Input.InputProvider:
OmegaEngine.Input.KeyboardInputProvider OmegaEngine.Input.MouseInputProvider OmegaEngine.Input.TouchInputProvider

Public Member Functions

void AddReceiver (IInputReceiver receiver)
 Adds an object that wishes to be notified about navigational commands that are triggered by input. More...
 
void RemoveReceiver (IInputReceiver receiver)
 Removes an object that no longer wishes to be notified about navigational commands. More...
 
void Dispose ()
 

Public Attributes

bool HasReceivers => _receivers.Count != 0
 Indicates whether this handler currently has IInputReceiver attached to it. More...
 

Protected Member Functions

virtual void OnPerspectiveChange (Point pan, int rotation, int zoom)
 Raises all registered IInputReceiver.PerspectiveChanges. More...
 
virtual void OnAreaSelection (Rectangle area, bool accumulate, bool done=false)
 Raises all registered IInputReceiver.AreaSelections. More...
 
virtual void OnHover (Point target)
 Raises all registered IInputReceiver.Hovers. More...
 
virtual void OnClick (MouseEventArgs e, bool accumulate)
 Raises all registered IInputReceiver.Clicks. More...
 
virtual void OnDoubleClick (MouseEventArgs e)
 Raises all registered IInputReceiver.DoubleClicks. More...
 
abstract void Dispose (bool disposing)
 To be called by IDisposable.Dispose and the object destructor. More...
 

Detailed Description

Processes events from an input device into higher-level navigational commands.

Member Function Documentation

◆ AddReceiver()

void OmegaEngine.Input.InputProvider.AddReceiver ( IInputReceiver  receiver)
inline

Adds an object that wishes to be notified about navigational commands that are triggered by input.

Parameters
receiverThe object to receive the commands.

◆ Dispose()

abstract void OmegaEngine.Input.InputProvider.Dispose ( bool  disposing)
protectedpure virtual

To be called by IDisposable.Dispose and the object destructor.

Parameters
disposingtrue if called manually and not by the garbage collector.

Implemented in OmegaEngine.Input.MouseInputProvider, OmegaEngine.Input.KeyboardInputProvider, and OmegaEngine.Input.TouchInputProvider.

◆ OnAreaSelection()

virtual void OmegaEngine.Input.InputProvider.OnAreaSelection ( Rectangle  area,
bool  accumulate,
bool  done = false 
)
inlineprotectedvirtual

Raises all registered IInputReceiver.AreaSelections.

Parameters
areaThe selected area in pixels.
accumulatetrue when the user wants the new selection to be added to the old one.
doneTrue when the user has finished his selection (e.g. released the mouse).

◆ OnClick()

virtual void OmegaEngine.Input.InputProvider.OnClick ( MouseEventArgs  e,
bool  accumulate 
)
inlineprotectedvirtual

Raises all registered IInputReceiver.Clicks.

Parameters
eThe original event arguments from the click.
accumulatetrue when the user wants the action to have an accumulative effect (usually for selections).

◆ OnDoubleClick()

virtual void OmegaEngine.Input.InputProvider.OnDoubleClick ( MouseEventArgs  e)
inlineprotectedvirtual

Raises all registered IInputReceiver.DoubleClicks.

Parameters
eThe original event arguments from the click.

◆ OnHover()

virtual void OmegaEngine.Input.InputProvider.OnHover ( Point  target)
inlineprotectedvirtual

Raises all registered IInputReceiver.Hovers.

Parameters
targetThe point the user is hovering over in pixels.

◆ OnPerspectiveChange()

virtual void OmegaEngine.Input.InputProvider.OnPerspectiveChange ( Point  pan,
int  rotation,
int  zoom 
)
inlineprotectedvirtual

Raises all registered IInputReceiver.PerspectiveChanges.

Parameters
panHorizontal XY-panning in pixels.
rotationHorizontal rotation in pixels.
zoomVertical zooming in pixels. Greater than 0 to zoom in; less than 0 to zoom out.

◆ RemoveReceiver()

void OmegaEngine.Input.InputProvider.RemoveReceiver ( IInputReceiver  receiver)
inline

Removes an object that no longer wishes to be notified about navigational commands.

Parameters
receiverThe object to no longer receive the commands.

Member Data Documentation

◆ HasReceivers

bool OmegaEngine.Input.InputProvider.HasReceivers => _receivers.Count != 0

Indicates whether this handler currently has IInputReceiver attached to it.


The documentation for this class was generated from the following file: