#include <guiappeventhandler.h>
Public Member Functions | |
GUIAppEventHandler (App &app) | |
virtual void | start () override |
virtual void | process () override |
virtual void | shutdown () override |
bool | setTouchGeneratesMouseEvents (bool value) |
![]() | |
AppEventHandler (BaseApp &app) | |
virtual | ~AppEventHandler ()=default |
AppEventHandler (AppEventHandler &)=delete | |
AppEventHandler & | operator= (const AppEventHandler &)=delete |
AppEventHandler (AppEventHandler &&)=delete | |
AppEventHandler & | operator= (AppEventHandler &&)=delete |
template<typename T > | |
T & | getApp () |
Additional Inherited Members | |
![]() | |
BaseApp & | mApp |
Application event handler that is designed to work with applications that host a graphical user interface. This class checks if the user is interacting with a GUI element, if so, no input events are forwarded to the application. By default touch input generates mouse events. Call setTouchGeneratesMouseEvents(false)
to decouple this behavior. When decoupled, touch events (instead of mouse events) are forwarded to the GUI.
GUIAppEventHandler | ( | App & | app | ) |
|
overridevirtual |
This call polls the various SDL messages and filters them based on GUI activity. If a GUI element is actively used the events are not forwarded to the running app.
Reimplemented from AppEventHandler.
bool setTouchGeneratesMouseEvents | ( | bool | value | ) |
Tells the input system if touch input also generates mouse events, next to touch events. On most systems touch input is coupled to mouse input. This is controlled on an operating system level. This call tries to explicitly tell the input system to couple or decouple both events. When decoupled, touch events (instead of mouse events) are forwarded to the GUI.
value | if touch input generates mouse events. |
|
overridevirtual |
This call deletes the input converter
Reimplemented from AppEventHandler.
|
overridevirtual |
This call creates the SDL Input Converter.
Reimplemented from AppEventHandler.