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::ShowModal
}\label{wxpagesetupdialogshowmodal
}
55 \func{int
}{ShowModal
}{\void}
57 Shows the dialog, returning wxID
\_OK if the user pressed OK, and wxID
\_CANCEL
60 \section{\class{wxPageSetupDialogData
}}\label{wxpagesetupdialogdata
}
62 This class holds a variety of information related to
\helpref{wxPageSetupDialog
}{wxpagesetupdialog
}.
64 It contains a
\helpref{wxPrintData
}{wxprintdata
} member which is used to hold basic printer configuration data (as opposed to the
65 user-interface configuration settings stored by wxPageSetupDialogData).
67 \wxheading{Derived from
}
69 \helpref{wxObject
}{wxobject
}
71 \wxheading{Include files
}
77 \helpref{wxPageSetupDialog
}{wxpagesetupdialog
}
79 \latexignore{\rtfignore{\wxheading{Members
}}}
81 \membersection{wxPageSetupDialogData::wxPageSetupDialogData
}
83 \func{}{wxPageSetupDialogData
}{\void}
87 \func{}{wxPageSetupDialogData
}{\param{wxPageSetupDialogData\&
}{ data
}}
91 \func{}{wxPrintDialogData
}{\param{wxPrintData\&
}{ printData
}}
93 Construct an object from a print dialog data object.
95 \membersection{wxPageSetupDialogData::
\destruct{wxPageSetupDialogData
}}
97 \func{}{\destruct{wxPageSetupDialogData
}}{\void}
101 \membersection{wxPageSetupDialogData::EnableHelp
}\label{wxpagesetupdialogdataenablehelp
}
103 \func{void
}{EnableHelp
}{\param{bool
}{flag
}}
105 Enables or disables the `Help' button (Windows only).
107 \membersection{wxPageSetupDialogData::EnableMargins
}\label{wxpagesetupdialogdataenablemargins
}
109 \func{void
}{EnableMargins
}{\param{bool
}{flag
}}
111 Enables or disables the margin controls (Windows only).
113 \membersection{wxPageSetupDialogData::EnableOrientation
}\label{wxpagesetupdialogdataenableorientation
}
115 \func{void
}{EnableOrientation
}{\param{bool
}{flag
}}
117 Enables or disables the orientation control (Windows only).
119 \membersection{wxPageSetupDialogData::EnablePaper
}\label{wxpagesetupdialogdataenablepaper
}
121 \func{void
}{EnablePaper
}{\param{bool
}{flag
}}
123 Enables or disables the paper size control (Windows only).
125 \membersection{wxPageSetupDialogData::EnablePrinter
}\label{wxpagesetupdialogdataenableprinter
}
127 \func{void
}{EnablePrinter
}{\param{bool
}{flag
}}
129 Enables or disables the
{\bf Printer
} button, which invokes a printer setup dialog.
131 \membersection{wxPageSetupDialogData::GetDefaultMinMargins
}\label{wxpagesetupdialogdatagetdefaultminmargins
}
133 \constfunc{bool
}{GetDefaultMinMargins
}{\void}
135 Returns TRUE if the page setup dialog will take its minimum margin values from the currently
136 selected printer properties. Windows only.
138 \membersection{wxPageSetupDialogData::GetEnableMargins
}\label{wxpagesetupdialogdatagetenablemargins
}
140 \constfunc{bool
}{GetEnableMargins
}{\void}
142 Returns TRUE if the margin controls are enabled (Windows only).
144 \membersection{wxPageSetupDialogData::GetEnableOrientation
}\label{wxpagesetupdialogdatagetenableorientation
}
146 \constfunc{bool
}{GetEnableOrientation
}{\void}
148 Returns TRUE if the orientation control is enabled (Windows only).
150 \membersection{wxPageSetupDialogData::GetEnablePaper
}\label{wxpagesetupdialogdatagetenablepaper
}
152 \constfunc{bool
}{GetEnablePaper
}{\void}
154 Returns TRUE if the paper size control is enabled (Windows only).
156 \membersection{wxPageSetupDialogData::GetEnablePrinter
}\label{wxpagesetupdialogdatagetenableprinter
}
158 \constfunc{bool
}{GetEnablePrinter
}{\void}
160 Returns TRUE if the printer setup button is enabled.
162 \membersection{wxPageSetupDialogData::GetEnableHelp
}\label{wxpagesetupdialogdatagetenablehelp
}
164 \constfunc{bool
}{GetEnableHelp
}{\void}
166 Returns TRUE if the printer setup button is enabled.
168 \membersection{wxPageSetupDialogData::GetDefaultInfo
}\label{wxpagesetupdialogdatagetdefaultinfo
}
170 \constfunc{bool
}{GetDefaultInfo
}{\void}
172 Returns TRUE if the dialog will simply return default printer information (such as orientation)
173 instead of showing a dialog. Windows only.
175 \membersection{wxPageSetupDialogData::GetMarginTopLeft
}\label{wxpagesetupdialogdatagetmargintopleft
}
177 \constfunc{wxPoint
}{GetMarginTopLeft
}{\void}
179 Returns the left (x) and top (y) margins in millimetres.
181 \membersection{wxPageSetupDialogData::GetMarginBottomRight
}\label{wxpagesetupdialogdatagetmarginbottomright
}
183 \constfunc{wxPoint
}{GetMarginBottomRight
}{\void}
185 Returns the right (x) and bottom (y) margins in millimetres.
187 \membersection{wxPageSetupDialogData::GetMinMarginTopLeft
}\label{wxpagesetupdialogdatagetminmargintopleft
}
189 \constfunc{wxPoint
}{GetMinMarginTopLeft
}{\void}
191 Returns the left (x) and top (y) minimum margins the user can enter (Windows only). Units
194 \membersection{wxPageSetupDialogData::GetMinMarginBottomRight
}\label{wxpagesetupdialogdatagetminmarginbottomright
}
196 \constfunc{wxPoint
}{GetMinMarginBottomRight
}{\void}
198 Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units
201 \membersection{wxPageSetupDialogData::GetPaperId
}\label{wxpagesetupdialogdatagetpaperid
}
203 \constfunc{wxPaperSize
}{GetPaperId
}{\void}
205 Returns the paper id (stored in the internal wxPrintData object).
207 For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
209 \membersection{wxPageSetupDialogData::GetPaperSize
}\label{wxpagesetupdialogdatagetpapersize
}
211 \constfunc{wxSize
}{GetPaperSize
}{\void}
213 Returns the paper size in millimetres.
215 \membersection{wxPageSetupDialogData::GetPrintData
}\label{wxpagesetupdialogdatagetprintdata
}
217 \func{wxPrintData\&
}{GetPrintData
}{\void}
219 Returns a reference to the
\helpref{print data
}{wxprintdata
} associated with this object.
221 \membersection{wxPageSetupDialogData::SetDefaultInfo
}\label{wxpagesetupdialogdatasetdefaultinfo
}
223 \func{void
}{SetDefaultInfo
}{\param{bool
}{ flag
}}
225 Pass TRUE if the dialog will simply return default printer information (such as orientation)
226 instead of showing a dialog. Windows only.
228 \membersection{wxPageSetupDialogData::SetDefaultMinMargins
}\label{wxpagesetupdialogdatasetdefaultminmargins
}
230 \func{void
}{SetDefaultMinMargins
}{\param{bool
}{ flag
}}
232 Pass TRUE if the page setup dialog will take its minimum margin values from the currently
233 selected printer properties. Windows only. Units are in millimetres
235 \membersection{wxPageSetupDialogData::SetMarginTopLeft
}\label{wxpagesetupdialogdatasetmargintopleft
}
237 \func{void
}{GetMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
239 Sets the left (x) and top (y) margins in millimetres.
241 \membersection{wxPageSetupDialogData::SetMarginBottomRight
}\label{wxpagesetupdialogdatasetmarginbottomright
}
243 \func{void
}{SetMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
245 Sets the right (x) and bottom (y) margins in millimetres.
247 \membersection{wxPageSetupDialogData::SetMinMarginTopLeft
}\label{wxpagesetupdialogdatasetminmargintopleft
}
249 \func{void
}{SetMinMarginTopLeft
}{\param{const wxPoint\&
}{pt
}}
251 Sets the left (x) and top (y) minimum margins the user can enter (Windows only). Units are
254 \membersection{wxPageSetupDialogData::SetMinMarginBottomRight
}\label{wxpagesetupdialogdatasetminmarginbottomright
}
256 \func{void
}{SetMinMarginBottomRight
}{\param{const wxPoint\&
}{pt
}}
258 Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). Units are
261 \membersection{wxPageSetupDialogData::SetPaperId
}\label{wxpagesetupdialogdatasetpaperid
}
263 \func{void
}{SetPaperId
}{\param{wxPaperSize\&
}{id
}}
265 Sets the paper size id. For further information, see
\helpref{wxPrintData::SetPaperId
}{wxprintdatasetpaperid
}.
267 Calling this function overrides the explicit paper dimensions passed in
\helpref{wxPageSetupDialogData::SetPaperSize
}{wxpagesetupdialogdatasetpapersize
}.
269 \membersection{wxPageSetupDialogData::SetPaperSize
}\label{wxpagesetupdialogdatasetpapersize
}
271 \func{void
}{SetPaperSize
}{\param{const wxSize\&
}{size
}}
273 Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the
274 internal wxPrintData object, otherwise the paper size overrides the paper id.
276 \membersection{wxPageSetupDialogData::SetPrintData
}\label{wxpagesetupdialogdatasetprintdata
}
278 \func{void
}{SetPrintData
}{\param{const wxPrintData\&
}{ printData
}}
280 Sets the
\helpref{print data
}{wxprintdata
} associated with this object.
282 \membersection{wxPageSetupDialogData::operator $=$
}\label{wxpagesetupdialogdataassign
}
284 \func{void
}{operator $=$
}{\param{const wxPrintData\&
}{ data
}}
286 Assigns print data to this object.
288 \func{void
}{operator $=$
}{\param{const wxPageSetupDialogData\&
}{ data
}}
290 Assigns page setup data to this object.