35 #include "showfullobject.h" 37 #include "eventinfo.h" 43 class AboutToBeShownListener;
44 class HasBeenHiddenListener;
45 class DCSDiscardListener;
46 class DCSSaveListener;
47 class DCSCancelListener;
65 enum { TOOLBOX_CLASS = 0x82a80 };
100 DCS(
const std::string &template_name) :
ShowFullObject(template_name) {check_toolbox_class(DCS::TOOLBOX_CLASS);}
157 void message(std::string msg) {string_property(1, msg);}
162 std::string
message()
const {
return string_property(2);}
171 void title(std::string msg) {string_property(3, msg);}
176 std::string
title()
const {
return string_property(4);}
204 virtual void dcs_discard(
const EventInfo &discard_event) = 0;
216 virtual void dcs_save(
const EventInfo &save_event) = 0;
228 virtual void dcs_cancel(
const EventInfo &cancel_event) = 0;
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Listener for when a cancel is selected from the DCS dialog.
Definition: dcs.h:222
void message(std::string msg)
Set message to display in window.
Definition: dcs.h:157
Class to show a toolbox DCS object that gives the user an option to Discard, Cancel or Save a file...
Definition: dcs.h:62
Listener for about to be shown event.
Definition: abouttobeshownlistener.h:76
DCS()
Construct creates an unassigned DCS.
Definition: dcs.h:72
std::string message() const
Return message.
Definition: dcs.h:162
DCS & operator=(const Object &other)
Assign this DCS from an Object that refers to a DCS.
Definition: dcs.h:129
Classes to use/edit toolbox resources in memory.
std::string title() const
Return title.
Definition: dcs.h:176
DCS(const DCS &other)
Construct a DCS from another DCS.
Definition: dcs.h:81
DCS(const Object &other)
Construct a DCS from an Object that refers to a DCS.
Definition: dcs.h:92
int title_length() const
Return length of title.
Definition: dcs.h:180
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
void title(std::string msg)
Set title of window.
Definition: dcs.h:171
DCS & operator=(const DCS &other)
Assign this DCS from another.
Definition: dcs.h:117
Class for DCS object template.
Definition: resdcs.h:36
The Window object represents a toolbox window.
Definition: window.h:69
Class to provide information on a toolbox event.
Definition: eventinfo.h:48
Base class for all toolbox event listeners.
Definition: listener.h:33
Listener for when a save is selected from the DCS dialog.
Definition: dcs.h:210
Window window() const
Return the underlying toolbox window used to implement the DCS object.
Definition: dcs.h:152
Listener for when a discard is selected from the DCS dialog.
Definition: dcs.h:198
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
DCS(const std::string &template_name)
Create a DCS from the named template.
Definition: dcs.h:100
bool operator==(const Object &other) const
Check if this DCS refers to the same underlying toolbox object as another.
Definition: dcs.h:137
Objects derived from this class can be shown with there full location and size specified as well as t...
Definition: showfullobject.h:40
int message_length() const
Return length of message.
Definition: dcs.h:166
Class to manipulate a toolbox object.
Definition: object.h:50
bool operator!=(const Object &other) const
Check if this DCS does not refers to the same underlying toolbox object as another.
Definition: dcs.h:145
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93