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