]>
Commit | Line | Data |
---|---|---|
f3845e88 VZ |
1 | \section{\class{wxPageSetupDialog}}\label{wxpagesetupdialog} |
2 | ||
3 | This class represents the page setup common dialog. The page setup dialog is standard from | |
4 | Windows 95 on, replacing the print setup dialog (which is retained in Windows and wxWindows | |
5 | for backward compatibility). On Windows 95 and NT 4.0 and above, the page setup dialog is | |
6 | native to the windowing system, otherwise it is emulated. | |
7 | ||
8 | The page setup dialog contains controls for paper size (A4, A5 etc.), orientation (landscape | |
9 | or portrait), and controls for setting left, top, right and bottom margin sizes in millimetres. | |
10 | ||
11 | When the dialog has been closed, you need to query the \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} object | |
12 | associated with the dialog. | |
13 | ||
14 | Note that the OK and Cancel buttons do not destroy the dialog; this must be done by the | |
15 | application. | |
16 | ||
17 | \wxheading{Derived from} | |
18 | ||
19 | \helpref{wxDialog}{wxdialog}\\ | |
20 | \helpref{wxWindow}{wxwindow}\\ | |
21 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
22 | \helpref{wxObject}{wxobject} | |
23 | ||
24 | \wxheading{Include files} | |
25 | ||
26 | <wx/printdlg.h> | |
27 | ||
28 | \wxheading{See also} | |
29 | ||
30 | \helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} | |
31 | ||
32 | \latexignore{\rtfignore{\wxheading{Members}}} | |
33 | ||
34 | \membersection{wxPageSetupDialog::wxPageSetupDialog} | |
35 | ||
36 | \func{}{wxPageSetupDialog}{\param{wxWindow* }{parent}, \param{wxPageSetupDialogData* }{data = NULL}} | |
37 | ||
38 | Constructor. Pass a parent window, and optionally a pointer to a block of page setup | |
39 | data, which will be copied to the print dialog's internal data. | |
40 | ||
41 | \membersection{wxPageSetupDialog::\destruct{wxPageSetupDialog}} | |
42 | ||
43 | \func{}{\destruct{wxPageSetupDialog}}{\void} | |
44 | ||
45 | Destructor. | |
46 | ||
47 | \membersection{wxPageSetupDialog::GetPageSetupData}\label{wxpagesetupdialoggetpagesetupdata} | |
48 | ||
49 | \func{wxPageSetupDialogData\&}{GetPageSetupData}{\void} | |
50 | ||
51 | Returns the \helpref{page setup data}{wxpagesetupdialogdata} associated with the dialog. | |
52 | ||
53 | \membersection{wxPageSetupDialog::ShowModal}\label{wxpagesetupdialogshowmodal} | |
54 | ||
55 | \func{int}{ShowModal}{\void} | |
56 | ||
57 | Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL | |
58 | otherwise. | |
59 | ||
7bcb11d3 | 60 | \section{\class{wxPageSetupDialogData}}\label{wxpagesetupdialogdata} |
a660d684 KB |
61 | |
62 | This class holds a variety of information related to \helpref{wxPageSetupDialog}{wxpagesetupdialog}. | |
63 | ||
7bcb11d3 JS |
64 | It contains a \helpref{wxPrintData}{wxprintdata} member which is used to hold basic printer configuration data (as opposed to the |
65 | user-interface configuration settings stored by wxPageSetupDialogData). | |
66 | ||
a660d684 KB |
67 | \wxheading{Derived from} |
68 | ||
69 | \helpref{wxObject}{wxobject} | |
70 | ||
954b8ae6 JS |
71 | \wxheading{Include files} |
72 | ||
73 | <wx/cmndata.h> | |
74 | ||
a660d684 KB |
75 | \wxheading{See also} |
76 | ||
77 | \helpref{wxPageSetupDialog}{wxpagesetupdialog} | |
78 | ||
79 | \latexignore{\rtfignore{\wxheading{Members}}} | |
80 | ||
7bcb11d3 JS |
81 | \membersection{wxPageSetupDialogData::wxPageSetupDialogData} |
82 | ||
83 | \func{}{wxPageSetupDialogData}{\void} | |
84 | ||
85 | Default constructor. | |
86 | ||
87 | \func{}{wxPageSetupDialogData}{\param{wxPageSetupDialogData\&}{ data}} | |
a660d684 | 88 | |
7bcb11d3 | 89 | Copy constructor. |
a660d684 | 90 | |
7bcb11d3 | 91 | \func{}{wxPrintDialogData}{\param{wxPrintData\&}{ printData}} |
a660d684 | 92 | |
7bcb11d3 | 93 | Construct an object from a print dialog data object. |
a660d684 | 94 | |
7bcb11d3 JS |
95 | \membersection{wxPageSetupDialogData::\destruct{wxPageSetupDialogData}} |
96 | ||
97 | \func{}{\destruct{wxPageSetupDialogData}}{\void} | |
a660d684 KB |
98 | |
99 | Destructor. | |
100 | ||
7bcb11d3 | 101 | \membersection{wxPageSetupDialogData::EnableHelp}\label{wxpagesetupdialogdataenablehelp} |
a660d684 KB |
102 | |
103 | \func{void}{EnableHelp}{\param{bool }{flag}} | |
104 | ||
105 | Enables or disables the `Help' button (Windows only). | |
106 | ||
7bcb11d3 | 107 | \membersection{wxPageSetupDialogData::EnableMargins}\label{wxpagesetupdialogdataenablemargins} |
a660d684 KB |
108 | |
109 | \func{void}{EnableMargins}{\param{bool }{flag}} | |
110 | ||
111 | Enables or disables the margin controls (Windows only). | |
112 | ||
7bcb11d3 | 113 | \membersection{wxPageSetupDialogData::EnableOrientation}\label{wxpagesetupdialogdataenableorientation} |
a660d684 KB |
114 | |
115 | \func{void}{EnableOrientation}{\param{bool }{flag}} | |
116 | ||
117 | Enables or disables the orientation control (Windows only). | |
118 | ||
7bcb11d3 | 119 | \membersection{wxPageSetupDialogData::EnablePaper}\label{wxpagesetupdialogdataenablepaper} |
a660d684 KB |
120 | |
121 | \func{void}{EnablePaper}{\param{bool }{flag}} | |
122 | ||
123 | Enables or disables the paper size control (Windows only). | |
124 | ||
7bcb11d3 | 125 | \membersection{wxPageSetupDialogData::EnablePrinter}\label{wxpagesetupdialogdataenableprinter} |
a660d684 KB |
126 | |
127 | \func{void}{EnablePrinter}{\param{bool }{flag}} | |
128 | ||
129 | Enables or disables the {\bf Printer} button, which invokes a printer setup dialog. | |
130 | ||
7bcb11d3 | 131 | \membersection{wxPageSetupDialogData::GetDefaultMinMargins}\label{wxpagesetupdialogdatagetdefaultminmargins} |
a660d684 | 132 | |
7bcb11d3 | 133 | \constfunc{bool}{GetDefaultMinMargins}{\void} |
a660d684 | 134 | |
7bcb11d3 JS |
135 | Returns TRUE if the page setup dialog will take its minimum margin values from the currently |
136 | selected printer properties. Windows only. | |
a660d684 | 137 | |
7bcb11d3 | 138 | \membersection{wxPageSetupDialogData::GetEnableMargins}\label{wxpagesetupdialogdatagetenablemargins} |
a660d684 | 139 | |
7bcb11d3 | 140 | \constfunc{bool}{GetEnableMargins}{\void} |
a660d684 | 141 | |
7bcb11d3 | 142 | Returns TRUE if the margin controls are enabled (Windows only). |
a660d684 | 143 | |
7bcb11d3 | 144 | \membersection{wxPageSetupDialogData::GetEnableOrientation}\label{wxpagesetupdialogdatagetenableorientation} |
a660d684 | 145 | |
7bcb11d3 | 146 | \constfunc{bool}{GetEnableOrientation}{\void} |
a660d684 | 147 | |
7bcb11d3 | 148 | Returns TRUE if the orientation control is enabled (Windows only). |
a660d684 | 149 | |
7bcb11d3 | 150 | \membersection{wxPageSetupDialogData::GetEnablePaper}\label{wxpagesetupdialogdatagetenablepaper} |
a660d684 | 151 | |
7bcb11d3 | 152 | \constfunc{bool}{GetEnablePaper}{\void} |
a660d684 | 153 | |
7bcb11d3 | 154 | Returns TRUE if the paper size control is enabled (Windows only). |
a660d684 | 155 | |
7bcb11d3 | 156 | \membersection{wxPageSetupDialogData::GetEnablePrinter}\label{wxpagesetupdialogdatagetenableprinter} |
a660d684 | 157 | |
7bcb11d3 | 158 | \constfunc{bool}{GetEnablePrinter}{\void} |
a660d684 | 159 | |
7bcb11d3 | 160 | Returns TRUE if the printer setup button is enabled. |
a660d684 | 161 | |
7bcb11d3 | 162 | \membersection{wxPageSetupDialogData::GetEnableHelp}\label{wxpagesetupdialogdatagetenablehelp} |
a660d684 | 163 | |
7bcb11d3 | 164 | \constfunc{bool}{GetEnableHelp}{\void} |
a660d684 | 165 | |
7bcb11d3 | 166 | Returns TRUE if the printer setup button is enabled. |
a660d684 | 167 | |
7bcb11d3 | 168 | \membersection{wxPageSetupDialogData::GetDefaultInfo}\label{wxpagesetupdialogdatagetdefaultinfo} |
a660d684 | 169 | |
7bcb11d3 | 170 | \constfunc{bool}{GetDefaultInfo}{\void} |
a660d684 | 171 | |
7bcb11d3 JS |
172 | Returns TRUE if the dialog will simply return default printer information (such as orientation) |
173 | instead of showing a dialog. Windows only. | |
a660d684 | 174 | |
7bcb11d3 | 175 | \membersection{wxPageSetupDialogData::GetMarginTopLeft}\label{wxpagesetupdialogdatagetmargintopleft} |
a660d684 | 176 | |
7bcb11d3 | 177 | \constfunc{wxPoint}{GetMarginTopLeft}{\void} |
a660d684 | 178 | |
85f3749f | 179 | Returns the left (x) and top (y) margins in millimetres. |
a660d684 | 180 | |
7bcb11d3 | 181 | \membersection{wxPageSetupDialogData::GetMarginBottomRight}\label{wxpagesetupdialogdatagetmarginbottomright} |
a660d684 | 182 | |
7bcb11d3 | 183 | \constfunc{wxPoint}{GetMarginBottomRight}{\void} |
a660d684 | 184 | |
85f3749f | 185 | Returns the right (x) and bottom (y) margins in millimetres. |
a660d684 | 186 | |
7bcb11d3 | 187 | \membersection{wxPageSetupDialogData::GetMinMarginTopLeft}\label{wxpagesetupdialogdatagetminmargintopleft} |
a660d684 | 188 | |
7bcb11d3 | 189 | \constfunc{wxPoint}{GetMinMarginTopLeft}{\void} |
a660d684 | 190 | |
85f3749f JS |
191 | Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units |
192 | are in millimetres | |
a660d684 | 193 | |
7bcb11d3 | 194 | \membersection{wxPageSetupDialogData::GetMinMarginBottomRight}\label{wxpagesetupdialogdatagetminmarginbottomright} |
a660d684 | 195 | |
7bcb11d3 | 196 | \constfunc{wxPoint}{GetMinMarginBottomRight}{\void} |
a660d684 | 197 | |
85f3749f JS |
198 | Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units |
199 | are in millimetres | |
a660d684 | 200 | |
7bcb11d3 | 201 | \membersection{wxPageSetupDialogData::GetPaperId}\label{wxpagesetupdialogdatagetpaperid} |
a660d684 | 202 | |
7bcb11d3 | 203 | \constfunc{wxPaperSize}{GetPaperId}{\void} |
a660d684 | 204 | |
7bcb11d3 | 205 | Returns the paper id (stored in the internal wxPrintData object). |
a660d684 | 206 | |
7bcb11d3 | 207 | For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}. |
a660d684 | 208 | |
7bcb11d3 | 209 | \membersection{wxPageSetupDialogData::GetPaperSize}\label{wxpagesetupdialogdatagetpapersize} |
a660d684 | 210 | |
7bcb11d3 JS |
211 | \constfunc{wxSize}{GetPaperSize}{\void} |
212 | ||
213 | Returns the paper size in millimetres. | |
214 | ||
215 | \membersection{wxPageSetupDialogData::GetPrintData}\label{wxpagesetupdialogdatagetprintdata} | |
216 | ||
217 | \func{wxPrintData\&}{GetPrintData}{\void} | |
218 | ||
219 | Returns a reference to the \helpref{print data}{wxprintdata} associated with this object. | |
220 | ||
221 | \membersection{wxPageSetupDialogData::SetDefaultInfo}\label{wxpagesetupdialogdatasetdefaultinfo} | |
222 | ||
223 | \func{void}{SetDefaultInfo}{\param{bool}{ flag}} | |
224 | ||
225 | Pass TRUE if the dialog will simply return default printer information (such as orientation) | |
a660d684 KB |
226 | instead of showing a dialog. Windows only. |
227 | ||
7bcb11d3 | 228 | \membersection{wxPageSetupDialogData::SetDefaultMinMargins}\label{wxpagesetupdialogdatasetdefaultminmargins} |
a660d684 | 229 | |
7bcb11d3 | 230 | \func{void}{SetDefaultMinMargins}{\param{bool}{ flag}} |
a660d684 | 231 | |
7bcb11d3 | 232 | Pass TRUE if the page setup dialog will take its minimum margin values from the currently |
85f3749f | 233 | selected printer properties. Windows only. Units are in millimetres |
a660d684 | 234 | |
7bcb11d3 | 235 | \membersection{wxPageSetupDialogData::SetMarginTopLeft}\label{wxpagesetupdialogdatasetmargintopleft} |
a660d684 KB |
236 | |
237 | \func{void}{GetMarginTopLeft}{\param{const wxPoint\& }{pt}} | |
238 | ||
85f3749f | 239 | Sets the left (x) and top (y) margins in millimetres. |
a660d684 | 240 | |
7bcb11d3 | 241 | \membersection{wxPageSetupDialogData::SetMarginBottomRight}\label{wxpagesetupdialogdatasetmarginbottomright} |
a660d684 KB |
242 | |
243 | \func{void}{SetMarginBottomRight}{\param{const wxPoint\& }{pt}} | |
244 | ||
85f3749f | 245 | Sets the right (x) and bottom (y) margins in millimetres. |
a660d684 | 246 | |
7bcb11d3 | 247 | \membersection{wxPageSetupDialogData::SetMinMarginTopLeft}\label{wxpagesetupdialogdatasetminmargintopleft} |
a660d684 KB |
248 | |
249 | \func{void}{SetMinMarginTopLeft}{\param{const wxPoint\& }{pt}} | |
250 | ||
85f3749f JS |
251 | Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are |
252 | in millimetres. | |
a660d684 | 253 | |
7bcb11d3 | 254 | \membersection{wxPageSetupDialogData::SetMinMarginBottomRight}\label{wxpagesetupdialogdatasetminmarginbottomright} |
a660d684 KB |
255 | |
256 | \func{void}{SetMinMarginBottomRight}{\param{const wxPoint\& }{pt}} | |
257 | ||
85f3749f JS |
258 | Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are |
259 | in millimetres. | |
a660d684 | 260 | |
7bcb11d3 | 261 | \membersection{wxPageSetupDialogData::SetPaperId}\label{wxpagesetupdialogdatasetpaperid} |
a660d684 | 262 | |
7bcb11d3 | 263 | \func{void}{SetPaperId}{\param{wxPaperSize\& }{id}} |
a660d684 | 264 | |
7bcb11d3 | 265 | Sets the paper size id. For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}. |
a660d684 | 266 | |
7bcb11d3 | 267 | Calling this function overrides the explicit paper dimensions passed in \helpref{wxPageSetupDialogData::SetPaperSize}{wxpagesetupdialogdatasetpapersize}. |
a660d684 | 268 | |
7bcb11d3 | 269 | \membersection{wxPageSetupDialogData::SetPaperSize}\label{wxpagesetupdialogdatasetpapersize} |
a660d684 | 270 | |
7bcb11d3 | 271 | \func{void}{SetPaperSize}{\param{const wxSize\& }{size}} |
a660d684 | 272 | |
7bcb11d3 JS |
273 | Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the |
274 | internal wxPrintData object, otherwise the paper size overrides the paper id. | |
a660d684 | 275 | |
7bcb11d3 | 276 | \membersection{wxPageSetupDialogData::SetPrintData}\label{wxpagesetupdialogdatasetprintdata} |
a660d684 | 277 | |
7bcb11d3 JS |
278 | \func{void}{SetPrintData}{\param{const wxPrintData\&}{ printData}} |
279 | ||
280 | Sets the \helpref{print data}{wxprintdata} associated with this object. | |
281 | ||
282 | \membersection{wxPageSetupDialogData::operator $=$}\label{wxpagesetupdialogdataassign} | |
283 | ||
284 | \func{void}{operator $=$}{\param{const wxPrintData\&}{ data}} | |
285 | ||
286 | Assigns print data to this object. | |
287 | ||
288 | \func{void}{operator $=$}{\param{const wxPageSetupDialogData\&}{ data}} | |
289 | ||
290 | Assigns page setup data to this object. | |
a660d684 | 291 |