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