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{wxWindow
}{wxwindow
}\\
29 \helpref{wxEvtHandler
}{wxevthandler
}\\
30 \helpref{wxObject
}{wxobject
}
32 \wxheading{Include files
}
38 \helpref{Printing framework overview
}{printingoverview
},
39 \helpref{wxPrintDialog
}{wxprintdialog
},
40 \helpref{wxPageSetupDialogData
}{wxpagesetupdialogdata
}
42 \latexignore{\rtfignore{\wxheading{Members
}}}
44 \membersection{wxPageSetupDialog::wxPageSetupDialog
}\label{wxpagesetupdialogctor
}
46 \func{}{wxPageSetupDialog
}{\param{wxWindow*
}{parent
},
\param{wxPageSetupDialogData*
}{data = NULL
}}
48 Constructor. Pass a parent window, and optionally a pointer to a block of page setup
49 data, which will be copied to the print dialog's internal data.
51 \membersection{wxPageSetupDialog::
\destruct{wxPageSetupDialog
}}\label{wxpagesetupdialogdtor
}
53 \func{}{\destruct{wxPageSetupDialog
}}{\void}
57 \membersection{wxPageSetupDialog::GetPageSetupData
}\label{wxpagesetupdialoggetpagesetupdata
}
59 \func{wxPageSetupDialogData\&
}{GetPageSetupData
}{\void}
61 Returns the
\helpref{page setup data
}{wxpagesetupdialogdata
} associated with the dialog.
63 %\membersection{wxPageSetupDialog::IsOk}\label{wxpagesetupdialogisok}
65 %\constfunc{bool}{IsOk}{\void}
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.
71 \membersection{wxPageSetupDialog::ShowModal
}\label{wxpagesetupdialogshowmodal
}
73 \func{int
}{ShowModal
}{\void}
75 Shows the dialog, returning wxID
\_OK if the user pressed OK, and wxID
\_CANCEL
78 \section{\class{wxPageSetupDialogData
}}\label{wxpagesetupdialogdata
}
80 This class holds a variety of information related to
\helpref{wxPageSetupDialog
}{wxpagesetupdialog
}.
82 It contains a
\helpref{wxPrintData
}{wxprintdata
} member which is used to hold basic printer configuration data (as opposed to the
83 user-interface configuration settings stored by wxPageSetupDialogData).
85 \wxheading{Derived from
}
87 \helpref{wxObject
}{wxobject
}
89 \wxheading{Include files
}
95 \helpref{Printing framework overview
}{printingoverview
},
96 \helpref{wxPageSetupDialog
}{wxpagesetupdialog
}
98 \latexignore{\rtfignore{\wxheading{Members
}}}
100 \membersection{wxPageSetupDialogData::wxPageSetupDialogData
}\label{wxpagesetupdialogdatactor
}
102 \func{}{wxPageSetupDialogData
}{\void}
106 \func{}{wxPageSetupDialogData
}{\param{wxPageSetupDialogData\&
}{ data
}}
110 \func{}{wxPageSetupDialogData
}{\param{wxPrintData\&
}{ printData
}}
112 Construct an object from a print data object.
114 \membersection{wxPageSetupDialogData::
\destruct{wxPageSetupDialogData
}}\label{wxpagesetupdialogdatadtor
}
116 \func{}{\destruct{wxPageSetupDialogData
}}{\void}
120 \membersection{wxPageSetupDialogData::EnableHelp
}\label{wxpagesetupdialogdataenablehelp
}
122 \func{void
}{EnableHelp
}{\param{bool
}{flag
}}
124 Enables or disables the `Help' button (Windows only).
126 \membersection{wxPageSetupDialogData::EnableMargins
}\label{wxpagesetupdialogdataenablemargins
}
128 \func{void
}{EnableMargins
}{\param{bool
}{flag
}}
130 Enables or disables the margin controls (Windows only).
132 \membersection{wxPageSetupDialogData::EnableOrientation
}\label{wxpagesetupdialogdataenableorientation
}
134 \func{void
}{EnableOrientation
}{\param{bool
}{flag
}}
136 Enables or disables the orientation control (Windows only).
138 \membersection{wxPageSetupDialogData::EnablePaper
}\label{wxpagesetupdialogdataenablepaper
}
140 \func{void
}{EnablePaper
}{\param{bool
}{flag
}}
142 Enables or disables the paper size control (Windows only).
144 \membersection{wxPageSetupDialogData::EnablePrinter
}\label{wxpagesetupdialogdataenableprinter
}
146 \func{void
}{EnablePrinter
}{\param{bool
}{flag
}}
148 Enables or disables the
{\bf Printer
} button, which invokes a printer setup dialog.
150 \membersection{wxPageSetupDialogData::GetDefaultMinMargins
}\label{wxpagesetupdialogdatagetdefaultminmargins
}
152 \constfunc{bool
}{GetDefaultMinMargins
}{\void}
154 Returns true if the page setup dialog will take its minimum margin values from the currently
155 selected printer properties. Windows only.
157 \membersection{wxPageSetupDialogData::GetEnableMargins
}\label{wxpagesetupdialogdatagetenablemargins
}
159 \constfunc{bool
}{GetEnableMargins
}{\void}
161 Returns true if the margin controls are enabled (Windows only).
163 \membersection{wxPageSetupDialogData::GetEnableOrientation
}\label{wxpagesetupdialogdatagetenableorientation
}
165 \constfunc{bool
}{GetEnableOrientation
}{\void}
167 Returns true if the orientation control is enabled (Windows only).
169 \membersection{wxPageSetupDialogData::GetEnablePaper
}\label{wxpagesetupdialogdatagetenablepaper
}
171 \constfunc{bool
}{GetEnablePaper
}{\void}
173 Returns true if the paper size control is enabled (Windows only).
175 \membersection{wxPageSetupDialogData::GetEnablePrinter
}\label{wxpagesetupdialogdatagetenableprinter
}
177 \constfunc{bool
}{GetEnablePrinter
}{\void}
179 Returns true if the printer setup button is enabled.
181 \membersection{wxPageSetupDialogData::GetEnableHelp
}\label{wxpagesetupdialogdatagetenablehelp
}
183 \constfunc{bool
}{GetEnableHelp
}{\void}
185 Returns true if the printer setup button is enabled.
187 \membersection{wxPageSetupDialogData::GetDefaultInfo
}\label{wxpagesetupdialogdatagetdefaultinfo
}
189 \constfunc{bool
}{GetDefaultInfo
}{\void}
191 Returns true if the dialog will simply return default printer information (such as orientation)
192 instead of showing a dialog. Windows only.
194 \membersection{wxPageSetupDialogData::GetMarginTopLeft
}\label{wxpagesetupdialogdatagetmargintopleft
}
196 \constfunc{wxPoint
}{GetMarginTopLeft
}{\void}
198 Returns the left (x) and top (y) margins in millimetres.
200 \membersection{wxPageSetupDialogData::GetMarginBottomRight
}\label{wxpagesetupdialogdatagetmarginbottomright
}
202 \constfunc{wxPoint
}{GetMarginBottomRight
}{\void}
204 Returns the right (x) and bottom (y) margins in millimetres.
206 \membersection{wxPageSetupDialogData::GetMinMarginTopLeft
}\label{wxpagesetupdialogdatagetminmargintopleft
}
208 \constfunc{wxPoint
}{GetMinMarginTopLeft
}{\void}
210 Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
213 \membersection{wxPageSetupDialogData::GetMinMarginBottomRight
}\label{wxpagesetupdialogdatagetminmarginbottomright
}
215 \constfunc{wxPoint
}{GetMinMarginBottomRight
}{\void}
217 Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
220 \membersection{wxPageSetupDialogData::GetPaperId
}\label{wxpagesetupdialogdatagetpaperid
}
222 \constfunc{wxPaperSize
}{GetPaperId
}{\void}
224 Returns the paper id (stored in the internal wxPrintData object).
226 For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
228 \membersection{wxPageSetupDialogData::GetPaperSize
}\label{wxpagesetupdialogdatagetpapersize
}
230 \constfunc{wxSize
}{GetPaperSize
}{\void}
232 Returns the paper size in millimetres.
234 \membersection{wxPageSetupDialogData::GetPrintData
}\label{wxpagesetupdialogdatagetprintdata
}
236 \func{wxPrintData\&
}{GetPrintData
}{\void}
238 Returns a reference to the
\helpref{print data
}{wxprintdata
} associated with this object.
240 \membersection{wxPageSetupDialogData::IsOk
}\label{wxpagesetupdialogdataisok
}
242 \constfunc{bool
}{IsOk
}{\void}
244 Returns true if the print data associated with the dialog data is valid.
245 This can return false on Windows if the current printer is not set, for example.
246 On all other platforms, it returns true.
248 \membersection{wxPageSetupDialogData::SetDefaultInfo
}\label{wxpagesetupdialogdatasetdefaultinfo
}
250 \func{void
}{SetDefaultInfo
}{\param{bool
}{ flag
}}
252 Pass true if the dialog will simply return default printer information (such as orientation)
253 instead of showing a dialog. Windows only.
255 \membersection{wxPageSetupDialogData::SetDefaultMinMargins
}\label{wxpagesetupdialogdatasetdefaultminmargins
}
257 \func{void
}{SetDefaultMinMargins
}{\param{bool
}{ flag
}}
259 Pass true if the page setup dialog will take its minimum margin values from the currently
260 selected printer properties. Windows only. Units are in millimetres
262 \membersection{wxPageSetupDialogData::SetMarginTopLeft
}\label{wxpagesetupdialogdatasetmargintopleft
}
264 \func{void
}{SetMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
266 Sets the left (x) and top (y) margins in millimetres.
268 \membersection{wxPageSetupDialogData::SetMarginBottomRight
}\label{wxpagesetupdialogdatasetmarginbottomright
}
270 \func{void
}{SetMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
272 Sets the right (x) and bottom (y) margins in millimetres.
274 \membersection{wxPageSetupDialogData::SetMinMarginTopLeft
}\label{wxpagesetupdialogdatasetminmargintopleft
}
276 \func{void
}{SetMinMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
278 Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
281 \membersection{wxPageSetupDialogData::SetMinMarginBottomRight
}\label{wxpagesetupdialogdatasetminmarginbottomright
}
283 \func{void
}{SetMinMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
285 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
288 \membersection{wxPageSetupDialogData::SetPaperId
}\label{wxpagesetupdialogdatasetpaperid
}
290 \func{void
}{SetPaperId
}{\param{wxPaperSize\&
}{id
}}
292 Sets the paper size id. For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
294 Calling this function overrides the explicit paper dimensions passed in
\helpref{wxPageSetupDialogData::SetPaperSize
}{wxpagesetupdialogdatasetpapersize
}.
296 \membersection{wxPageSetupDialogData::SetPaperSize
}\label{wxpagesetupdialogdatasetpapersize
}
298 \func{void
}{SetPaperSize
}{\param{const wxSize\&
}{size
}}
300 Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the
301 internal wxPrintData object, otherwise the paper size overrides the paper id.
303 \membersection{wxPageSetupDialogData::SetPrintData
}\label{wxpagesetupdialogdatasetprintdata
}
305 \func{void
}{SetPrintData
}{\param{const wxPrintData\&
}{ printData
}}
307 Sets the
\helpref{print data
}{wxprintdata
} associated with this object.
309 \membersection{wxPageSetupDialogData::operator $=$
}\label{wxpagesetupdialogdataassign
}
311 \func{void
}{operator $=$
}{\param{const wxPrintData\&
}{ data
}}
313 Assigns print data to this object.
315 \func{void
}{operator $=$
}{\param{const wxPageSetupDialogData\&
}{ data
}}
317 Assigns page setup data to this object.