]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/pagedlg.tex
Use const
[wxWidgets.git] / docs / latex / wx / pagedlg.tex
CommitLineData
f3845e88
VZ
1\section{\class{wxPageSetupDialog}}\label{wxpagesetupdialog}
2
f415cab9
JS
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.
f3845e88 8
f415cab9
JS
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.
f3845e88 12
f415cab9
JS
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.
f3845e88 15
f415cab9
JS
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.
f3845e88
VZ
24
25\wxheading{Derived from}
26
27\helpref{wxDialog}{wxdialog}\\
7376079d 28\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
f3845e88
VZ
29\helpref{wxWindow}{wxwindow}\\
30\helpref{wxEvtHandler}{wxevthandler}\\
31\helpref{wxObject}{wxobject}
32
33\wxheading{Include files}
34
35<wx/printdlg.h>
36
a7af285d
VZ
37\wxheading{Library}
38
39\helpref{wxCore}{librarieslist}
40
f3845e88
VZ
41\wxheading{See also}
42
f415cab9
JS
43\helpref{Printing framework overview}{printingoverview},
44\helpref{wxPrintDialog}{wxprintdialog},
45\helpref{wxPageSetupDialogData}{wxpagesetupdialogdata}
f3845e88
VZ
46
47\latexignore{\rtfignore{\wxheading{Members}}}
48
dcbd177f 49\membersection{wxPageSetupDialog::wxPageSetupDialog}\label{wxpagesetupdialogctor}
f3845e88
VZ
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
dcbd177f 56\membersection{wxPageSetupDialog::\destruct{wxPageSetupDialog}}\label{wxpagesetupdialogdtor}
f3845e88
VZ
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
b7cacb43 68%\membersection{wxPageSetupDialog::IsOk}\label{wxpagesetupdialogisok}
6394c596 69%
b7cacb43 70%\constfunc{bool}{IsOk}{\void}
6394c596
JS
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.
58cf0491 75
f3845e88
VZ
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
7bcb11d3 83\section{\class{wxPageSetupDialogData}}\label{wxpagesetupdialogdata}
a660d684
KB
84
85This class holds a variety of information related to \helpref{wxPageSetupDialog}{wxpagesetupdialog}.
86
7bcb11d3
JS
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
a660d684
KB
90\wxheading{Derived from}
91
92\helpref{wxObject}{wxobject}
93
954b8ae6
JS
94\wxheading{Include files}
95
96<wx/cmndata.h>
97
a7af285d
VZ
98\wxheading{Library}
99
100\helpref{wxCore}{librarieslist}
101
a660d684
KB
102\wxheading{See also}
103
f415cab9 104\helpref{Printing framework overview}{printingoverview},
a660d684
KB
105\helpref{wxPageSetupDialog}{wxpagesetupdialog}
106
107\latexignore{\rtfignore{\wxheading{Members}}}
108
dcbd177f 109\membersection{wxPageSetupDialogData::wxPageSetupDialogData}\label{wxpagesetupdialogdatactor}
7bcb11d3
JS
110
111\func{}{wxPageSetupDialogData}{\void}
112
113Default constructor.
114
115\func{}{wxPageSetupDialogData}{\param{wxPageSetupDialogData\&}{ data}}
a660d684 116
7bcb11d3 117Copy constructor.
a660d684 118
3e5bdb36 119\func{}{wxPageSetupDialogData}{\param{wxPrintData\&}{ printData}}
a660d684 120
3e5bdb36 121Construct an object from a print data object.
a660d684 122
dcbd177f 123\membersection{wxPageSetupDialogData::\destruct{wxPageSetupDialogData}}\label{wxpagesetupdialogdatadtor}
7bcb11d3
JS
124
125\func{}{\destruct{wxPageSetupDialogData}}{\void}
a660d684
KB
126
127Destructor.
128
7bcb11d3 129\membersection{wxPageSetupDialogData::EnableHelp}\label{wxpagesetupdialogdataenablehelp}
a660d684
KB
130
131\func{void}{EnableHelp}{\param{bool }{flag}}
132
133Enables or disables the `Help' button (Windows only).
134
7bcb11d3 135\membersection{wxPageSetupDialogData::EnableMargins}\label{wxpagesetupdialogdataenablemargins}
a660d684
KB
136
137\func{void}{EnableMargins}{\param{bool }{flag}}
138
139Enables or disables the margin controls (Windows only).
140
7bcb11d3 141\membersection{wxPageSetupDialogData::EnableOrientation}\label{wxpagesetupdialogdataenableorientation}
a660d684
KB
142
143\func{void}{EnableOrientation}{\param{bool }{flag}}
144
145Enables or disables the orientation control (Windows only).
146
7bcb11d3 147\membersection{wxPageSetupDialogData::EnablePaper}\label{wxpagesetupdialogdataenablepaper}
a660d684
KB
148
149\func{void}{EnablePaper}{\param{bool }{flag}}
150
151Enables or disables the paper size control (Windows only).
152
7bcb11d3 153\membersection{wxPageSetupDialogData::EnablePrinter}\label{wxpagesetupdialogdataenableprinter}
a660d684
KB
154
155\func{void}{EnablePrinter}{\param{bool }{flag}}
156
157Enables or disables the {\bf Printer} button, which invokes a printer setup dialog.
158
7bcb11d3 159\membersection{wxPageSetupDialogData::GetDefaultMinMargins}\label{wxpagesetupdialogdatagetdefaultminmargins}
a660d684 160
7bcb11d3 161\constfunc{bool}{GetDefaultMinMargins}{\void}
a660d684 162
cc81d32f 163Returns true if the page setup dialog will take its minimum margin values from the currently
7bcb11d3 164selected printer properties. Windows only.
a660d684 165
7bcb11d3 166\membersection{wxPageSetupDialogData::GetEnableMargins}\label{wxpagesetupdialogdatagetenablemargins}
a660d684 167
7bcb11d3 168\constfunc{bool}{GetEnableMargins}{\void}
a660d684 169
cc81d32f 170Returns true if the margin controls are enabled (Windows only).
a660d684 171
7bcb11d3 172\membersection{wxPageSetupDialogData::GetEnableOrientation}\label{wxpagesetupdialogdatagetenableorientation}
a660d684 173
7bcb11d3 174\constfunc{bool}{GetEnableOrientation}{\void}
a660d684 175
cc81d32f 176Returns true if the orientation control is enabled (Windows only).
a660d684 177
7bcb11d3 178\membersection{wxPageSetupDialogData::GetEnablePaper}\label{wxpagesetupdialogdatagetenablepaper}
a660d684 179
7bcb11d3 180\constfunc{bool}{GetEnablePaper}{\void}
a660d684 181
cc81d32f 182Returns true if the paper size control is enabled (Windows only).
a660d684 183
7bcb11d3 184\membersection{wxPageSetupDialogData::GetEnablePrinter}\label{wxpagesetupdialogdatagetenableprinter}
a660d684 185
7bcb11d3 186\constfunc{bool}{GetEnablePrinter}{\void}
a660d684 187
cc81d32f 188Returns true if the printer setup button is enabled.
a660d684 189
7bcb11d3 190\membersection{wxPageSetupDialogData::GetEnableHelp}\label{wxpagesetupdialogdatagetenablehelp}
a660d684 191
7bcb11d3 192\constfunc{bool}{GetEnableHelp}{\void}
a660d684 193
cc81d32f 194Returns true if the printer setup button is enabled.
a660d684 195
7bcb11d3 196\membersection{wxPageSetupDialogData::GetDefaultInfo}\label{wxpagesetupdialogdatagetdefaultinfo}
a660d684 197
7bcb11d3 198\constfunc{bool}{GetDefaultInfo}{\void}
a660d684 199
cc81d32f 200Returns true if the dialog will simply return default printer information (such as orientation)
7bcb11d3 201instead of showing a dialog. Windows only.
a660d684 202
7bcb11d3 203\membersection{wxPageSetupDialogData::GetMarginTopLeft}\label{wxpagesetupdialogdatagetmargintopleft}
a660d684 204
7bcb11d3 205\constfunc{wxPoint}{GetMarginTopLeft}{\void}
a660d684 206
85f3749f 207Returns the left (x) and top (y) margins in millimetres.
a660d684 208
7bcb11d3 209\membersection{wxPageSetupDialogData::GetMarginBottomRight}\label{wxpagesetupdialogdatagetmarginbottomright}
a660d684 210
7bcb11d3 211\constfunc{wxPoint}{GetMarginBottomRight}{\void}
a660d684 212
85f3749f 213Returns the right (x) and bottom (y) margins in millimetres.
a660d684 214
7bcb11d3 215\membersection{wxPageSetupDialogData::GetMinMarginTopLeft}\label{wxpagesetupdialogdatagetminmargintopleft}
a660d684 216
7bcb11d3 217\constfunc{wxPoint}{GetMinMarginTopLeft}{\void}
a660d684 218
85f3749f
JS
219Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
220are in millimetres
a660d684 221
7bcb11d3 222\membersection{wxPageSetupDialogData::GetMinMarginBottomRight}\label{wxpagesetupdialogdatagetminmarginbottomright}
a660d684 223
7bcb11d3 224\constfunc{wxPoint}{GetMinMarginBottomRight}{\void}
a660d684 225
85f3749f
JS
226Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
227are in millimetres
a660d684 228
7bcb11d3 229\membersection{wxPageSetupDialogData::GetPaperId}\label{wxpagesetupdialogdatagetpaperid}
a660d684 230
7bcb11d3 231\constfunc{wxPaperSize}{GetPaperId}{\void}
a660d684 232
7bcb11d3 233Returns the paper id (stored in the internal wxPrintData object).
a660d684 234
7bcb11d3 235For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}.
a660d684 236
7bcb11d3 237\membersection{wxPageSetupDialogData::GetPaperSize}\label{wxpagesetupdialogdatagetpapersize}
a660d684 238
7bcb11d3
JS
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
b7cacb43 249\membersection{wxPageSetupDialogData::IsOk}\label{wxpagesetupdialogdataisok}
58cf0491 250
b7cacb43 251\constfunc{bool}{IsOk}{\void}
58cf0491 252
cc81d32f
VS
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.
58cf0491 256
7bcb11d3
JS
257\membersection{wxPageSetupDialogData::SetDefaultInfo}\label{wxpagesetupdialogdatasetdefaultinfo}
258
259\func{void}{SetDefaultInfo}{\param{bool}{ flag}}
260
cc81d32f 261Pass true if the dialog will simply return default printer information (such as orientation)
a660d684
KB
262instead of showing a dialog. Windows only.
263
7bcb11d3 264\membersection{wxPageSetupDialogData::SetDefaultMinMargins}\label{wxpagesetupdialogdatasetdefaultminmargins}
a660d684 265
7bcb11d3 266\func{void}{SetDefaultMinMargins}{\param{bool}{ flag}}
a660d684 267
cc81d32f 268Pass true if the page setup dialog will take its minimum margin values from the currently
85f3749f 269selected printer properties. Windows only. Units are in millimetres
a660d684 270
7bcb11d3 271\membersection{wxPageSetupDialogData::SetMarginTopLeft}\label{wxpagesetupdialogdatasetmargintopleft}
a660d684 272
6394c596 273\func{void}{SetMarginTopLeft}{\param{const wxPoint\& }{pt}}
a660d684 274
85f3749f 275Sets the left (x) and top (y) margins in millimetres.
a660d684 276
7bcb11d3 277\membersection{wxPageSetupDialogData::SetMarginBottomRight}\label{wxpagesetupdialogdatasetmarginbottomright}
a660d684
KB
278
279\func{void}{SetMarginBottomRight}{\param{const wxPoint\& }{pt}}
280
85f3749f 281Sets the right (x) and bottom (y) margins in millimetres.
a660d684 282
7bcb11d3 283\membersection{wxPageSetupDialogData::SetMinMarginTopLeft}\label{wxpagesetupdialogdatasetminmargintopleft}
a660d684
KB
284
285\func{void}{SetMinMarginTopLeft}{\param{const wxPoint\& }{pt}}
286
85f3749f
JS
287Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
288in millimetres.
a660d684 289
7bcb11d3 290\membersection{wxPageSetupDialogData::SetMinMarginBottomRight}\label{wxpagesetupdialogdatasetminmarginbottomright}
a660d684
KB
291
292\func{void}{SetMinMarginBottomRight}{\param{const wxPoint\& }{pt}}
293
85f3749f
JS
294Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
295in millimetres.
a660d684 296
7bcb11d3 297\membersection{wxPageSetupDialogData::SetPaperId}\label{wxpagesetupdialogdatasetpaperid}
a660d684 298
7bcb11d3 299\func{void}{SetPaperId}{\param{wxPaperSize\& }{id}}
a660d684 300
7bcb11d3 301Sets the paper size id. For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}.
a660d684 302
7bcb11d3 303Calling this function overrides the explicit paper dimensions passed in \helpref{wxPageSetupDialogData::SetPaperSize}{wxpagesetupdialogdatasetpapersize}.
a660d684 304
7bcb11d3 305\membersection{wxPageSetupDialogData::SetPaperSize}\label{wxpagesetupdialogdatasetpapersize}
a660d684 306
7bcb11d3 307\func{void}{SetPaperSize}{\param{const wxSize\& }{size}}
a660d684 308
7bcb11d3
JS
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.
a660d684 311
7bcb11d3 312\membersection{wxPageSetupDialogData::SetPrintData}\label{wxpagesetupdialogdatasetprintdata}
a660d684 313
7bcb11d3
JS
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.
a660d684 327