35 #include "showfullobject.h"
37 #include "eventinfo.h"
43 class AboutToBeShownListener;
44 class HasBeenHiddenListener;
45 class SaveAsDialogueCompletedListener;
46 class SaveAsSaveToFileHandler;
47 class SaveAsFillBufferHandler;
48 class SaveAsSaveCompletedListener;
67 enum { TOOLBOX_CLASS = 0x82bc0 };
201 void set_data_address(
void *data,
int size,
void *selection = 0,
int selection_size = 0);
358 virtual void saveas_fill_buffer(
SaveAs saveas,
bool selection,
int size,
void *buffer,
int already_transmitted) = 0;
ObjectId _handle
Handle for toolbox object.
Definition: object.h:173
SaveAs()
Construct creates an unassigned SaveAs.
Definition: saveas.h:74
bool operator!=(const Object &other) const
Check if this SaveAs does not refers to the same underlying toolbox object as another.
Definition: saveas.h:147
void set_save_to_file_handler(SaveAsSaveToFileHandler *handler)
Set handler to do save to a file.
Definition: saveas.cc:201
Event information for when saveas dialogue has been completed.
Definition: saveas.h:222
void add_about_to_be_shown_listener(AboutToBeShownListener *listener)
This event is raised just before the saveas underlying window is about to be shown.
Definition: saveas.cc:93
virtual void saveas_save_completed(SaveAsSaveCompletedEvent &event)=0
Called when a save has been successful.
int message_id() const
Wimp message of original datasave message or 0 if save wasn't by a drag.
Definition: saveas.h:289
const std::string file_name() const
Full file name of file location if save was safe.
Definition: saveas.h:294
Listener for about to be shown event.
Definition: abouttobeshownlistener.h:76
void check_toolbox_class(int class_id) const
Check if this objects toolbox class is as specified.
Definition: object.cc:122
void remove_save_completed_listener(SaveAsSaveCompletedListener *listener)
Remove save as completed listener.
Definition: saveas.cc:182
PollBlock & _data
raw data from the event
Definition: eventinfo.h:53
SaveAsSaveCompletedEvent(IdBlock &id_block, PollBlock &data)
Construct the event from Toolbox and WIMP event data.
Definition: saveas.h:271
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:71
bool save_done() const
Check if the dialogue was closed after a successful save.
Definition: saveas.h:241
SaveAsDialogueCompletedEvent(IdBlock &id_block, PollBlock &data)
Construct the event from Toolbox and WIMP event data.
Definition: saveas.h:231
SaveAs & operator=(const SaveAs &other)
Assign this SaveAs from another.
Definition: saveas.h:119
void add_has_been_hidden_listener(HasBeenHiddenListener *listener)
Add listener for when save as dialogue has been hidden.
Definition: saveas.cc:116
void set_data_address(void *data, int size, void *selection=0, int selection_size=0)
Set the data addresses for Type 1 saves.
Definition: saveas.cc:46
Handler for SaveAsSaveToFile message.
Definition: saveas.h:316
void remove_about_to_be_shown_listener(AboutToBeShownListener *listener)
Remove about to be shown listener.
Definition: saveas.cc:103
virtual void saveas_fill_buffer(SaveAs saveas, bool selection, int size, void *buffer, int already_transmitted)=0
Called when the buffer need to be refilled for a RAM transfer (type 3) save.
Window window() const
Return the underlying toolbox window used to implement the SaveAs object.
Definition: saveas.h:154
void remove_dialogue_completed_listener(SaveAsDialogueCompletedListener *listener)
Remove listener for when dialog has been completed.
Definition: saveas.cc:156
SaveAs & operator=(const Object &other)
Assign this SaveAs from an Object that refers to a SaveAs.
Definition: saveas.h:131
void title(std::string value)
Set the title for the SaveAs object.
Definition: saveas.h:159
int int_property(int property_id) const
Return the value of a property that returns an integer.
Definition: object.cc:435
std::string string_property(int property_id) const
Return the value of a property that returns text.
Definition: object.cc:477
bool bool_property(int property_id) const
Get a boolean property from the toolbox Cobject.
Definition: object.cc:553
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
Event for SaveAsSaveCompletedListener.
Definition: saveas.h:262
Listener for when the save as dialogue box has been closed.
Definition: saveas.h:247
void set_fill_buffer_handler(SaveAsFillBufferHandler *handler)
Set handler to fill a buffer.
Definition: saveas.cc:219
void file_size(int value)
Set the file size for the SaveAs object.
Definition: saveas.h:189
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93
int file_size() const
Get the file size from the SaveAs object.
Definition: saveas.h:194
virtual void saveas_dialogue_completed(const SaveAsDialogueCompletedEvent &completed_event)=0
Called when dialog has be closed.
The Window object represents a toolbox window.
Definition: window.h:69
void selection_available(bool available)
Set if a selection is available.
Definition: saveas.h:199
virtual void saveas_save_to_file(SaveAs saveas, bool selection, std::string file_name)=0
Request to save the file to the specified location.
Class to provide information on a toolbox event.
Definition: eventinfo.h:48
std::string file_name() const
Get the file name for the SaveAs object.
Definition: saveas.h:174
Base class for all toolbox event listeners.
Definition: listener.h:33
bool safe() const
Check if the save was to a safe location (e.g.
Definition: saveas.h:283
void add_save_completed_listener(SaveAsSaveCompletedListener *listener)
Add listener for when the save operation has completed.
Definition: saveas.cc:172
int file_type() const
Get the file type from the SaveAs object.
Definition: saveas.h:184
int word[64]
Array containing information return from Wimp_Poll.
Definition: pollinfo.h:76
Class for SaveAs object template.
Definition: ressaveas.h:36
void buffer_filled(void *buffer, int size)
Call this as part of a type 3 RAM transfer in a SaveAsFillBufferListener to give the buffer to transf...
Definition: saveas.cc:61
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
bool selection_saved() const
Check if save was of the selection.
Definition: saveas.h:278
SaveAs(const SaveAs &other)
Construct a SaveAs from another SaveAs.
Definition: saveas.h:83
const IdBlock & id_block() const
IdBlock for the current event.
Definition: eventinfo.h:71
void file_type(int value)
Set the file type for the SaveAs object.
Definition: saveas.h:179
std::string title() const
Get the title for the SaveAs object.
Definition: saveas.h:164
Listener for when a save has been completed.
Definition: saveas.h:300
Objects derived from this class can be shown with there full location and size specified as well as t...
Definition: showfullobject.h:40
void remove_has_been_hidden_listener(HasBeenHiddenListener *listener)
Remove listener for when save as dialogue has been hidden.
Definition: saveas.cc:129
Information passed back by the Toolbox with each toolbox event providing information on where the eve...
Definition: pollinfo.h:41
SaveAs(const std::string &template_name)
Create a SaveAs from the named template.
Definition: saveas.h:102
void file_save_completed(bool successful, std::string file_name)
Call this after saving a file in the SaveAsSaveToFileListener for type 2 and 3 transfers.
Definition: saveas.cc:76
Class to manipulate a toolbox object.
Definition: object.h:50
Handler for SaveAsFillBuffer message.
Definition: saveas.h:337
SaveAs(const Object &other)
Construct a SaveAs from an Object that refers to a SaveAs.
Definition: saveas.h:94
void add_dialogue_completed_listener(SaveAsDialogueCompletedListener *listener)
Add listener to be called when the dialogue has been completed.
Definition: saveas.cc:146
Class to show the RISC OS SaveAs dialog box and generate events to allow the application to do the Sa...
Definition: saveas.h:64
bool operator==(const Object &other) const
Check if this SaveAs refers to the same underlying toolbox object as another.
Definition: saveas.h:139
void file_name(std::string value)
Set the file name for the save as object.
Definition: saveas.h:169