]> git.saurik.com Git - wxWidgets.git/blob - interface/printdlg.h
mac paths updated
[wxWidgets.git] / interface / printdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: printdlg.h
3 // Purpose: interface of wxPrintDialog
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxPrintDialog
11 @wxheader{printdlg.h}
12
13 This class represents the print and print setup common dialogs.
14 You may obtain a wxPrinterDC device context from a successfully dismissed
15 print dialog.
16
17 @library{wxcore}
18 @category{printing}
19
20 @see @ref overview_printing, @ref overview_cmndlg_print
21 */
22 class wxPrintDialog : public wxDialog
23 {
24 public:
25 /**
26 Constructor.
27
28 Pass a parent window, and optionally a pointer to a block of print
29 data, which will be copied to the print dialog's print data.
30
31 @see wxPrintDialogData
32 */
33 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
34
35 /**
36 Destructor.
37
38 If GetPrintDC() has not been called, the device context obtained by
39 the dialog (if any) will be deleted.
40 */
41 ~wxPrintDialog();
42
43 /**
44 Returns the device context created by the print dialog, if any.
45
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 /**
53 Returns the @ref overview_printing_printdata "print dialog data" associated
54 with the print dialog.
55 */
56 wxPrintDialogData GetPrintDialogData();
57
58 /**
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().
64 */
65 int ShowModal();
66 };
67
68
69
70 /**
71 @class wxPageSetupDialog
72 @wxheader{printdlg.h}
73
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
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.
79
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.
83
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.
86
87 On other platforms, a generic dialog is used.
88
89 When the dialog has been closed, you need to query the wxPageSetupDialogData
90 object associated with the dialog.
91
92 Note that the OK and Cancel buttons do not destroy the dialog; this must be done
93 by the application.
94
95 @library{wxcore}
96 @category{printing}
97
98 @see @ref overview_printing "Printing framework overview",
99 wxPrintDialog, wxPageSetupDialogData
100 */
101 class wxPageSetupDialog : public wxDialog
102 {
103 public:
104 /**
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.
109 */
110 wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
111
112 /**
113 Destructor.
114 */
115 ~wxPageSetupDialog();
116
117 /**
118 Returns the wxPageSetupDialogData object associated with the dialog.
119 */
120 wxPageSetupDialogData& GetPageSetupData();
121
122 /**
123 Shows the dialog, returning @c wxID_OK if the user pressed OK, and
124 @c wxID_CANCEL otherwise.
125 */
126 int ShowModal();
127 };
128