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

Used as a fallback InputManager object when the service locator fails to find one. More...

Inheritance diagram for TriDevs.TriEngine.Input.NullInputManager:
[legend]
Collaboration diagram for TriDevs.TriEngine.Input.NullInputManager:
[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]
 
int MouseY [get]
 
Point< int > MousePosition [get]
 
int MouseWheelValue [get]
 
bool this[Key key] [get]
 
bool this[MouseButton button] [get]
 
- Properties inherited from TriDevs.TriEngine.Input.IInputManager
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...
 
- Events inherited from TriDevs.TriEngine.Input.IInputManager
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

Used as a fallback InputManager object when the service locator fails to find one.

Member Function Documentation

bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

132  {
133  return false;
134  }
bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

127  {
128  return true;
129  }
bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

152  {
153  return false;
154  }
bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

147  {
148  return true;
149  }
bool TriDevs.TriEngine.Input.NullInputManager.IsWheelChanged ( )

Returns whether the mouse wheel scrolled at all.

Returns
True if the mouse wheel scrolled, false otherwise.

Implements TriDevs.TriEngine.Input.IInputManager.

177  {
178  return false;
179  }
bool TriDevs.TriEngine.Input.NullInputManager.IsWheelDown ( )

Returns whether the mouse wheel was scrolled down.

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

Implements TriDevs.TriEngine.Input.IInputManager.

172  {
173  return false;
174  }
bool TriDevs.TriEngine.Input.NullInputManager.IsWheelUp ( )

Returns whether the mouse wheel was scrolled up.

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

Implements TriDevs.TriEngine.Input.IInputManager.

167  {
168  return false;
169  }
bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

137  {
138  return false;
139  }
bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

142  {
143  return false;
144  }
bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

157  {
158  return false;
159  }
bool TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

162  {
163  return false;
164  }
void TriDevs.TriEngine.Input.NullInputManager.Update ( )

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

Implements TriDevs.TriEngine.Input.IInputManager.

122  {
123  // Do nothing
124  }
int TriDevs.TriEngine.Input.NullInputManager.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.

Implements TriDevs.TriEngine.Input.IInputManager.

182  {
183  return 0;
184  }

Property Documentation

Point<int> TriDevs.TriEngine.Input.NullInputManager.MousePosition
get
int TriDevs.TriEngine.Input.NullInputManager.MouseWheelValue
get
int TriDevs.TriEngine.Input.NullInputManager.MouseX
get
int TriDevs.TriEngine.Input.NullInputManager.MouseY
get
bool TriDevs.TriEngine.Input.NullInputManager.this[Key key]
get
bool TriDevs.TriEngine.Input.NullInputManager.this[MouseButton button]
get

Event Documentation

KeyDownEventHandler TriDevs.TriEngine.Input.NullInputManager.KeyDown

Raised when a key is pressed down.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.

KeyPressEventHandler TriDevs.TriEngine.Input.NullInputManager.KeyPress

Raised when a character is typed.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.

KeyUpEventHandler TriDevs.TriEngine.Input.NullInputManager.KeyUp

Raised when a key is released.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.

MouseDownEventHandler TriDevs.TriEngine.Input.NullInputManager.MouseDown

Raised when a mouse button is pressed down.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.

MouseUpEventHandler TriDevs.TriEngine.Input.NullInputManager.MouseUp

Raised when a mouse button is released.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.

MouseWheelChangedEventHandler TriDevs.TriEngine.Input.NullInputManager.WheelChanged

Raised when the mouse wheel value changes.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.

MouseWheelDownEventHandler TriDevs.TriEngine.Input.NullInputManager.WheelDown

Raised when the mouse wheel is scrolled downwards.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.

MouseWheelUpEventHandler TriDevs.TriEngine.Input.NullInputManager.WheelUp

Raised when the mouse wheel is scrolled upwards.

This particular event is never raised, it's merely a placeholder in case a proper InputManager was not supplied.


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