32 #ifndef TBX_PRINTDBOX_H_
33 #define TBX_PRINTDBOX_H_
35 #include "showfullobject.h"
37 #include "eventinfo.h"
43 class AboutToBeShownListener;
44 class HasBeenHiddenListener;
45 class PrintDboxSetupAboutToBeShownListener;
46 class PrintDboxSetupListener;
47 class PrintDboxPrintListener;
48 class PrintDboxSaveListener;
63 enum { TOOLBOX_CLASS = 0x82b00 };
bool operator==(const Object &other) const
Check if this PrintDbox refers to the same underlying toolbox object as another.
Definition: printdbox.h:135
ObjectId _handle
Handle for toolbox object.
Definition: object.h:173
int copies() const
Number of copies.
Definition: printdbox.h:354
void copies(int number)
Set number of copies.
Definition: printdbox.h:178
void sideways(bool value)
Set orientation sideways.
Definition: printdbox.h:199
void remove_has_been_hidden_listener(HasBeenHiddenListener *listener)
Remove has been hidden listener.
Definition: printdbox.cc:97
bool sideways() const
true if orientation was set to sideway, false for upright
Definition: printdbox.h:339
int start() const
Start page or -1 for all.
Definition: printdbox.h:344
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
int scale() const
Get percentage to scale by.
Definition: printdbox.h:193
PollBlock & _data
raw data from the event
Definition: eventinfo.h:53
Point & top_left()
Get reference to top left coordinate so it can be changed in the event.
Definition: printdbox.h:294
bool sideways() const
Get orientation sideways.
Definition: printdbox.h:204
void remove_print_listener(PrintDboxPrintListener *listener)
Remove listener for when print is selected on the print dialogue.
Definition: printdbox.cc:167
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:71
virtual void printdbox_setup_about_to_be_shown(const PrintDboxSetupAboutToBeShownEvent &ev)=0
Method called by the listener when the setup dialog is about to be shown.
int string_property_length(int property_id) const
Gets the size of a string properties buffer.
Definition: object.cc:530
int copies() const
Get number of copies.
Definition: printdbox.h:183
bool draft() const
Get draft mode.
Definition: printdbox.h:225
void add_save_listener(PrintDboxSaveListener *listener)
Add listener for save button on print dialogue.
Definition: printdbox.cc:182
Structure used to specify exact position and size for an object derived from tbx::ShowFullObject.
Definition: showfullspec.h:45
Listener for Setup presses when there is not dialogue associated with the button. ...
Definition: printdbox.h:402
void remove_save_listener(PrintDboxSaveListener *listener)
Remove listener for save button on print dialogue.
Definition: printdbox.cc:190
void page_range(int start, int end)
Set range of pages.
Definition: printdbox.cc:45
std::string title() const
Return title.
Definition: printdbox.h:209
Window window() const
Return the underlying toolbox window used to implement the PrintDbox object.
Definition: printdbox.h:150
PrintDbox & operator=(const Object &other)
Assign this PrintDbox from an Object that refers to a PrintDbox.
Definition: printdbox.h:127
bool operator!=(const Object &other) const
Check if this PrintDbox does not refers to the same underlying toolbox object as another.
Definition: printdbox.h:143
void remove_about_to_be_shown_listener(AboutToBeShownListener *listener)
Remove about to be shown listener.
Definition: printdbox.cc:81
PrintDbox(const Object &other)
Construct a PrintDbox from an Object that refers to a PrintDbox.
Definition: printdbox.h:90
void add_setup_about_to_be_shown_listener(PrintDboxSetupAboutToBeShownListener *listener)
Add listener that is called before the dialog associated with the setup button is shown...
Definition: printdbox.cc:112
void add_has_been_hidden_listener(HasBeenHiddenListener *listener)
This event is raised after the PrintDbox dialog has been completed.
Definition: printdbox.cc:89
void add_setup_listener(PrintDboxSetupListener *listener)
Add listener that is called if setup button is pressed and it has no associated window.
Definition: printdbox.cc:136
void remove_setup_about_to_be_shown_listener(PrintDboxSetupAboutToBeShownListener *listener)
Remove listener that is called before the dialog associated with the setup button is shown...
Definition: printdbox.cc:121
Class for PrintDbox object template.
Definition: resprintdbox.h:36
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
int scale() const
Scale percentage.
Definition: printdbox.h:359
Class to represent a position in two dimensional space.
Definition: point.h:36
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
PrintDbox & operator=(const PrintDbox &other)
Assign this PrintDbox from another.
Definition: printdbox.h:115
void add_print_listener(PrintDboxPrintListener *listener)
Add listener for when print is selected on the print dialogue.
Definition: printdbox.cc:159
int title_length() const
Return title length.
Definition: printdbox.h:214
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93
virtual void printdbox_setup(const EventInfo &setup_event)=0
Method called when setup is clicked if there is no dialogue.
PrintDbox(const PrintDbox &other)
Construct a PrintDbox from another PrintDbox.
Definition: printdbox.h:79
ShowType
Enumeration describing how the setup box is about to be shown.
Definition: printdbox.h:267
Point & top_left() const
Get top left coordinate of where the window will be shown.
Definition: printdbox.h:286
virtual void printdbox_print(const PrintDboxPrintEvent &event)=0
Method called when the print button is selected.
ShowFullSpec & full_spec()
Get reference to the full specification for the show so it can be modified.
Definition: printdbox.h:302
Window setup_window() const
Setup window that is about to be shown.
Definition: printdbox.h:262
virtual void printdbox_save(const PrintDboxPrintEvent &event)=0
Method called when the save button is selected.
Class to show a toolbox PrintDbox object.
Definition: printdbox.h:60
Shown in default place.
Definition: printdbox.h:269
The Window object represents a toolbox window.
Definition: window.h:69
void draft(bool value)
Set draft mode.
Definition: printdbox.h:220
Class to provide information on a toolbox event.
Definition: eventinfo.h:48
Print button has been pressed event.
Definition: printdbox.h:324
Base class for all toolbox event listeners.
Definition: listener.h:33
PrintDboxPrintEvent PrintDboxSaveEvent
Event information for the save listener.
Definition: printdbox.h:365
void add_about_to_be_shown_listener(AboutToBeShownListener *listener)
This event is raised just before the PrintDbox underlying window is about to be shown.
Definition: printdbox.cc:73
PrintDbox(const std::string &template_name)
Create a PrintDbox from the named template.
Definition: printdbox.h:98
int word[64]
Array containing information return from Wimp_Poll.
Definition: pollinfo.h:76
int end() const
End page.
Definition: printdbox.h:349
void all_pages()
Set to all pages.
Definition: printdbox.cc:53
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
Listener for Save selected on PrintDbox.
Definition: printdbox.h:386
void remove_setup_listener(PrintDboxSetupListener *listener)
Remove listener that is called if setup button is pressed and it has no associated window...
Definition: printdbox.cc:145
Setup dialog is about to be shown listener.
Definition: printdbox.h:308
void scale(int pc)
Set percentage to scale by.
Definition: printdbox.h:188
const IdBlock & id_block() const
IdBlock for the current event.
Definition: eventinfo.h:71
Objects derived from this class can be shown with there full location and size specified as well as t...
Definition: showfullobject.h:40
ShowType show_type() const
Get how the setup windows was shown.
Definition: printdbox.h:279
Information passed back by the Toolbox with each toolbox event providing information on where the eve...
Definition: pollinfo.h:41
PrintDboxSetupAboutToBeShownEvent(IdBlock &id_block, PollBlock &data)
Construct setup about to be shown event from Toolbox and WIMP information.
Definition: printdbox.h:254
Class to manipulate a toolbox object.
Definition: object.h:50
PrintDbox()
Construct creates an unassigned PrintDbox.
Definition: printdbox.h:70
The dialog box associated with the setup button is about to be shown event.
Definition: printdbox.h:245
Listener for Print selected on PrintDbox.
Definition: printdbox.h:370
PrintDboxPrintEvent(IdBlock &id_block, PollBlock &data)
Construct the PrintDboxEvent from the information returned by the Toolbox/WIMP.
Definition: printdbox.h:333
Full details of window used.
Definition: printdbox.h:270