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