TriEngine  v0.0.16
General-purpose engine in C#/OpenGL
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
TriDevs.TriEngine.Input.IInputManager Interface Reference

Provides various methods to query input devices like the keyboard. More...

Inheritance diagram for TriDevs.TriEngine.Input.IInputManager:
[legend]

Public Member Functions

void Update ()
 Updates the input manager, refreshing all current and previous states. More...
 
bool IsKeyUp (Key key)
 Returns whether or not the specified key is currently unpressed. More...
 
bool IsKeyDown (Key key)
 Returns whether or not the specified key is currently being pressed. More...
 
bool KeyPressed (Key key)
 Returns whether or not the specified key has been pressed. More...
 
bool KeyReleased (Key key)
 Returns whether or not the specified key has been released. More...
 
bool IsMouseUp (MouseButton button)
 Returns whether or not the specified mouse button is currently unpressed. More...
 
bool IsMouseDown (MouseButton button)
 Returns whether or not the specified mouse button is currently being pressed. More...
 
bool MousePressed (MouseButton button)
 Returns whether or not the specified mouse button has been pressed. More...
 
bool MouseReleased (MouseButton button)
 Returns whether or not the specified mouse button has been released. More...
 
bool IsWheelUp ()
 Returns whether the mouse wheel was scrolled up. More...
 
bool IsWheelDown ()
 Returns whether the mouse wheel was scrolled down. More...
 
bool IsWheelChanged ()
 Returns whether the mouse wheel scrolled at all. More...
 
int WheelChange ()
 Returns the mouse wheel's change in value. More...
 

Properties

int MouseX [get]
 Gets the absolute X position of the pointer, in window pixel coordinates. More...
 
int MouseY [get]
 Gets the absolute Y position of the pointer, in window pixel coordinates. More...
 
Point< int > MousePosition [get]
 Gets a Point representing the position of the mouse pointer, in window pixel coordinates. More...
 
int MouseWheelValue [get]
 Gets the current value of the mouse wheel. More...
 
bool this[Key key] [get]
 Gets a boolean value indicating whether the specified OpenTK.Input.Key is pressed. More...
 
bool this[MouseButton button] [get]
 Gets a boolean value indicating whether the specified OpenTK.Input.MouseButton is pressed. More...
 

Events

KeyDownEventHandler KeyDown
 Raised when a key is pressed down. More...
 
KeyUpEventHandler KeyUp
 Raised when a key is released. More...
 
KeyPressEventHandler KeyPress
 Raised when a character is typed. More...
 
MouseDownEventHandler MouseDown
 Raised when a mouse button is pressed down. More...
 
MouseUpEventHandler MouseUp
 Raised when a mouse button is released. More...
 
MouseWheelChangedEventHandler WheelChanged
 Raised when the mouse wheel value changes. More...
 
MouseWheelDownEventHandler WheelDown
 Raised when the mouse wheel is scrolled downwards. More...
 
MouseWheelUpEventHandler WheelUp
 Raised when the mouse wheel is scrolled upwards. More...
 

Detailed Description

Provides various methods to query input devices like the keyboard.

Member Function Documentation

bool TriDevs.TriEngine.Input.IInputManager.IsKeyDown ( Key  key)

Returns whether or not the specified key is currently being pressed.

Parameters
keyKey to query for.
Returns
True if key is currently being pressed, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.IsKeyUp ( Key  key)

Returns whether or not the specified key is currently unpressed.

Parameters
keyKey to query for.
Returns
True if the key is currently up (not pressed), false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.IsMouseDown ( MouseButton  button)

Returns whether or not the specified mouse button is currently being pressed.

Parameters
buttonThe button to query for.
Returns
True if button is currently being pressed, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.IsMouseUp ( MouseButton  button)

Returns whether or not the specified mouse button is currently unpressed.

Parameters
buttonButton to query for.
Returns
True if the button is currently up (not pressed), false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.IsWheelChanged ( )

Returns whether the mouse wheel scrolled at all.

Returns
True if the mouse wheel scrolled, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.IsWheelDown ( )

Returns whether the mouse wheel was scrolled down.

Returns
True if mouse wheel was scrolled down, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.IsWheelUp ( )

Returns whether the mouse wheel was scrolled up.

Returns
True if mouse wheel was scrolled up, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.KeyPressed ( Key  key)

Returns whether or not the specified key has been pressed.

Only returns true if the last state of the key was not pressed.

Parameters
keyKey to query for.
Returns
True if key was pressed, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.KeyReleased ( Key  key)

Returns whether or not the specified key has been released.

Only returns true if the last state of the key was pressed.

Parameters
keyKey to query for.
Returns
True if key was released, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.MousePressed ( MouseButton  button)

Returns whether or not the specified mouse button has been pressed.

Only returns true if the last state of the mouse button was not pressed.

Parameters
buttonButton to query for.
Returns
True if button was pressed, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

bool TriDevs.TriEngine.Input.IInputManager.MouseReleased ( MouseButton  button)

Returns whether or not the specified mouse button has been released.

Only returns true if the last state of the button was pressed.

Parameters
buttonThe button to query for.
Returns
True if the button was released, false otherwise.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

void TriDevs.TriEngine.Input.IInputManager.Update ( )

Updates the input manager, refreshing all current and previous states.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

int TriDevs.TriEngine.Input.IInputManager.WheelChange ( )

Returns the mouse wheel's change in value.

Returns
Negative value if wheel scrolled down, positive value if scrolled up, zero if not scrolled.

Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.

Property Documentation

Point<int> TriDevs.TriEngine.Input.IInputManager.MousePosition
get

Gets a Point representing the position of the mouse pointer, in window pixel coordinates.

int TriDevs.TriEngine.Input.IInputManager.MouseWheelValue
get

Gets the current value of the mouse wheel.

int TriDevs.TriEngine.Input.IInputManager.MouseX
get

Gets the absolute X position of the pointer, in window pixel coordinates.

int TriDevs.TriEngine.Input.IInputManager.MouseY
get

Gets the absolute Y position of the pointer, in window pixel coordinates.

bool TriDevs.TriEngine.Input.IInputManager.this[Key key]
get

Gets a boolean value indicating whether the specified OpenTK.Input.Key is pressed.

Parameters
keyThe key to query.
Returns
True if pressed, false otherwise.
bool TriDevs.TriEngine.Input.IInputManager.this[MouseButton button]
get

Gets a boolean value indicating whether the specified OpenTK.Input.MouseButton is pressed.

Parameters
buttonThe button to query.
Returns
True if pressed, false otherwise.

Event Documentation

KeyDownEventHandler TriDevs.TriEngine.Input.IInputManager.KeyDown

Raised when a key is pressed down.

KeyPressEventHandler TriDevs.TriEngine.Input.IInputManager.KeyPress

Raised when a character is typed.

KeyUpEventHandler TriDevs.TriEngine.Input.IInputManager.KeyUp

Raised when a key is released.

MouseDownEventHandler TriDevs.TriEngine.Input.IInputManager.MouseDown

Raised when a mouse button is pressed down.

MouseUpEventHandler TriDevs.TriEngine.Input.IInputManager.MouseUp

Raised when a mouse button is released.

MouseWheelChangedEventHandler TriDevs.TriEngine.Input.IInputManager.WheelChanged

Raised when the mouse wheel value changes.

MouseWheelDownEventHandler TriDevs.TriEngine.Input.IInputManager.WheelDown

Raised when the mouse wheel is scrolled downwards.

MouseWheelUpEventHandler TriDevs.TriEngine.Input.IInputManager.WheelUp

Raised when the mouse wheel is scrolled upwards.


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