32 #ifndef TBX_PREQUITLISTENER_H_ 33 #define TBX_PREQUITLISTENER_H_ 35 #include "wimpmessagelistener.h" 132 static PreQuitManager *_instance;
133 std::vector<PreQuitListener *> _listeners;
137 static PreQuitManager *instance() {
return _instance;}
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Event passed to pre quit listeners.
Definition: prequitlistener.h:82
Class to allow a quit cancelled during the prequit message to be restarted.
Definition: prequitlistener.h:45
Listener to handle WimpRecordedMessages (event code 18)
Definition: wimpmessagelistener.h:269
Listen for the pre quit message from the desktop.
Definition: prequitlistener.h:109
bool close_application_only() const
Check if this QuitRestarter will close the current application only.
Definition: prequitlistener.h:73
Wimp message information.
Definition: wimpmessagelistener.h:36
void close_application_only(bool close_only)
Set the QuitRestarter to close this application and not continue a desktop shutdown.
Definition: prequitlistener.h:65
Wimp message received event.
Definition: wimpmessagelistener.h:209
QuitRestarter & operator=(const QuitRestarter &other)
Assignment operator.
Definition: prequitlistener.cc:66
bool cancelled() const
Quit has already been cancelled by a previous pre-quit handler.
Definition: prequitlistener.h:98
QuitRestarter quit_restarter() const
Return a class that can be used to restart the quit.
Definition: prequitlistener.h:103
Base class for all toolbox event listeners.
Definition: listener.h:33
QuitRestarter()
Construct a quit restarter that will just close the current application when restart_quit is called...
Definition: prequitlistener.cc:49
void restart_quit()
Restart a quit application cancelled during a PreQuit message.
Definition: prequitlistener.cc:91