]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/printdlg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxPrintDialog
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 This class represents the print and print setup common dialogs.
13 You may obtain a wxPrinterDC device context from a successfully dismissed
19 @see @ref overview_printing, @ref overview_cmndlg_print
21 class wxPrintDialog
: public wxObject
27 Pass a parent window, and optionally a pointer to a block of print
28 data, which will be copied to the print dialog's print data.
30 @see wxPrintDialogData
32 wxPrintDialog(wxWindow
* parent
, wxPrintDialogData
* data
= NULL
);
33 wxPrintDialog(wxWindow
*parent
, wxPrintData
* data
);
38 If GetPrintDC() has not been called, the device context obtained by
39 the dialog (if any) will be deleted.
41 virtual ~wxPrintDialog();
44 Returns the device context created by the print dialog, if any.
46 When this function has been called, the ownership of the device context
47 is transferred to the application, so it must then be deleted
50 virtual wxDC
* GetPrintDC();
53 Returns the @ref overview_printing_printdata "print dialog data" associated
54 with the print dialog.
56 virtual wxPrintDialogData
& GetPrintDialogData();
59 Returns the @ref overview_printing_printdata "print data" associated
60 with the print dialog.
62 virtual wxPrintData
& GetPrintData();
65 Shows the dialog, returning @c wxID_OK if the user pressed OK, and @c
66 wxID_CANCEL otherwise.
68 After this function is called, a device context may be retrievable using
71 virtual int ShowModal();
77 @class wxPageSetupDialog
79 This class represents the page setup common dialog.
81 The page setup dialog contains controls for paper size (letter, A4, A5 etc.),
82 orientation (landscape or portrait), and, only under Windows currently,
83 controls for setting left, top, right and bottom margin sizes in millimetres.
85 The exact appearance of this dialog varies among the platforms as a native
86 dialog is used when available (currently the case for all major platforms).
88 When the dialog has been closed, you need to query the wxPageSetupDialogData
89 object associated with the dialog.
91 Note that the OK and Cancel buttons do not destroy the dialog; this must be done
97 @see @ref overview_printing, wxPrintDialog, wxPageSetupDialogData
99 class wxPageSetupDialog
: public wxObject
105 Pass a parent window, and optionally a pointer to a block of page
106 setup data, which will be copied to the print dialog's internal data.
108 wxPageSetupDialog(wxWindow
* parent
, wxPageSetupDialogData
* data
= NULL
);
113 virtual ~wxPageSetupDialog();
116 Returns the wxPageSetupDialogData object associated with the dialog.
118 wxPageSetupDialogData
& GetPageSetupData();
121 Shows the dialog, returning @c wxID_OK if the user pressed OK, and
122 @c wxID_CANCEL otherwise.