]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/pagedlg.tex
mention Watcom makefile for wxBase
[wxWidgets.git] / docs / latex / wx / pagedlg.tex
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::Ok}\label{wxpagesetupdialogok}
54
55 \constfunc{bool}{Ok}{\void}
56
57 Returns true if the print data associated with the dialog data is valid.
58 This can return false on Windows if the current printer is not set, for example.
59 On all other platforms, it returns true.
60
61 \membersection{wxPageSetupDialog::ShowModal}\label{wxpagesetupdialogshowmodal}
62
63 \func{int}{ShowModal}{\void}
64
65 Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL
66 otherwise.
67
68 \section{\class{wxPageSetupDialogData}}\label{wxpagesetupdialogdata}
69
70 This class holds a variety of information related to \helpref{wxPageSetupDialog}{wxpagesetupdialog}.
71
72 It contains a \helpref{wxPrintData}{wxprintdata} member which is used to hold basic printer configuration data (as opposed to the
73 user-interface configuration settings stored by wxPageSetupDialogData).
74
75 \wxheading{Derived from}
76
77 \helpref{wxObject}{wxobject}
78
79 \wxheading{Include files}
80
81 <wx/cmndata.h>
82
83 \wxheading{See also}
84
85 \helpref{wxPageSetupDialog}{wxpagesetupdialog}
86
87 \latexignore{\rtfignore{\wxheading{Members}}}
88
89 \membersection{wxPageSetupDialogData::wxPageSetupDialogData}
90
91 \func{}{wxPageSetupDialogData}{\void}
92
93 Default constructor.
94
95 \func{}{wxPageSetupDialogData}{\param{wxPageSetupDialogData\&}{ data}}
96
97 Copy constructor.
98
99 \func{}{wxPrintDialogData}{\param{wxPrintData\&}{ printData}}
100
101 Construct an object from a print dialog data object.
102
103 \membersection{wxPageSetupDialogData::\destruct{wxPageSetupDialogData}}
104
105 \func{}{\destruct{wxPageSetupDialogData}}{\void}
106
107 Destructor.
108
109 \membersection{wxPageSetupDialogData::EnableHelp}\label{wxpagesetupdialogdataenablehelp}
110
111 \func{void}{EnableHelp}{\param{bool }{flag}}
112
113 Enables or disables the `Help' button (Windows only).
114
115 \membersection{wxPageSetupDialogData::EnableMargins}\label{wxpagesetupdialogdataenablemargins}
116
117 \func{void}{EnableMargins}{\param{bool }{flag}}
118
119 Enables or disables the margin controls (Windows only).
120
121 \membersection{wxPageSetupDialogData::EnableOrientation}\label{wxpagesetupdialogdataenableorientation}
122
123 \func{void}{EnableOrientation}{\param{bool }{flag}}
124
125 Enables or disables the orientation control (Windows only).
126
127 \membersection{wxPageSetupDialogData::EnablePaper}\label{wxpagesetupdialogdataenablepaper}
128
129 \func{void}{EnablePaper}{\param{bool }{flag}}
130
131 Enables or disables the paper size control (Windows only).
132
133 \membersection{wxPageSetupDialogData::EnablePrinter}\label{wxpagesetupdialogdataenableprinter}
134
135 \func{void}{EnablePrinter}{\param{bool }{flag}}
136
137 Enables or disables the {\bf Printer} button, which invokes a printer setup dialog.
138
139 \membersection{wxPageSetupDialogData::GetDefaultMinMargins}\label{wxpagesetupdialogdatagetdefaultminmargins}
140
141 \constfunc{bool}{GetDefaultMinMargins}{\void}
142
143 Returns true if the page setup dialog will take its minimum margin values from the currently
144 selected printer properties. Windows only.
145
146 \membersection{wxPageSetupDialogData::GetEnableMargins}\label{wxpagesetupdialogdatagetenablemargins}
147
148 \constfunc{bool}{GetEnableMargins}{\void}
149
150 Returns true if the margin controls are enabled (Windows only).
151
152 \membersection{wxPageSetupDialogData::GetEnableOrientation}\label{wxpagesetupdialogdatagetenableorientation}
153
154 \constfunc{bool}{GetEnableOrientation}{\void}
155
156 Returns true if the orientation control is enabled (Windows only).
157
158 \membersection{wxPageSetupDialogData::GetEnablePaper}\label{wxpagesetupdialogdatagetenablepaper}
159
160 \constfunc{bool}{GetEnablePaper}{\void}
161
162 Returns true if the paper size control is enabled (Windows only).
163
164 \membersection{wxPageSetupDialogData::GetEnablePrinter}\label{wxpagesetupdialogdatagetenableprinter}
165
166 \constfunc{bool}{GetEnablePrinter}{\void}
167
168 Returns true if the printer setup button is enabled.
169
170 \membersection{wxPageSetupDialogData::GetEnableHelp}\label{wxpagesetupdialogdatagetenablehelp}
171
172 \constfunc{bool}{GetEnableHelp}{\void}
173
174 Returns true if the printer setup button is enabled.
175
176 \membersection{wxPageSetupDialogData::GetDefaultInfo}\label{wxpagesetupdialogdatagetdefaultinfo}
177
178 \constfunc{bool}{GetDefaultInfo}{\void}
179
180 Returns true if the dialog will simply return default printer information (such as orientation)
181 instead of showing a dialog. Windows only.
182
183 \membersection{wxPageSetupDialogData::GetMarginTopLeft}\label{wxpagesetupdialogdatagetmargintopleft}
184
185 \constfunc{wxPoint}{GetMarginTopLeft}{\void}
186
187 Returns the left (x) and top (y) margins in millimetres.
188
189 \membersection{wxPageSetupDialogData::GetMarginBottomRight}\label{wxpagesetupdialogdatagetmarginbottomright}
190
191 \constfunc{wxPoint}{GetMarginBottomRight}{\void}
192
193 Returns the right (x) and bottom (y) margins in millimetres.
194
195 \membersection{wxPageSetupDialogData::GetMinMarginTopLeft}\label{wxpagesetupdialogdatagetminmargintopleft}
196
197 \constfunc{wxPoint}{GetMinMarginTopLeft}{\void}
198
199 Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
200 are in millimetres
201
202 \membersection{wxPageSetupDialogData::GetMinMarginBottomRight}\label{wxpagesetupdialogdatagetminmarginbottomright}
203
204 \constfunc{wxPoint}{GetMinMarginBottomRight}{\void}
205
206 Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
207 are in millimetres
208
209 \membersection{wxPageSetupDialogData::GetPaperId}\label{wxpagesetupdialogdatagetpaperid}
210
211 \constfunc{wxPaperSize}{GetPaperId}{\void}
212
213 Returns the paper id (stored in the internal wxPrintData object).
214
215 For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}.
216
217 \membersection{wxPageSetupDialogData::GetPaperSize}\label{wxpagesetupdialogdatagetpapersize}
218
219 \constfunc{wxSize}{GetPaperSize}{\void}
220
221 Returns the paper size in millimetres.
222
223 \membersection{wxPageSetupDialogData::GetPrintData}\label{wxpagesetupdialogdatagetprintdata}
224
225 \func{wxPrintData\&}{GetPrintData}{\void}
226
227 Returns a reference to the \helpref{print data}{wxprintdata} associated with this object.
228
229 \membersection{wxPageSetupDialogData::Ok}\label{wxpagesetupdialogdataok}
230
231 \constfunc{bool}{Ok}{\void}
232
233 Returns true if the print data associated with the dialog data is valid.
234 This can return false on Windows if the current printer is not set, for example.
235 On all other platforms, it returns true.
236
237 \membersection{wxPageSetupDialogData::SetDefaultInfo}\label{wxpagesetupdialogdatasetdefaultinfo}
238
239 \func{void}{SetDefaultInfo}{\param{bool}{ flag}}
240
241 Pass true if the dialog will simply return default printer information (such as orientation)
242 instead of showing a dialog. Windows only.
243
244 \membersection{wxPageSetupDialogData::SetDefaultMinMargins}\label{wxpagesetupdialogdatasetdefaultminmargins}
245
246 \func{void}{SetDefaultMinMargins}{\param{bool}{ flag}}
247
248 Pass true if the page setup dialog will take its minimum margin values from the currently
249 selected printer properties. Windows only. Units are in millimetres
250
251 \membersection{wxPageSetupDialogData::SetMarginTopLeft}\label{wxpagesetupdialogdatasetmargintopleft}
252
253 \func{void}{GetMarginTopLeft}{\param{const wxPoint\& }{pt}}
254
255 Sets the left (x) and top (y) margins in millimetres.
256
257 \membersection{wxPageSetupDialogData::SetMarginBottomRight}\label{wxpagesetupdialogdatasetmarginbottomright}
258
259 \func{void}{SetMarginBottomRight}{\param{const wxPoint\& }{pt}}
260
261 Sets the right (x) and bottom (y) margins in millimetres.
262
263 \membersection{wxPageSetupDialogData::SetMinMarginTopLeft}\label{wxpagesetupdialogdatasetminmargintopleft}
264
265 \func{void}{SetMinMarginTopLeft}{\param{const wxPoint\& }{pt}}
266
267 Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
268 in millimetres.
269
270 \membersection{wxPageSetupDialogData::SetMinMarginBottomRight}\label{wxpagesetupdialogdatasetminmarginbottomright}
271
272 \func{void}{SetMinMarginBottomRight}{\param{const wxPoint\& }{pt}}
273
274 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
275 in millimetres.
276
277 \membersection{wxPageSetupDialogData::SetPaperId}\label{wxpagesetupdialogdatasetpaperid}
278
279 \func{void}{SetPaperId}{\param{wxPaperSize\& }{id}}
280
281 Sets the paper size id. For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}.
282
283 Calling this function overrides the explicit paper dimensions passed in \helpref{wxPageSetupDialogData::SetPaperSize}{wxpagesetupdialogdatasetpapersize}.
284
285 \membersection{wxPageSetupDialogData::SetPaperSize}\label{wxpagesetupdialogdatasetpapersize}
286
287 \func{void}{SetPaperSize}{\param{const wxSize\& }{size}}
288
289 Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the
290 internal wxPrintData object, otherwise the paper size overrides the paper id.
291
292 \membersection{wxPageSetupDialogData::SetPrintData}\label{wxpagesetupdialogdatasetprintdata}
293
294 \func{void}{SetPrintData}{\param{const wxPrintData\&}{ printData}}
295
296 Sets the \helpref{print data}{wxprintdata} associated with this object.
297
298 \membersection{wxPageSetupDialogData::operator $=$}\label{wxpagesetupdialogdataassign}
299
300 \func{void}{operator $=$}{\param{const wxPrintData\&}{ data}}
301
302 Assigns print data to this object.
303
304 \func{void}{operator $=$}{\param{const wxPageSetupDialogData\&}{ data}}
305
306 Assigns page setup data to this object.
307