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