TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class InputEvent in Tinman.AddOns.Application

Wraps a single input event.

sealed class InputEvent implements IEquatable<InputEvent>
  IInputState

Public / Constants

Closing

The input event value for Closing.

public static readonly field Closing
type InputEvent

FocusGained

The input event value for FocusGained.

public static readonly field FocusGained
type InputEvent

FocusLost

The input event for FocusLost.

public static readonly field FocusLost
type InputEvent

None

The input event value for None

public static readonly field None
type InputEvent

Public / Attributes

Button

The mouse button that has been pressed or released.

public readonly field Button
type MouseButton

See also:

InputEventType.Pressed
InputEventType.Released
InputEventType.Clicked

Character

The character that has been typed in.

public readonly field Character
type char

See also:

InputEventType.Character

HasAlt

Is the Alt modifier present?

public property HasAlt { get }
type bool
value true if the modifier is present, false if not.

See also:

Modifiers

HasControl

Is the Control modifier present?

public property HasControl { get }
type bool
value true if the modifier is present, false if not.

See also:

Modifiers

HasShift

Is the Shift modifier present?

public property HasShift { get }
type bool
value true if the modifier is present, false if not.

See also:

Modifiers

IsKeyboard

Is this a keyboard event?

public property IsKeyboard { get }
type bool
value true if this is a keyboard event, false if not.

See also:

InputEventType.Character
InputEventType.Clicked
InputEventType.Pressed
InputEventType.Released
Key

IsMouse

Is this a mouse event?

public property IsMouse { get }
type bool
value true if this is a mouse event, false if not.

See also:

InputEventType.Clicked
InputEventType.MouseEnter
InputEventType.MouseLeave
InputEventType.MouseMove
InputEventType.Pressed
InputEventType.Released
Button

Key

The keyboard key that has been pressed or released.

public readonly field Key
type KeyboardKey

See also:

InputEventType.Pressed
InputEventType.Released
InputEventType.Clicked

Modifiers

The keyboard modifiers.

public readonly field Modifiers
type InputModifiers

See also:

InputEventType.Clicked
InputEventType.MouseMove
InputEventType.Pressed
InputEventType.Released

MouseCursor

Location of the mouse cursor in the application windows client area.

public readonly field MouseCursor
type Vec2I

See also:

InputEventType.Character
InputEventType.Clicked
InputEventType.MouseMove
InputEventType.MouseEnter
InputEventType.MouseLeave
InputEventType.Pressed
InputEventType.Released

MouseMove

Relative movement of the mouse.

public readonly field MouseMove
type Vec2I

See also:

InputEventType.MouseMove

MouseWheel

Movement of the mouse wheel.

public readonly field MouseWheel
type int32

Remarks:

A positive value indicates that the wheel has rotated forward (away from user), a negative value indicates a backwards rotation (towards user).

Each mouse wheel tick is represented as +1 resp. -1 (there is no implicit multiplier).

See also:

InputEventType.MouseMove

TickCount

Timestamp of this input event.

public readonly field TickCount
type int32

See also:

LowLevel.TickCount

Type

The input event type.

public readonly field Type
type InputEventType

Public / Constructors

CharacterTyped

Creates a new instance of InputEvent for Character.

public static method CharacterTyped (char character, Vec2I mouseCursor)
type InputEvent
params character The Character value.
  mouseCursor The MouseCursor value.
returns The input event.

Clicked

Creates a new instance of InputEvent for Clicked.

public static method Clicked (KeyboardKey key, Vec2I mouseCursor, InputModifiers modifiers)
type InputEvent
params key The Key value.
  mouseCursor The MouseCursor value.
  modifiers The Modifiers value.
returns The input event.

Creates a new instance of InputEvent for Clicked.

public static method Clicked (MouseButton button, Vec2I mouseCursor, InputModifiers modifiers)
type InputEvent
params button The Button value.
  mouseCursor The MouseCursor value.
  modifiers The Modifiers value.
returns The input event.

Mouse

Creates a new instance of InputEvent for MouseMove.

public static method Mouse (Vec2I mouseCursor, Vec2I mouseMove, int32 mouseWheel, InputModifiers modifiers)
type InputEvent
params mouseCursor The MouseCursor value.
  mouseMove The MouseMove value.
  mouseWheel The MouseWheel value.
  modifiers The Modifiers value.
returns The input event.

MouseEnter

Creates a new instance of InputEvent for MouseEnter.

public static method MouseEnter (Vec2I mouseCursor)
type InputEvent
params mouseCursor The MouseCursor value.
returns The input event.

MouseLeave

Creates a new instance of InputEvent for MouseLeave.

public static method MouseLeave (Vec2I mouseCursor)
type InputEvent
params mouseCursor The MouseCursor value.
returns The input event.

Pressed

Creates a new instance of InputEvent for Pressed.

public static method Pressed (KeyboardKey key, Vec2I mouseCursor, InputModifiers modifiers)
type InputEvent
params key The Key value.
  mouseCursor The MouseCursor value.
  modifiers The Modifiers value.
returns The input event.

Creates a new instance of InputEvent for Pressed.

public static method Pressed (MouseButton button, Vec2I mouseCursor, InputModifiers modifiers)
type InputEvent
params button The Button value.
  mouseCursor The MouseCursor value.
  modifiers The Modifiers value.
returns The input event.

Released

Creates a new instance of InputEvent for Released.

public static method Released (KeyboardKey key, Vec2I mouseCursor, InputModifiers modifiers)
type InputEvent
params key The Key value.
  mouseCursor The MouseCursor value.
  modifiers The Modifiers value.
returns The input event.

Creates a new instance of InputEvent for Released.

public static method Released (MouseButton button, Vec2I mouseCursor, InputModifiers modifiers)
type InputEvent
params button The Button value.
  mouseCursor The MouseCursor value.
  modifiers The Modifiers value.
returns The input event.

Public / Methods

Equals

Compares this object with the given one.

[Pure]
public method Equals (InputEvent other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
implements IEquatable.Equals

Has

Does this input event have all the given modifiers?

[Pure]
public method Has (InputModifiers modifiers)
type bool
params modifiers The modifiers to check.
returns true if this input event shares all modifiers, false if not.

HasAny

Does this input event have at least one of the given modifiers?

[Pure]
public method HasAny (InputModifiers modifiers)
type bool
params modifiers To modifiers to check.
returns true if this input event shares at least one modifier with modifiers, false if not.

HasNone

Does this input event have none of the given modifiers?

[Pure]
public method HasNone (InputModifiers modifiers)
type bool
params modifiers To modifiers to check.
returns true if this input event has none of the given modifiers, false if it shares at least one.

IsClicked

Has the given keyboard key been clicked?

[Pure]
public method IsClicked (KeyboardKey key, InputModifiers modifiers = InputModifiers.None)
type bool
params key The keyboard key.
  modifiers The expected input modifiers. Defaults to None.
returns true if the key has been clicked, false if not.

See also:

InputEventType.Clicked

Has the given mouse button been clicked?

[Pure]
public method IsClicked (MouseButton button, InputModifiers modifiers = InputModifiers.None)
type bool
params button The mouse button.
  modifiers The expected input modifiers. Defaults to None.
returns true if the button has been clicked, false if not.

See also:

InputEventType.Clicked

IsDown

Is the given keyboard key pressed down?

[Pure]
public method IsDown (KeyboardKey key)
type bool
params key The keyboard key.
returns true if the key is pressed down, false if not.
implements IInputState.IsDown

Is the given mouse button pressed down?

[Pure]
public method IsDown (MouseButton button)
type bool
params button The mouse button.
returns true if the button is pressed down, false if not.
implements IInputState.IsDown

IsPressed

Has the given keyboard key been pressed down?

[Pure]
public method IsPressed (KeyboardKey key)
type bool
params key The keyboard key.
returns true if the key has been pressed down, false if not.

See also:

InputEventType.Pressed

Has the given mouse button been pressed down?

[Pure]
public method IsPressed (MouseButton button)
type bool
params button The mouse button.
returns true if the button has been pressed down, false if not.

See also:

InputEventType.Pressed

IsReleased

Has the given keyboard key been released?

[Pure]
public method IsReleased (KeyboardKey key)
type bool
params key The keyboard key.
returns true if the key has been released, false if not.

See also:

InputEventType.Released

Has the given mouse button been released?

[Pure]
public method IsReleased (MouseButton button)
type bool
params button The mouse button.
returns true if the button has been released, false if not.

See also:

InputEventType.Released

IsTyped

Has the given character been typed in?

[Pure]
public method IsTyped (char c)
type bool
params c The character.
returns true if the character has been typed, false if not.

See also:

InputEventType.Character

ToString

[Pure]
public override method ToString ()
type string

Translate

Translates the mouse cursor coordinates by the given amount.

[Pure]
public method Translate (Vec2I v)
type InputEvent
params v The translation vector.
returns The resulting input event.

Translates the mouse cursor coordinates by the given amount.

[Pure]
public method Translate (int32 x, int32 y)
type InputEvent
params x X-component of translation vector.
  y Y-component of translation vector.
returns The resulting input event.