]> git.saurik.com Git - wxWidgets.git/blame - interface/printdlg.h
add wxShowEvent::IsShown() and wxIconizeEvent::IsIconized() instead of (now deprecate...
[wxWidgets.git] / interface / printdlg.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: printdlg.h
e54c96f1 3// Purpose: interface of wxPrintDialog
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxPrintDialog
11 @wxheader{printdlg.h}
7c913512 12
23324ae1 13 This class represents the print and print setup common dialogs.
b1b95a65
FM
14 You may obtain a wxPrinterDC device context from a successfully dismissed
15 print dialog.
7c913512 16
23324ae1
FM
17 @library{wxcore}
18 @category{printing}
7c913512 19
b1b95a65 20 @see @ref overview_printing, @ref overview_cmndlg_print
23324ae1
FM
21*/
22class wxPrintDialog : public wxDialog
23{
24public:
25 /**
b1b95a65
FM
26 Constructor.
27
28 Pass a parent window, and optionally a pointer to a block of print
23324ae1 29 data, which will be copied to the print dialog's print data.
3c4f71cc 30
4cc4bfaf 31 @see wxPrintDialogData
23324ae1 32 */
4cc4bfaf 33 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
23324ae1
FM
34
35 /**
b1b95a65
FM
36 Destructor.
37
38 If GetPrintDC() has not been called, the device context obtained by
39 the dialog (if any) will be deleted.
23324ae1
FM
40 */
41 ~wxPrintDialog();
42
43 /**
44 Returns the device context created by the print dialog, if any.
b1b95a65 45
23324ae1
FM
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
48 explicitly.
49 */
50 wxDC* GetPrintDC();
51
52 /**
b1b95a65
FM
53 Returns the @ref overview_printing_printdata "print dialog data" associated
54 with the print dialog.
23324ae1
FM
55 */
56 wxPrintDialogData GetPrintDialogData();
57
58 /**
b1b95a65
FM
59 Shows the dialog, returning @c wxID_OK if the user pressed OK, and @c
60 wxID_CANCEL otherwise.
61
62 After this function is called, a device context may be retrievable using
63 GetPrintDC().
23324ae1
FM
64 */
65 int ShowModal();
66};
67
68
e54c96f1 69
23324ae1
FM
70/**
71 @class wxPageSetupDialog
72 @wxheader{printdlg.h}
7c913512 73
23324ae1
FM
74 This class represents the page setup common dialog. In MSW, the page setup
75 dialog is standard from Windows 95 on, replacing the print setup dialog (which
b1b95a65
FM
76 is retained in Windows and wxWidgets for backward compatibility).
77 On Windows 95 and NT 4.0 and above, the page setup dialog is native to the windowing
78 system, otherwise it is emulated.
7c913512 79
23324ae1
FM
80 The page setup dialog contains controls for paper size (A4, A5 etc.),
81 orientation (landscape or portrait), and controls for setting left, top, right
82 and bottom margin sizes in millimetres.
7c913512 83
23324ae1
FM
84 On Macintosh, the native page setup dialog is used, which lets you select paper
85 size and orientation but it does not let you change the page margins.
7c913512 86
23324ae1 87 On other platforms, a generic dialog is used.
7c913512 88
b1b95a65
FM
89 When the dialog has been closed, you need to query the wxPageSetupDialogData
90 object associated with the dialog.
7c913512 91
23324ae1
FM
92 Note that the OK and Cancel buttons do not destroy the dialog; this must be done
93 by the application.
7c913512 94
23324ae1
FM
95 @library{wxcore}
96 @category{printing}
7c913512 97
b1b95a65
FM
98 @see @ref overview_printing "Printing framework overview",
99 wxPrintDialog, wxPageSetupDialogData
23324ae1
FM
100*/
101class wxPageSetupDialog : public wxDialog
102{
103public:
104 /**
b1b95a65
FM
105 Constructor.
106
107 Pass a parent window, and optionally a pointer to a block of page
108 setup data, which will be copied to the print dialog's internal data.
23324ae1 109 */
b1b95a65 110 wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
23324ae1
FM
111
112 /**
113 Destructor.
114 */
115 ~wxPageSetupDialog();
116
117 /**
b1b95a65 118 Returns the wxPageSetupDialogData object associated with the dialog.
23324ae1 119 */
b1b95a65 120 wxPageSetupDialogData& GetPageSetupData();
23324ae1
FM
121
122 /**
b1b95a65
FM
123 Shows the dialog, returning @c wxID_OK if the user pressed OK, and
124 @c wxID_CANCEL otherwise.
23324ae1
FM
125 */
126 int ShowModal();
127};
e54c96f1 128