#include <Event.h>
Public Types | |
| enum | MouseButton { LeftButton, MiddleButton, RightButton } |
| The mouse button that was pressed/released. More... | |
| enum | ButtonMask { LeftMask = 1, RightMask = 2, ShiftMask = 4, CtrlMask = 8, MiddleMask = 16 } |
| Bitmasks for the currently pressed mouse buttons. More... | |
| enum | Type { Unkown, Key, KeyDown, KeyUp, MouseMove, MouseWheel, MouseClick, MouseRelease } |
| The type of event. More... | |
Public Methods | |
| Event (Type tt=Unkown) | |
| Default contructor. | |
| bool | isKeyEvent () |
| Returns true iff the event is a keyboard event. | |
| bool | isMouseEvent () |
| Returns true iff the event is a mouse event. | |
| Event & | operator= (Type tt) |
| Assigns the type value tt. | |
| bool | operator== (Type tt) |
| Returns true iff event is of type tt. | |
| bool | operator!= (Type tt) |
| Returns true iff event is *not* of type tt. | |
| Type | type () |
| Returns the event type. | |
Public Attributes | |
| Type | t |
| The type of input event. | |
| MouseButton | button |
| The mouse button that was pressed/released. More... | |
| short | state |
| The state of the buttons, not including the one currently pressed/released. More... | |
| short | key |
| The key that was pressed/released. More... | |
| short | x |
| The mouse coordinates where the event occured. | |
| short | y |
| The mouse coordinates where the event occured. | |
| short | dx |
| Amount of mouse movement since the last event. More... | |
| short | dy |
| Amount of mouse movement since the last event. More... | |
|
|
Bitmasks for the currently pressed mouse buttons.
|
|
|
The mouse button that was pressed/released.
|
|
|
The type of event.
|
|
|
The mouse button that was pressed/released. Only valid when type() is one of:
|
|
|
Amount of mouse movement since the last event. Only valid when type() is MouseMove. |
|
|
Amount of mouse movement since the last event. Only valid when type() is MouseMove. |
|
|
The key that was pressed/released. Only valid when type() is one of:
|
|
|
The state of the buttons, not including the one currently pressed/released. Only valid when type() is one of:
|