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