1 \section{\class{wxPageSetupDialog
}}\label{wxpagesetupdialog
}
3 This class represents the page setup common dialog. The page setup dialog is standard from
4 Windows
95 on, replacing the print setup dialog (which is retained in Windows and wxWindows
5 for backward compatibility). On Windows
95 and NT
4.0 and above, the page setup dialog is
6 native to the windowing system, otherwise it is emulated.
8 The page setup dialog contains controls for paper size (A4, A5 etc.), orientation (landscape
9 or portrait), and controls for setting left, top, right and bottom margin sizes in millimetres.
11 When the dialog has been closed, you need to query the
\helpref{wxPageSetupDialogData
}{wxpagesetupdialogdata
} object
12 associated with the dialog.
14 Note that the OK and Cancel buttons do not destroy the dialog; this must be done by the
17 \wxheading{Derived from
}
19 \helpref{wxDialog
}{wxdialog
}\\
20 \helpref{wxWindow
}{wxwindow
}\\
21 \helpref{wxEvtHandler
}{wxevthandler
}\\
22 \helpref{wxObject
}{wxobject
}
24 \wxheading{Include files
}
30 \helpref{wxPrintDialog
}{wxprintdialog
},
\helpref{wxPageSetupDialogData
}{wxpagesetupdialogdata
}
32 \latexignore{\rtfignore{\wxheading{Members
}}}
34 \membersection{wxPageSetupDialog::wxPageSetupDialog
}
36 \func{}{wxPageSetupDialog
}{\param{wxWindow*
}{parent
},
\param{wxPageSetupDialogData*
}{data = NULL
}}
38 Constructor. Pass a parent window, and optionally a pointer to a block of page setup
39 data, which will be copied to the print dialog's internal data.
41 \membersection{wxPageSetupDialog::
\destruct{wxPageSetupDialog
}}
43 \func{}{\destruct{wxPageSetupDialog
}}{\void}
47 \membersection{wxPageSetupDialog::GetPageSetupData
}\label{wxpagesetupdialoggetpagesetupdata
}
49 \func{wxPageSetupDialogData\&
}{GetPageSetupData
}{\void}
51 Returns the
\helpref{page setup data
}{wxpagesetupdialogdata
} associated with the dialog.
53 \membersection{wxPageSetupDialog::Ok
}\label{wxpagesetupdialogok
}
55 \constfunc{bool
}{Ok
}{\void}
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.
61 \membersection{wxPageSetupDialog::ShowModal
}\label{wxpagesetupdialogshowmodal
}
63 \func{int
}{ShowModal
}{\void}
65 Shows the dialog, returning wxID
\_OK if the user pressed OK, and wxID
\_CANCEL
68 \section{\class{wxPageSetupDialogData
}}\label{wxpagesetupdialogdata
}
70 This class holds a variety of information related to
\helpref{wxPageSetupDialog
}{wxpagesetupdialog
}.
72 It contains a
\helpref{wxPrintData
}{wxprintdata
} member which is used to hold basic printer configuration data (as opposed to the
73 user-interface configuration settings stored by wxPageSetupDialogData).
75 \wxheading{Derived from
}
77 \helpref{wxObject
}{wxobject
}
79 \wxheading{Include files
}
85 \helpref{wxPageSetupDialog
}{wxpagesetupdialog
}
87 \latexignore{\rtfignore{\wxheading{Members
}}}
89 \membersection{wxPageSetupDialogData::wxPageSetupDialogData
}
91 \func{}{wxPageSetupDialogData
}{\void}
95 \func{}{wxPageSetupDialogData
}{\param{wxPageSetupDialogData\&
}{ data
}}
99 \func{}{wxPrintDialogData
}{\param{wxPrintData\&
}{ printData
}}
101 Construct an object from a print dialog data object.
103 \membersection{wxPageSetupDialogData::
\destruct{wxPageSetupDialogData
}}
105 \func{}{\destruct{wxPageSetupDialogData
}}{\void}
109 \membersection{wxPageSetupDialogData::EnableHelp
}\label{wxpagesetupdialogdataenablehelp
}
111 \func{void
}{EnableHelp
}{\param{bool
}{flag
}}
113 Enables or disables the `Help' button (Windows only).
115 \membersection{wxPageSetupDialogData::EnableMargins
}\label{wxpagesetupdialogdataenablemargins
}
117 \func{void
}{EnableMargins
}{\param{bool
}{flag
}}
119 Enables or disables the margin controls (Windows only).
121 \membersection{wxPageSetupDialogData::EnableOrientation
}\label{wxpagesetupdialogdataenableorientation
}
123 \func{void
}{EnableOrientation
}{\param{bool
}{flag
}}
125 Enables or disables the orientation control (Windows only).
127 \membersection{wxPageSetupDialogData::EnablePaper
}\label{wxpagesetupdialogdataenablepaper
}
129 \func{void
}{EnablePaper
}{\param{bool
}{flag
}}
131 Enables or disables the paper size control (Windows only).
133 \membersection{wxPageSetupDialogData::EnablePrinter
}\label{wxpagesetupdialogdataenableprinter
}
135 \func{void
}{EnablePrinter
}{\param{bool
}{flag
}}
137 Enables or disables the
{\bf Printer
} button, which invokes a printer setup dialog.
139 \membersection{wxPageSetupDialogData::GetDefaultMinMargins
}\label{wxpagesetupdialogdatagetdefaultminmargins
}
141 \constfunc{bool
}{GetDefaultMinMargins
}{\void}
143 Returns TRUE if the page setup dialog will take its minimum margin values from the currently
144 selected printer properties. Windows only.
146 \membersection{wxPageSetupDialogData::GetEnableMargins
}\label{wxpagesetupdialogdatagetenablemargins
}
148 \constfunc{bool
}{GetEnableMargins
}{\void}
150 Returns TRUE if the margin controls are enabled (Windows only).
152 \membersection{wxPageSetupDialogData::GetEnableOrientation
}\label{wxpagesetupdialogdatagetenableorientation
}
154 \constfunc{bool
}{GetEnableOrientation
}{\void}
156 Returns TRUE if the orientation control is enabled (Windows only).
158 \membersection{wxPageSetupDialogData::GetEnablePaper
}\label{wxpagesetupdialogdatagetenablepaper
}
160 \constfunc{bool
}{GetEnablePaper
}{\void}
162 Returns TRUE if the paper size control is enabled (Windows only).
164 \membersection{wxPageSetupDialogData::GetEnablePrinter
}\label{wxpagesetupdialogdatagetenableprinter
}
166 \constfunc{bool
}{GetEnablePrinter
}{\void}
168 Returns TRUE if the printer setup button is enabled.
170 \membersection{wxPageSetupDialogData::GetEnableHelp
}\label{wxpagesetupdialogdatagetenablehelp
}
172 \constfunc{bool
}{GetEnableHelp
}{\void}
174 Returns TRUE if the printer setup button is enabled.
176 \membersection{wxPageSetupDialogData::GetDefaultInfo
}\label{wxpagesetupdialogdatagetdefaultinfo
}
178 \constfunc{bool
}{GetDefaultInfo
}{\void}
180 Returns TRUE if the dialog will simply return default printer information (such as orientation)
181 instead of showing a dialog. Windows only.
183 \membersection{wxPageSetupDialogData::GetMarginTopLeft
}\label{wxpagesetupdialogdatagetmargintopleft
}
185 \constfunc{wxPoint
}{GetMarginTopLeft
}{\void}
187 Returns the left (x) and top (y) margins in millimetres.
189 \membersection{wxPageSetupDialogData::GetMarginBottomRight
}\label{wxpagesetupdialogdatagetmarginbottomright
}
191 \constfunc{wxPoint
}{GetMarginBottomRight
}{\void}
193 Returns the right (x) and bottom (y) margins in millimetres.
195 \membersection{wxPageSetupDialogData::GetMinMarginTopLeft
}\label{wxpagesetupdialogdatagetminmargintopleft
}
197 \constfunc{wxPoint
}{GetMinMarginTopLeft
}{\void}
199 Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
202 \membersection{wxPageSetupDialogData::GetMinMarginBottomRight
}\label{wxpagesetupdialogdatagetminmarginbottomright
}
204 \constfunc{wxPoint
}{GetMinMarginBottomRight
}{\void}
206 Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
209 \membersection{wxPageSetupDialogData::GetPaperId
}\label{wxpagesetupdialogdatagetpaperid
}
211 \constfunc{wxPaperSize
}{GetPaperId
}{\void}
213 Returns the paper id (stored in the internal wxPrintData object).
215 For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
217 \membersection{wxPageSetupDialogData::GetPaperSize
}\label{wxpagesetupdialogdatagetpapersize
}
219 \constfunc{wxSize
}{GetPaperSize
}{\void}
221 Returns the paper size in millimetres.
223 \membersection{wxPageSetupDialogData::GetPrintData
}\label{wxpagesetupdialogdatagetprintdata
}
225 \func{wxPrintData\&
}{GetPrintData
}{\void}
227 Returns a reference to the
\helpref{print data
}{wxprintdata
} associated with this object.
229 \membersection{wxPageSetupDialogData::Ok
}\label{wxpagesetupdialogdataok
}
231 \constfunc{bool
}{Ok
}{\void}
233 Returns TRUE if the print data associated with the dialog data is valid.
234 This can return FALSE on Windows if the current printer is not set, for example.
235 On all other platforms, it returns TRUE.
237 \membersection{wxPageSetupDialogData::SetDefaultInfo
}\label{wxpagesetupdialogdatasetdefaultinfo
}
239 \func{void
}{SetDefaultInfo
}{\param{bool
}{ flag
}}
241 Pass TRUE if the dialog will simply return default printer information (such as orientation)
242 instead of showing a dialog. Windows only.
244 \membersection{wxPageSetupDialogData::SetDefaultMinMargins
}\label{wxpagesetupdialogdatasetdefaultminmargins
}
246 \func{void
}{SetDefaultMinMargins
}{\param{bool
}{ flag
}}
248 Pass TRUE if the page setup dialog will take its minimum margin values from the currently
249 selected printer properties. Windows only. Units are in millimetres
251 \membersection{wxPageSetupDialogData::SetMarginTopLeft
}\label{wxpagesetupdialogdatasetmargintopleft
}
253 \func{void
}{GetMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
255 Sets the left (x) and top (y) margins in millimetres.
257 \membersection{wxPageSetupDialogData::SetMarginBottomRight
}\label{wxpagesetupdialogdatasetmarginbottomright
}
259 \func{void
}{SetMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
261 Sets the right (x) and bottom (y) margins in millimetres.
263 \membersection{wxPageSetupDialogData::SetMinMarginTopLeft
}\label{wxpagesetupdialogdatasetminmargintopleft
}
265 \func{void
}{SetMinMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
267 Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
270 \membersection{wxPageSetupDialogData::SetMinMarginBottomRight
}\label{wxpagesetupdialogdatasetminmarginbottomright
}
272 \func{void
}{SetMinMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
274 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
277 \membersection{wxPageSetupDialogData::SetPaperId
}\label{wxpagesetupdialogdatasetpaperid
}
279 \func{void
}{SetPaperId
}{\param{wxPaperSize\&
}{id
}}
281 Sets the paper size id. For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
283 Calling this function overrides the explicit paper dimensions passed in
\helpref{wxPageSetupDialogData::SetPaperSize
}{wxpagesetupdialogdatasetpapersize
}.
285 \membersection{wxPageSetupDialogData::SetPaperSize
}\label{wxpagesetupdialogdatasetpapersize
}
287 \func{void
}{SetPaperSize
}{\param{const wxSize\&
}{size
}}
289 Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the
290 internal wxPrintData object, otherwise the paper size overrides the paper id.
292 \membersection{wxPageSetupDialogData::SetPrintData
}\label{wxpagesetupdialogdatasetprintdata
}
294 \func{void
}{SetPrintData
}{\param{const wxPrintData\&
}{ printData
}}
296 Sets the
\helpref{print data
}{wxprintdata
} associated with this object.
298 \membersection{wxPageSetupDialogData::operator $=$
}\label{wxpagesetupdialogdataassign
}
300 \func{void
}{operator $=$
}{\param{const wxPrintData\&
}{ data
}}
302 Assigns print data to this object.
304 \func{void
}{operator $=$
}{\param{const wxPageSetupDialogData\&
}{ data
}}
306 Assigns page setup data to this object.