|
Nebula
|
#include <inputevent.h>
The input events of the Input subsystems.
Input events are generated by the InputServer and travel through the input handler chain where they are processed.
Public Types | |
| enum | Type { InvalidType = 0 , AppObtainFocus , AppLoseFocus , AppClose , Reset , KeyDown , KeyUp , Character , MouseMove , RawMouseMove , MouseButtonDown , MouseButtonUp , MouseButtonDoubleClick , MouseWheelForward , MouseWheelBackward , BeginMouseCapture , EndMouseCapture , BeginKeyboardCapture , EndKeyboardCapture , GamePadButtonDown , GamePadButtonUp } |
| input event types More... | |
Public Member Functions | |
| InputEvent () | |
| default constructor | |
| void | SetType (Type t) |
| set event type | |
| Type | GetType () const |
| get event type | |
| void | SetKey (Key::Code key) |
| set key code | |
| Key::Code | GetKey () const |
| get key code | |
| void | SetChar (Char chr) |
| set character code | |
| Char | GetChar () const |
| get character code | |
| void | SetMouseButton (MouseButton::Code button) |
| set button code | |
| MouseButton::Code | GetMouseButton () const |
| get button code | |
| void | SetDeviceIndex (IndexT i) |
| set optional device index (e.g. player index for game pads) | |
| IndexT | GetDeviceIndex () const |
| get device index | |
| void | SetAbsMousePos (const Math::vec2 &p) |
| set absolute pixel mouse position | |
| const Math::vec2 & | GetAbsMousePos () const |
| get absolute pixel mouse position | |
| void | SetNormMousePos (const Math::vec2 &p) |
| set normalized mouse position | |
| const Math::vec2 & | GetNormMousePos () const |
| get normalized mouse position | |
Static Public Member Functions | |
| static const char * | TypeToString (Type t) |
| convert type to string | |
Private Attributes | |
| Type | type |
| Key::Code | keyCode |
| Char | character |
| IndexT | deviceIndex |
| MouseButton::Code | mouseButton |
| Math::vec2 | absMousePos |
| Math::vec2 | normMousePos |
input event types
|
inline |
default constructor
|
inline |
get absolute pixel mouse position
|
inline |
get character code
|
inline |
get device index
|
inline |
get key code
|
inline |
get button code
|
inline |
get normalized mouse position
|
inline |
get event type
|
inline |
set absolute pixel mouse position
|
inline |
set character code
|
inline |
set optional device index (e.g. player index for game pads)
|
inline |
set key code
|
inline |
set button code
|
inline |
set normalized mouse position
|
inline |
set event type
|
inlinestatic |
convert type to string
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |