1 \section{\class{wxPageSetupDialog
}}\label{wxpagesetupdialog
}
3 This class represents the page setup common dialog. In MSW, the page setup
4 dialog is standard from Windows
95 on, replacing the print setup dialog (which
5 is retained in Windows and wxWidgets for backward compatibility). On Windows
95
6 and NT
4.0 and above, the page setup dialog is native to the windowing system,
7 otherwise it is emulated.
9 The page setup dialog contains controls for paper size (A4, A5 etc.),
10 orientation (landscape or portrait), and controls for setting left, top, right
11 and bottom margin sizes in millimetres.
13 On Macintosh, the native page setup dialog is used, which lets you select paper
14 size and orientation but it does not let you change the page margins.
16 On other platforms, a generic dialog is used.
18 When the dialog has been closed, you need to query the
19 \helpref{wxPageSetupDialogData
}{wxpagesetupdialogdata
} object associated with
22 Note that the OK and Cancel buttons do not destroy the dialog; this must be done
25 \wxheading{Derived from
}
27 \helpref{wxDialog
}{wxdialog
}\\
28 \helpref{wxTopLevelWindow
}{wxtoplevelwindow
}\\
29 \helpref{wxWindow
}{wxwindow
}\\
30 \helpref{wxEvtHandler
}{wxevthandler
}\\
31 \helpref{wxObject
}{wxobject
}
33 \wxheading{Include files
}
39 \helpref{wxCore
}{librarieslist
}
43 \helpref{Printing framework overview
}{printingoverview
},
44 \helpref{wxPrintDialog
}{wxprintdialog
},
45 \helpref{wxPageSetupDialogData
}{wxpagesetupdialogdata
}
47 \latexignore{\rtfignore{\wxheading{Members
}}}
49 \membersection{wxPageSetupDialog::wxPageSetupDialog
}\label{wxpagesetupdialogctor
}
51 \func{}{wxPageSetupDialog
}{\param{wxWindow*
}{parent
},
\param{wxPageSetupDialogData*
}{data = NULL
}}
53 Constructor. Pass a parent window, and optionally a pointer to a block of page setup
54 data, which will be copied to the print dialog's internal data.
56 \membersection{wxPageSetupDialog::
\destruct{wxPageSetupDialog
}}\label{wxpagesetupdialogdtor
}
58 \func{}{\destruct{wxPageSetupDialog
}}{\void}
62 \membersection{wxPageSetupDialog::GetPageSetupData
}\label{wxpagesetupdialoggetpagesetupdata
}
64 \func{wxPageSetupDialogData\&
}{GetPageSetupData
}{\void}
66 Returns the
\helpref{page setup data
}{wxpagesetupdialogdata
} associated with the dialog.
68 %\membersection{wxPageSetupDialog::IsOk}\label{wxpagesetupdialogisok}
70 %\constfunc{bool}{IsOk}{\void}
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.
76 \membersection{wxPageSetupDialog::ShowModal
}\label{wxpagesetupdialogshowmodal
}
78 \func{int
}{ShowModal
}{\void}
80 Shows the dialog, returning wxID
\_OK if the user pressed OK, and wxID
\_CANCEL
83 \section{\class{wxPageSetupDialogData
}}\label{wxpagesetupdialogdata
}
85 This class holds a variety of information related to
\helpref{wxPageSetupDialog
}{wxpagesetupdialog
}.
87 It contains a
\helpref{wxPrintData
}{wxprintdata
} member which is used to hold basic printer configuration data (as opposed to the
88 user-interface configuration settings stored by wxPageSetupDialogData).
90 \wxheading{Derived from
}
92 \helpref{wxObject
}{wxobject
}
94 \wxheading{Include files
}
100 \helpref{wxCore
}{librarieslist
}
104 \helpref{Printing framework overview
}{printingoverview
},
105 \helpref{wxPageSetupDialog
}{wxpagesetupdialog
}
107 \latexignore{\rtfignore{\wxheading{Members
}}}
109 \membersection{wxPageSetupDialogData::wxPageSetupDialogData
}\label{wxpagesetupdialogdatactor
}
111 \func{}{wxPageSetupDialogData
}{\void}
115 \func{}{wxPageSetupDialogData
}{\param{wxPageSetupDialogData\&
}{ data
}}
119 \func{}{wxPageSetupDialogData
}{\param{wxPrintData\&
}{ printData
}}
121 Construct an object from a print data object.
123 \membersection{wxPageSetupDialogData::
\destruct{wxPageSetupDialogData
}}\label{wxpagesetupdialogdatadtor
}
125 \func{}{\destruct{wxPageSetupDialogData
}}{\void}
129 \membersection{wxPageSetupDialogData::EnableHelp
}\label{wxpagesetupdialogdataenablehelp
}
131 \func{void
}{EnableHelp
}{\param{bool
}{flag
}}
133 Enables or disables the `Help' button (Windows only).
135 \membersection{wxPageSetupDialogData::EnableMargins
}\label{wxpagesetupdialogdataenablemargins
}
137 \func{void
}{EnableMargins
}{\param{bool
}{flag
}}
139 Enables or disables the margin controls (Windows only).
141 \membersection{wxPageSetupDialogData::EnableOrientation
}\label{wxpagesetupdialogdataenableorientation
}
143 \func{void
}{EnableOrientation
}{\param{bool
}{flag
}}
145 Enables or disables the orientation control (Windows only).
147 \membersection{wxPageSetupDialogData::EnablePaper
}\label{wxpagesetupdialogdataenablepaper
}
149 \func{void
}{EnablePaper
}{\param{bool
}{flag
}}
151 Enables or disables the paper size control (Windows only).
153 \membersection{wxPageSetupDialogData::EnablePrinter
}\label{wxpagesetupdialogdataenableprinter
}
155 \func{void
}{EnablePrinter
}{\param{bool
}{flag
}}
157 Enables or disables the
{\bf Printer
} button, which invokes a printer setup dialog.
159 \membersection{wxPageSetupDialogData::GetDefaultMinMargins
}\label{wxpagesetupdialogdatagetdefaultminmargins
}
161 \constfunc{bool
}{GetDefaultMinMargins
}{\void}
163 Returns true if the page setup dialog will take its minimum margin values from the currently
164 selected printer properties. Windows only.
166 \membersection{wxPageSetupDialogData::GetEnableMargins
}\label{wxpagesetupdialogdatagetenablemargins
}
168 \constfunc{bool
}{GetEnableMargins
}{\void}
170 Returns true if the margin controls are enabled (Windows only).
172 \membersection{wxPageSetupDialogData::GetEnableOrientation
}\label{wxpagesetupdialogdatagetenableorientation
}
174 \constfunc{bool
}{GetEnableOrientation
}{\void}
176 Returns true if the orientation control is enabled (Windows only).
178 \membersection{wxPageSetupDialogData::GetEnablePaper
}\label{wxpagesetupdialogdatagetenablepaper
}
180 \constfunc{bool
}{GetEnablePaper
}{\void}
182 Returns true if the paper size control is enabled (Windows only).
184 \membersection{wxPageSetupDialogData::GetEnablePrinter
}\label{wxpagesetupdialogdatagetenableprinter
}
186 \constfunc{bool
}{GetEnablePrinter
}{\void}
188 Returns true if the printer setup button is enabled.
190 \membersection{wxPageSetupDialogData::GetEnableHelp
}\label{wxpagesetupdialogdatagetenablehelp
}
192 \constfunc{bool
}{GetEnableHelp
}{\void}
194 Returns true if the printer setup button is enabled.
196 \membersection{wxPageSetupDialogData::GetDefaultInfo
}\label{wxpagesetupdialogdatagetdefaultinfo
}
198 \constfunc{bool
}{GetDefaultInfo
}{\void}
200 Returns true if the dialog will simply return default printer information (such as orientation)
201 instead of showing a dialog. Windows only.
203 \membersection{wxPageSetupDialogData::GetMarginTopLeft
}\label{wxpagesetupdialogdatagetmargintopleft
}
205 \constfunc{wxPoint
}{GetMarginTopLeft
}{\void}
207 Returns the left (x) and top (y) margins in millimetres.
209 \membersection{wxPageSetupDialogData::GetMarginBottomRight
}\label{wxpagesetupdialogdatagetmarginbottomright
}
211 \constfunc{wxPoint
}{GetMarginBottomRight
}{\void}
213 Returns the right (x) and bottom (y) margins in millimetres.
215 \membersection{wxPageSetupDialogData::GetMinMarginTopLeft
}\label{wxpagesetupdialogdatagetminmargintopleft
}
217 \constfunc{wxPoint
}{GetMinMarginTopLeft
}{\void}
219 Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
222 \membersection{wxPageSetupDialogData::GetMinMarginBottomRight
}\label{wxpagesetupdialogdatagetminmarginbottomright
}
224 \constfunc{wxPoint
}{GetMinMarginBottomRight
}{\void}
226 Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
229 \membersection{wxPageSetupDialogData::GetPaperId
}\label{wxpagesetupdialogdatagetpaperid
}
231 \constfunc{wxPaperSize
}{GetPaperId
}{\void}
233 Returns the paper id (stored in the internal wxPrintData object).
235 For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
237 \membersection{wxPageSetupDialogData::GetPaperSize
}\label{wxpagesetupdialogdatagetpapersize
}
239 \constfunc{wxSize
}{GetPaperSize
}{\void}
241 Returns the paper size in millimetres.
243 \membersection{wxPageSetupDialogData::GetPrintData
}\label{wxpagesetupdialogdatagetprintdata
}
245 \func{wxPrintData\&
}{GetPrintData
}{\void}
247 Returns a reference to the
\helpref{print data
}{wxprintdata
} associated with this object.
249 \membersection{wxPageSetupDialogData::IsOk
}\label{wxpagesetupdialogdataisok
}
251 \constfunc{bool
}{IsOk
}{\void}
253 Returns true if the print data associated with the dialog data is valid.
254 This can return false on Windows if the current printer is not set, for example.
255 On all other platforms, it returns true.
257 \membersection{wxPageSetupDialogData::SetDefaultInfo
}\label{wxpagesetupdialogdatasetdefaultinfo
}
259 \func{void
}{SetDefaultInfo
}{\param{bool
}{ flag
}}
261 Pass true if the dialog will simply return default printer information (such as orientation)
262 instead of showing a dialog. Windows only.
264 \membersection{wxPageSetupDialogData::SetDefaultMinMargins
}\label{wxpagesetupdialogdatasetdefaultminmargins
}
266 \func{void
}{SetDefaultMinMargins
}{\param{bool
}{ flag
}}
268 Pass true if the page setup dialog will take its minimum margin values from the currently
269 selected printer properties. Windows only. Units are in millimetres
271 \membersection{wxPageSetupDialogData::SetMarginTopLeft
}\label{wxpagesetupdialogdatasetmargintopleft
}
273 \func{void
}{SetMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
275 Sets the left (x) and top (y) margins in millimetres.
277 \membersection{wxPageSetupDialogData::SetMarginBottomRight
}\label{wxpagesetupdialogdatasetmarginbottomright
}
279 \func{void
}{SetMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
281 Sets the right (x) and bottom (y) margins in millimetres.
283 \membersection{wxPageSetupDialogData::SetMinMarginTopLeft
}\label{wxpagesetupdialogdatasetminmargintopleft
}
285 \func{void
}{SetMinMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
287 Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
290 \membersection{wxPageSetupDialogData::SetMinMarginBottomRight
}\label{wxpagesetupdialogdatasetminmarginbottomright
}
292 \func{void
}{SetMinMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
294 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
297 \membersection{wxPageSetupDialogData::SetPaperId
}\label{wxpagesetupdialogdatasetpaperid
}
299 \func{void
}{SetPaperId
}{\param{wxPaperSize\&
}{id
}}
301 Sets the paper size id. For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
303 Calling this function overrides the explicit paper dimensions passed in
\helpref{wxPageSetupDialogData::SetPaperSize
}{wxpagesetupdialogdatasetpapersize
}.
305 \membersection{wxPageSetupDialogData::SetPaperSize
}\label{wxpagesetupdialogdatasetpapersize
}
307 \func{void
}{SetPaperSize
}{\param{const wxSize\&
}{size
}}
309 Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the
310 internal wxPrintData object, otherwise the paper size overrides the paper id.
312 \membersection{wxPageSetupDialogData::SetPrintData
}\label{wxpagesetupdialogdatasetprintdata
}
314 \func{void
}{SetPrintData
}{\param{const wxPrintData\&
}{ printData
}}
316 Sets the
\helpref{print data
}{wxprintdata
} associated with this object.
318 \membersection{wxPageSetupDialogData::operator $=$
}\label{wxpagesetupdialogdataassign
}
320 \func{void
}{operator $=$
}{\param{const wxPrintData\&
}{ data
}}
322 Assigns print data to this object.
324 \func{void
}{operator $=$
}{\param{const wxPageSetupDialogData\&
}{ data
}}
326 Assigns page setup data to this object.