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