Nebula
|
#include <displayevent.h>
Display events are sent by the display device to registered display event handlers.
Public Types | |
enum | Code { InvalidCode , WindowOpen , WindowClose , WindowReopen , CloseRequested , WindowMinimized , WindowRestored , ToggleFullscreenWindowed , WindowResized , SetCursor , Paint , SetFocus , KillFocus , KeyDown , KeyUp , Character , MouseMove , MouseButtonDown , MouseButtonUp , MouseButtonDoubleClick , MouseWheelForward , MouseWheelBackward } |
event codes More... | |
Public Member Functions | |
DisplayEvent () | |
default constructor | |
DisplayEvent (Code c) | |
constructor with event code | |
DisplayEvent (Code c, CoreGraphics::WindowId wnd) | |
constructor with event code and window id | |
DisplayEvent (Code c, const Math::vec2 &absPos, const Math::vec2 &normPos) | |
constructor with event code and mouse pos | |
DisplayEvent (Code c, Input::Key::Code k) | |
constructor with key code | |
DisplayEvent (Code c, Input::Char chr) | |
constructor with character | |
DisplayEvent (Code c, Input::MouseButton::Code b, const Math::vec2 &absPos, const Math::vec2 &normPos) | |
constructor with mouse button and mouse pos | |
Code | GetEventCode () const |
get event code | |
CoreGraphics::WindowId | GetWindowId () const |
get window id | |
const Math::vec2 & | GetAbsMousePos () const |
get absolute mouse pos (in pixels) | |
const Math::vec2 & | GetNormMousePos () const |
get normalized mouse pos (from 0.0 to 1.0) | |
Input::Key::Code | GetKey () const |
get key code | |
Input::Char | GetChar () const |
get character code | |
Input::MouseButton::Code | GetMouseButton () const |
get mouse button code | |
Private Attributes | |
Code | code |
CoreGraphics::WindowId | windowId |
Math::vec2 | absMousePos |
Math::vec2 | normMousePos |
Input::Key::Code | keyCode |
Input::Char | charCode |
Input::MouseButton::Code | mouseButtonCode |
event codes
|
inline |
default constructor
|
inline |
constructor with event code
|
inline |
constructor with event code and window id
|
inline |
constructor with event code and mouse pos
|
inline |
constructor with key code
|
inline |
constructor with character
|
inline |
constructor with mouse button and mouse pos
|
inline |
get absolute mouse pos (in pixels)
|
inline |
get character code
|
inline |
get event code
|
inline |
get key code
|
inline |
get mouse button code
|
inline |
get normalized mouse pos (from 0.0 to 1.0)
|
inline |
get window id
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |