Rose
|
A class to process event semantics. More...
#include <Application.h>
Public Types | |
enum | WindowEventType : int { Shown, Hidden, Exposed, SizeChanged, Minimized, Maximized, FullScreen, Restored, Enter, Leave, Focus, UnFocus, Close, Moved, Resized } |
The type of window event. | |
using | WindowStateChangeCallback = std::function< void(Application &, WindowEventType)> |
using | WindowPositionChangeCallback = std::function< void(Application &, WindowEventType, Position< int > &)> |
using | WindowSizeChangeCallback = std::function< void(Application &, WindowEventType, Size)> |
using | KeyboardEventCallback = std::function< bool(Application &, const SDL_KeyboardEvent &)> |
using | MouseMotionEventCallback = std::function< bool(Application &, const SDL_MouseMotionEvent &)> |
using | MouseButtonEventCallback = std::function< bool(Application &, const SDL_MouseButtonEvent &)> |
using | MouseWheelEventCallback = std::function< bool(Application &, const SDL_MouseWheelEvent &)> |
using | FingerTouchEventCallback = std::function< bool(Application &, const SDL_TouchFingerEvent &)> |
using | TextInputEventCallback = std::function< bool(Application &, const SDL_TextInputEvent &)> |
Public Member Functions | |
EventSemantics (Application &application) | |
void | onEvent (SDL_Event &e) |
void | windowEvent (SDL_WindowEvent &e) |
void | keyboardEvent (SDL_KeyboardEvent &e) |
void | mouseMotionEvent (SDL_MouseMotionEvent &e) |
void | mouseButtonEvent (SDL_MouseButtonEvent &e) |
void | mouseWheelEvent (SDL_MouseWheelEvent &e) |
void | fingerTouchEvent (SDL_TouchFingerEvent &e) |
void | textInputEvent (SDL_TextInputEvent &e) |
void | setWindowStateChangeCallback (WindowStateChangeCallback callback) |
void | setWindowPositionChangeCallback (WindowPositionChangeCallback callback) |
void | setWindowSizeChangeCallback (WindowSizeChangeCallback callback) |
void | setKeyboardEventCallback (KeyboardEventCallback callback) |
void | setMouseMotionEventCallback (MouseMotionEventCallback callback) |
void | setMouseButtonEventCallback (MouseButtonEventCallback callback) |
void | setMouseWheelEventCallback (MouseWheelEventCallback callback) |
void | setFingerTouchEventCallback (FingerTouchEventCallback callback) |
void | setTextInputEventCallback (TextInputEventCallback callback) |
Protected Member Functions | |
void | windowStateChange (WindowEventType type) |
void | windowSizeChange (WindowEventType type, Size size) |
void | windowPositionChange (WindowEventType type, Position< int > position) |
Protected Attributes | |
Application & | mApplication |
The Application the EventSemantics are processed for. | |
WindowSizeChangeCallback | windowSizeChangeCallback |
WindowPositionChangeCallback | windowPositionChangeCallback |
WindowStateChangeCallback | windowStateChangeCallback |
KeyboardEventCallback | keyboardEventCallback |
MouseMotionEventCallback | mouseMotionEventCallback |
MouseButtonEventCallback | mouseButtonEventCallback |
MouseWheelEventCallback | mouseWheelEventCallback |
FingerTouchEventCallback | fingerTouchEventCallback |
TextInputEventCallback | textInputEventCallback |
A class to process event semantics.