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{wxCore
}{librarieslist
}
42 \helpref{Printing framework overview
}{printingoverview
},
43 \helpref{wxPrintDialog
}{wxprintdialog
},
44 \helpref{wxPageSetupDialogData
}{wxpagesetupdialogdata
}
46 \latexignore{\rtfignore{\wxheading{Members
}}}
48 \membersection{wxPageSetupDialog::wxPageSetupDialog
}\label{wxpagesetupdialogctor
}
50 \func{}{wxPageSetupDialog
}{\param{wxWindow*
}{parent
},
\param{wxPageSetupDialogData*
}{data = NULL
}}
52 Constructor. Pass a parent window, and optionally a pointer to a block of page setup
53 data, which will be copied to the print dialog's internal data.
55 \membersection{wxPageSetupDialog::
\destruct{wxPageSetupDialog
}}\label{wxpagesetupdialogdtor
}
57 \func{}{\destruct{wxPageSetupDialog
}}{\void}
61 \membersection{wxPageSetupDialog::GetPageSetupData
}\label{wxpagesetupdialoggetpagesetupdata
}
63 \func{wxPageSetupDialogData\&
}{GetPageSetupData
}{\void}
65 Returns the
\helpref{page setup data
}{wxpagesetupdialogdata
} associated with the dialog.
67 %\membersection{wxPageSetupDialog::IsOk}\label{wxpagesetupdialogisok}
69 %\constfunc{bool}{IsOk}{\void}
71 %Returns true if the print data associated with the dialog data is valid.
72 %This can return false on Windows if the current printer is not set, for example.
73 %On all other platforms, it returns true.
75 \membersection{wxPageSetupDialog::ShowModal
}\label{wxpagesetupdialogshowmodal
}
77 \func{int
}{ShowModal
}{\void}
79 Shows the dialog, returning wxID
\_OK if the user pressed OK, and wxID
\_CANCEL
82 \section{\class{wxPageSetupDialogData
}}\label{wxpagesetupdialogdata
}
84 This class holds a variety of information related to
\helpref{wxPageSetupDialog
}{wxpagesetupdialog
}.
86 It contains a
\helpref{wxPrintData
}{wxprintdata
} member which is used to hold basic printer configuration data (as opposed to the
87 user-interface configuration settings stored by wxPageSetupDialogData).
89 \wxheading{Derived from
}
91 \helpref{wxObject
}{wxobject
}
93 \wxheading{Include files
}
99 \helpref{wxCore
}{librarieslist
}
103 \helpref{Printing framework overview
}{printingoverview
},
104 \helpref{wxPageSetupDialog
}{wxpagesetupdialog
}
106 \latexignore{\rtfignore{\wxheading{Members
}}}
108 \membersection{wxPageSetupDialogData::wxPageSetupDialogData
}\label{wxpagesetupdialogdatactor
}
110 \func{}{wxPageSetupDialogData
}{\void}
114 \func{}{wxPageSetupDialogData
}{\param{wxPageSetupDialogData\&
}{ data
}}
118 \func{}{wxPageSetupDialogData
}{\param{wxPrintData\&
}{ printData
}}
120 Construct an object from a print data object.
122 \membersection{wxPageSetupDialogData::
\destruct{wxPageSetupDialogData
}}\label{wxpagesetupdialogdatadtor
}
124 \func{}{\destruct{wxPageSetupDialogData
}}{\void}
128 \membersection{wxPageSetupDialogData::EnableHelp
}\label{wxpagesetupdialogdataenablehelp
}
130 \func{void
}{EnableHelp
}{\param{bool
}{flag
}}
132 Enables or disables the `Help' button (Windows only).
134 \membersection{wxPageSetupDialogData::EnableMargins
}\label{wxpagesetupdialogdataenablemargins
}
136 \func{void
}{EnableMargins
}{\param{bool
}{flag
}}
138 Enables or disables the margin controls (Windows only).
140 \membersection{wxPageSetupDialogData::EnableOrientation
}\label{wxpagesetupdialogdataenableorientation
}
142 \func{void
}{EnableOrientation
}{\param{bool
}{flag
}}
144 Enables or disables the orientation control (Windows only).
146 \membersection{wxPageSetupDialogData::EnablePaper
}\label{wxpagesetupdialogdataenablepaper
}
148 \func{void
}{EnablePaper
}{\param{bool
}{flag
}}
150 Enables or disables the paper size control (Windows only).
152 \membersection{wxPageSetupDialogData::EnablePrinter
}\label{wxpagesetupdialogdataenableprinter
}
154 \func{void
}{EnablePrinter
}{\param{bool
}{flag
}}
156 Enables or disables the
{\bf Printer
} button, which invokes a printer setup dialog.
158 \membersection{wxPageSetupDialogData::GetDefaultMinMargins
}\label{wxpagesetupdialogdatagetdefaultminmargins
}
160 \constfunc{bool
}{GetDefaultMinMargins
}{\void}
162 Returns true if the page setup dialog will take its minimum margin values from the currently
163 selected printer properties. Windows only.
165 \membersection{wxPageSetupDialogData::GetEnableMargins
}\label{wxpagesetupdialogdatagetenablemargins
}
167 \constfunc{bool
}{GetEnableMargins
}{\void}
169 Returns true if the margin controls are enabled (Windows only).
171 \membersection{wxPageSetupDialogData::GetEnableOrientation
}\label{wxpagesetupdialogdatagetenableorientation
}
173 \constfunc{bool
}{GetEnableOrientation
}{\void}
175 Returns true if the orientation control is enabled (Windows only).
177 \membersection{wxPageSetupDialogData::GetEnablePaper
}\label{wxpagesetupdialogdatagetenablepaper
}
179 \constfunc{bool
}{GetEnablePaper
}{\void}
181 Returns true if the paper size control is enabled (Windows only).
183 \membersection{wxPageSetupDialogData::GetEnablePrinter
}\label{wxpagesetupdialogdatagetenableprinter
}
185 \constfunc{bool
}{GetEnablePrinter
}{\void}
187 Returns true if the printer setup button is enabled.
189 \membersection{wxPageSetupDialogData::GetEnableHelp
}\label{wxpagesetupdialogdatagetenablehelp
}
191 \constfunc{bool
}{GetEnableHelp
}{\void}
193 Returns true if the printer setup button is enabled.
195 \membersection{wxPageSetupDialogData::GetDefaultInfo
}\label{wxpagesetupdialogdatagetdefaultinfo
}
197 \constfunc{bool
}{GetDefaultInfo
}{\void}
199 Returns true if the dialog will simply return default printer information (such as orientation)
200 instead of showing a dialog. Windows only.
202 \membersection{wxPageSetupDialogData::GetMarginTopLeft
}\label{wxpagesetupdialogdatagetmargintopleft
}
204 \constfunc{wxPoint
}{GetMarginTopLeft
}{\void}
206 Returns the left (x) and top (y) margins in millimetres.
208 \membersection{wxPageSetupDialogData::GetMarginBottomRight
}\label{wxpagesetupdialogdatagetmarginbottomright
}
210 \constfunc{wxPoint
}{GetMarginBottomRight
}{\void}
212 Returns the right (x) and bottom (y) margins in millimetres.
214 \membersection{wxPageSetupDialogData::GetMinMarginTopLeft
}\label{wxpagesetupdialogdatagetminmargintopleft
}
216 \constfunc{wxPoint
}{GetMinMarginTopLeft
}{\void}
218 Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
221 \membersection{wxPageSetupDialogData::GetMinMarginBottomRight
}\label{wxpagesetupdialogdatagetminmarginbottomright
}
223 \constfunc{wxPoint
}{GetMinMarginBottomRight
}{\void}
225 Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
228 \membersection{wxPageSetupDialogData::GetPaperId
}\label{wxpagesetupdialogdatagetpaperid
}
230 \constfunc{wxPaperSize
}{GetPaperId
}{\void}
232 Returns the paper id (stored in the internal wxPrintData object).
234 For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
236 \membersection{wxPageSetupDialogData::GetPaperSize
}\label{wxpagesetupdialogdatagetpapersize
}
238 \constfunc{wxSize
}{GetPaperSize
}{\void}
240 Returns the paper size in millimetres.
242 \membersection{wxPageSetupDialogData::GetPrintData
}\label{wxpagesetupdialogdatagetprintdata
}
244 \func{wxPrintData\&
}{GetPrintData
}{\void}
246 Returns a reference to the
\helpref{print data
}{wxprintdata
} associated with this object.
248 \membersection{wxPageSetupDialogData::IsOk
}\label{wxpagesetupdialogdataisok
}
250 \constfunc{bool
}{IsOk
}{\void}
252 Returns true if the print data associated with the dialog data is valid.
253 This can return false on Windows if the current printer is not set, for example.
254 On all other platforms, it returns true.
256 \membersection{wxPageSetupDialogData::SetDefaultInfo
}\label{wxpagesetupdialogdatasetdefaultinfo
}
258 \func{void
}{SetDefaultInfo
}{\param{bool
}{ flag
}}
260 Pass true if the dialog will simply return default printer information (such as orientation)
261 instead of showing a dialog. Windows only.
263 \membersection{wxPageSetupDialogData::SetDefaultMinMargins
}\label{wxpagesetupdialogdatasetdefaultminmargins
}
265 \func{void
}{SetDefaultMinMargins
}{\param{bool
}{ flag
}}
267 Pass true if the page setup dialog will take its minimum margin values from the currently
268 selected printer properties. Windows only. Units are in millimetres
270 \membersection{wxPageSetupDialogData::SetMarginTopLeft
}\label{wxpagesetupdialogdatasetmargintopleft
}
272 \func{void
}{SetMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
274 Sets the left (x) and top (y) margins in millimetres.
276 \membersection{wxPageSetupDialogData::SetMarginBottomRight
}\label{wxpagesetupdialogdatasetmarginbottomright
}
278 \func{void
}{SetMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
280 Sets the right (x) and bottom (y) margins in millimetres.
282 \membersection{wxPageSetupDialogData::SetMinMarginTopLeft
}\label{wxpagesetupdialogdatasetminmargintopleft
}
284 \func{void
}{SetMinMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
286 Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
289 \membersection{wxPageSetupDialogData::SetMinMarginBottomRight
}\label{wxpagesetupdialogdatasetminmarginbottomright
}
291 \func{void
}{SetMinMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
293 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
296 \membersection{wxPageSetupDialogData::SetPaperId
}\label{wxpagesetupdialogdatasetpaperid
}
298 \func{void
}{SetPaperId
}{\param{wxPaperSize\&
}{id
}}
300 Sets the paper size id. For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
302 Calling this function overrides the explicit paper dimensions passed in
\helpref{wxPageSetupDialogData::SetPaperSize
}{wxpagesetupdialogdatasetpapersize
}.
304 \membersection{wxPageSetupDialogData::SetPaperSize
}\label{wxpagesetupdialogdatasetpapersize
}
306 \func{void
}{SetPaperSize
}{\param{const wxSize\&
}{size
}}
308 Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the
309 internal wxPrintData object, otherwise the paper size overrides the paper id.
311 \membersection{wxPageSetupDialogData::SetPrintData
}\label{wxpagesetupdialogdatasetprintdata
}
313 \func{void
}{SetPrintData
}{\param{const wxPrintData\&
}{ printData
}}
315 Sets the
\helpref{print data
}{wxprintdata
} associated with this object.
317 \membersection{wxPageSetupDialogData::operator $=$
}\label{wxpagesetupdialogdataassign
}
319 \func{void
}{operator $=$
}{\param{const wxPrintData\&
}{ data
}}
321 Assigns print data to this object.
323 \func{void
}{operator $=$
}{\param{const wxPageSetupDialogData\&
}{ data
}}
325 Assigns page setup data to this object.