]> git.saurik.com Git - wxWidgets.git/blob - interface/printdlg.h
made wxAcceleratorTable work with buttons in wxGTK too
[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
15 a successfully dismissed print dialog.
16
17 @library{wxcore}
18 @category{printing}
19
20 @see @ref overview_printingoverview "Printing framework overview", @ref
21 overview_wxprintdialogoverview "wxPrintDialog Overview"
22 */
23 class wxPrintDialog : public wxDialog
24 {
25 public:
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.
29
30 @see wxPrintDialogData
31 */
32 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
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
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 @see @ref overview_printingoverview "Printing framework overview",
94 wxPrintDialog, wxPageSetupDialogData
95 */
96 class wxPageSetupDialog : public wxDialog
97 {
98 public:
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,
105 wxPageSetupDialogData* data = NULL);
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 };
124