25 #ifndef TBX_APPLICATION_H 26 #define TBX_APPLICATION_H 29 #include "messagefile.h" 36 class AutoCreateListener;
38 class WimpUserMessageListener;
39 class WimpRecordedMessageListener;
40 class WimpAcknowledgeMessageListener;
41 class PreQuitListener;
43 class ModeChangedListener;
44 class PaletteChangedListener;
48 class PrePollListener;
49 class PostPollListener;
50 class PostEventListener;
51 class UncaughtHandler;
88 int wimp_version = MIN_WIMP_VERSION,
89 const int *deliver_messages = ALL_MESSAGES,
90 const int *deliver_events = ALL_EVENTS);
107 void set_autocreate_listener(std::string template_name,
AutoCreateListener *listener);
108 void clear_autocreate_listener(std::string template_name);
110 void add_command(
int command_id,
Command *command);
111 void remove_command(
int command_id,
Command *command);
113 void add_idle_command(
Command *command);
114 void remove_idle_command(
Command *command);
135 void add_timer(
int elapsed,
Timer *timer);
136 void remove_timer(
Timer *timer);
138 void add_opener(
Loader *loader,
int file_type);
139 void remove_opener(
Loader *loader,
int file_type);
149 std::string directory()
const;
162 void quit() {_running =
false;}
175 void unix_file_name_translation(
bool on);
176 bool unix_file_name_translation()
const;
177 void unix_file_name_control(
int flags);
178 int unix_file_name_control()
const;
180 void catch_poll_exceptions(
bool on);
188 int start_wimp_task(std::string command);
189 void os_cli(std::string command);
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
TaskHandle task_handle() const
Get WIMP task handle for application.
Definition: application.h:147
static const int * ALL_EVENTS
Deliver all toolbox events.
Definition: application.h:85
SpriteArea * sprite_area() const
Get the sprite area.
Definition: application.h:103
Listener to handle WimpRecordedMessages (event code 18)
Definition: wimpmessagelistener.h:269
Base class for commands in tbx.
Definition: command.h:36
Listen for the pre quit message from the desktop.
Definition: prequitlistener.h:109
Class to provide a listener to allow processing before the call to wimp poll.
Definition: posteventlistener.h:47
Classes to use/edit toolbox resources in memory.
int WindowHandle
Type for WIMP windows handle.
Definition: handles.h:35
bool running() const
Check if application is running.
Definition: application.h:171
Class to simplify handling of Quit WIMP message.
Definition: quitlistener.h:45
The main application class.
Definition: application.h:78
Interface to process uncaught exceptions in an application.
Definition: uncaughthandler.h:43
Listener to handle WimpAcnowledgeMessages (event code 19)
Definition: wimpmessagelistener.h:289
Listener to handle WimpUserMessages (event code 17)
Definition: wimpmessagelistener.h:252
void quit()
Quit the application.
Definition: application.h:162
Class to provide a listener to allow processing before the call to wimp poll.
Definition: prepolllistener.h:47
static const int MIN_WIMP_VERSION
Minimum Wimp version TBX supports.
Definition: application.h:81
static const int * NO_MESSAGES
Don't deliver any wimp messages (except QUIT)
Definition: application.h:82
Class to handle file/data loading from the filer or an external application.
Definition: loader.h:179
const MessageFile & messages() const
Return the default message file for this application.
Definition: application.h:154
Class to simplify handling of Quit WIMP message.
Definition: palettechangedlistener.h:44
static const int * NO_EVENTS
Don't deliver any toolbox event.
Definition: application.h:84
Callback class for a timer.
Definition: timer.h:42
int IconHandle
Type for WIMP icon handle.
Definition: handles.h:37
static Application * instance()
Get the application instance.
Definition: application.h:96
static const int * ALL_MESSAGES
Deliver all messages.
Definition: application.h:83
Base Listener for auto create events.
Definition: autocreatelistener.h:41
int TaskHandle
Type for a Wimp Task.
Definition: handles.h:56
Base class for a resource object that can be edited.
Definition: resobject.h:52
Class to lookup token translations from a messages file.
Definition: messagefile.h:42
Class to simplify handling of Quit WIMP message.
Definition: modechangedlistener.h:44
Class to provide a listener to allow inspection of the values returned from the Wimp_Poll call...
Definition: postpolllistener.h:42
Application * app()
Get the current application instance.
Definition: application.h:206
A SpriteArea holds zero or more user sprites.
Definition: sprite.h:231