]> git.saurik.com Git - wxWidgets.git/blame - interface/printdlg.h
SF bug 1895101
[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
FM
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.
7c913512 16
23324ae1
FM
17 @library{wxcore}
18 @category{printing}
7c913512 19
e54c96f1 20 @see @ref overview_printingoverview "Printing framework overview", @ref
23324ae1
FM
21 overview_wxprintdialogoverview "wxPrintDialog Overview"
22*/
23class wxPrintDialog : public wxDialog
24{
25public:
26 /**
27 Constructor. 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.
3c4f71cc 29
4cc4bfaf 30 @see wxPrintDialogData
23324ae1 31 */
4cc4bfaf 32 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
23324ae1
FM
33
34 /**
35 Destructor. If GetPrintDC() has @e not been called,
36 the device context obtained by the dialog (if any) will be deleted.
37 */
38 ~wxPrintDialog();
39
40 /**
41 Returns the device context created by the print dialog, if any.
42 When this function has been called, the ownership of the device context
43 is transferred to the application, so it must then be deleted
44 explicitly.
45 */
46 wxDC* GetPrintDC();
47
48 /**
49 Returns the @ref overview_wxprintdialogdata "print dialog data" associated with
50 the print dialog.
51 */
52 wxPrintDialogData GetPrintDialogData();
53
54 /**
55 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
56 otherwise. After this function is called, a device context may
57 be retrievable using GetPrintDC().
58 */
59 int ShowModal();
60};
61
62
e54c96f1 63
23324ae1
FM
64/**
65 @class wxPageSetupDialog
66 @wxheader{printdlg.h}
7c913512 67
23324ae1
FM
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.
7c913512 73
23324ae1
FM
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.
7c913512 77
23324ae1
FM
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.
7c913512 80
23324ae1 81 On other platforms, a generic dialog is used.
7c913512 82
23324ae1
FM
83 When the dialog has been closed, you need to query the
84 wxPageSetupDialogData object associated with
85 the dialog.
7c913512 86
23324ae1
FM
87 Note that the OK and Cancel buttons do not destroy the dialog; this must be done
88 by the application.
7c913512 89
23324ae1
FM
90 @library{wxcore}
91 @category{printing}
7c913512 92
e54c96f1
FM
93 @see @ref overview_printingoverview "Printing framework overview",
94 wxPrintDialog, wxPageSetupDialogData
23324ae1
FM
95*/
96class wxPageSetupDialog : public wxDialog
97{
98public:
99 /**
100 Constructor. Pass a parent window, and optionally a pointer to a block of page
101 setup
102 data, which will be copied to the print dialog's internal data.
103 */
104 wxPageSetupDialog(wxWindow* parent,
4cc4bfaf 105 wxPageSetupDialogData* data = NULL);
23324ae1
FM
106
107 /**
108 Destructor.
109 */
110 ~wxPageSetupDialog();
111
112 /**
113 Returns the @ref overview_wxpagesetupdialogdata "page setup data" associated
114 with the dialog.
115 */
116 wxPageSetupDialogData GetPageSetupData();
117
118 /**
119 Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
120 otherwise.
121 */
122 int ShowModal();
123};
e54c96f1 124