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