| 1 | \section{\class{wxPageSetupDialogData}}\label{wxpagesetupdialogdata} |
| 2 | |
| 3 | This class holds a variety of information related to \helpref{wxPageSetupDialog}{wxpagesetupdialog}. |
| 4 | |
| 5 | It contains a \helpref{wxPrintData}{wxprintdata} member which is used to hold basic printer configuration data (as opposed to the |
| 6 | user-interface configuration settings stored by wxPageSetupDialogData). |
| 7 | |
| 8 | \wxheading{Derived from} |
| 9 | |
| 10 | \helpref{wxObject}{wxobject} |
| 11 | |
| 12 | \wxheading{Include files} |
| 13 | |
| 14 | <wx/cmndata.h> |
| 15 | |
| 16 | \wxheading{See also} |
| 17 | |
| 18 | \helpref{wxPageSetupDialog}{wxpagesetupdialog} |
| 19 | |
| 20 | \latexignore{\rtfignore{\wxheading{Members}}} |
| 21 | |
| 22 | \membersection{wxPageSetupDialogData::wxPageSetupDialogData} |
| 23 | |
| 24 | \func{}{wxPageSetupDialogData}{\void} |
| 25 | |
| 26 | Default constructor. |
| 27 | |
| 28 | \func{}{wxPageSetupDialogData}{\param{wxPageSetupDialogData\&}{ data}} |
| 29 | |
| 30 | Copy constructor. |
| 31 | |
| 32 | \func{}{wxPrintDialogData}{\param{wxPrintData\&}{ printData}} |
| 33 | |
| 34 | Construct an object from a print dialog data object. |
| 35 | |
| 36 | \membersection{wxPageSetupDialogData::\destruct{wxPageSetupDialogData}} |
| 37 | |
| 38 | \func{}{\destruct{wxPageSetupDialogData}}{\void} |
| 39 | |
| 40 | Destructor. |
| 41 | |
| 42 | \membersection{wxPageSetupDialogData::EnableHelp}\label{wxpagesetupdialogdataenablehelp} |
| 43 | |
| 44 | \func{void}{EnableHelp}{\param{bool }{flag}} |
| 45 | |
| 46 | Enables or disables the `Help' button (Windows only). |
| 47 | |
| 48 | \membersection{wxPageSetupDialogData::EnableMargins}\label{wxpagesetupdialogdataenablemargins} |
| 49 | |
| 50 | \func{void}{EnableMargins}{\param{bool }{flag}} |
| 51 | |
| 52 | Enables or disables the margin controls (Windows only). |
| 53 | |
| 54 | \membersection{wxPageSetupDialogData::EnableOrientation}\label{wxpagesetupdialogdataenableorientation} |
| 55 | |
| 56 | \func{void}{EnableOrientation}{\param{bool }{flag}} |
| 57 | |
| 58 | Enables or disables the orientation control (Windows only). |
| 59 | |
| 60 | \membersection{wxPageSetupDialogData::EnablePaper}\label{wxpagesetupdialogdataenablepaper} |
| 61 | |
| 62 | \func{void}{EnablePaper}{\param{bool }{flag}} |
| 63 | |
| 64 | Enables or disables the paper size control (Windows only). |
| 65 | |
| 66 | \membersection{wxPageSetupDialogData::EnablePrinter}\label{wxpagesetupdialogdataenableprinter} |
| 67 | |
| 68 | \func{void}{EnablePrinter}{\param{bool }{flag}} |
| 69 | |
| 70 | Enables or disables the {\bf Printer} button, which invokes a printer setup dialog. |
| 71 | |
| 72 | \membersection{wxPageSetupDialogData::GetDefaultMinMargins}\label{wxpagesetupdialogdatagetdefaultminmargins} |
| 73 | |
| 74 | \constfunc{bool}{GetDefaultMinMargins}{\void} |
| 75 | |
| 76 | Returns TRUE if the page setup dialog will take its minimum margin values from the currently |
| 77 | selected printer properties. Windows only. |
| 78 | |
| 79 | \membersection{wxPageSetupDialogData::GetEnableMargins}\label{wxpagesetupdialogdatagetenablemargins} |
| 80 | |
| 81 | \constfunc{bool}{GetEnableMargins}{\void} |
| 82 | |
| 83 | Returns TRUE if the margin controls are enabled (Windows only). |
| 84 | |
| 85 | \membersection{wxPageSetupDialogData::GetEnableOrientation}\label{wxpagesetupdialogdatagetenableorientation} |
| 86 | |
| 87 | \constfunc{bool}{GetEnableOrientation}{\void} |
| 88 | |
| 89 | Returns TRUE if the orientation control is enabled (Windows only). |
| 90 | |
| 91 | \membersection{wxPageSetupDialogData::GetEnablePaper}\label{wxpagesetupdialogdatagetenablepaper} |
| 92 | |
| 93 | \constfunc{bool}{GetEnablePaper}{\void} |
| 94 | |
| 95 | Returns TRUE if the paper size control is enabled (Windows only). |
| 96 | |
| 97 | \membersection{wxPageSetupDialogData::GetEnablePrinter}\label{wxpagesetupdialogdatagetenableprinter} |
| 98 | |
| 99 | \constfunc{bool}{GetEnablePrinter}{\void} |
| 100 | |
| 101 | Returns TRUE if the printer setup button is enabled. |
| 102 | |
| 103 | \membersection{wxPageSetupDialogData::GetEnableHelp}\label{wxpagesetupdialogdatagetenablehelp} |
| 104 | |
| 105 | \constfunc{bool}{GetEnableHelp}{\void} |
| 106 | |
| 107 | Returns TRUE if the printer setup button is enabled. |
| 108 | |
| 109 | \membersection{wxPageSetupDialogData::GetDefaultInfo}\label{wxpagesetupdialogdatagetdefaultinfo} |
| 110 | |
| 111 | \constfunc{bool}{GetDefaultInfo}{\void} |
| 112 | |
| 113 | Returns TRUE if the dialog will simply return default printer information (such as orientation) |
| 114 | instead of showing a dialog. Windows only. |
| 115 | |
| 116 | \membersection{wxPageSetupDialogData::GetMarginTopLeft}\label{wxpagesetupdialogdatagetmargintopleft} |
| 117 | |
| 118 | \constfunc{wxPoint}{GetMarginTopLeft}{\void} |
| 119 | |
| 120 | Returns the left (x) and top (y) margins. |
| 121 | |
| 122 | \membersection{wxPageSetupDialogData::GetMarginBottomRight}\label{wxpagesetupdialogdatagetmarginbottomright} |
| 123 | |
| 124 | \constfunc{wxPoint}{GetMarginBottomRight}{\void} |
| 125 | |
| 126 | Returns the right (x) and bottom (y) margins. |
| 127 | |
| 128 | \membersection{wxPageSetupDialogData::GetMinMarginTopLeft}\label{wxpagesetupdialogdatagetminmargintopleft} |
| 129 | |
| 130 | \constfunc{wxPoint}{GetMinMarginTopLeft}{\void} |
| 131 | |
| 132 | Returns the left (x) and top (y) minimum margins the user can enter (Windows only). |
| 133 | |
| 134 | \membersection{wxPageSetupDialogData::GetMinMarginBottomRight}\label{wxpagesetupdialogdatagetminmarginbottomright} |
| 135 | |
| 136 | \constfunc{wxPoint}{GetMinMarginBottomRight}{\void} |
| 137 | |
| 138 | Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). |
| 139 | |
| 140 | \membersection{wxPageSetupDialogData::GetPaperId}\label{wxpagesetupdialogdatagetpaperid} |
| 141 | |
| 142 | \constfunc{wxPaperSize}{GetPaperId}{\void} |
| 143 | |
| 144 | Returns the paper id (stored in the internal wxPrintData object). |
| 145 | |
| 146 | For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}. |
| 147 | |
| 148 | \membersection{wxPageSetupDialogData::GetPaperSize}\label{wxpagesetupdialogdatagetpapersize} |
| 149 | |
| 150 | \constfunc{wxSize}{GetPaperSize}{\void} |
| 151 | |
| 152 | Returns the paper size in millimetres. |
| 153 | |
| 154 | \membersection{wxPageSetupDialogData::GetPrintData}\label{wxpagesetupdialogdatagetprintdata} |
| 155 | |
| 156 | \func{wxPrintData\&}{GetPrintData}{\void} |
| 157 | |
| 158 | Returns a reference to the \helpref{print data}{wxprintdata} associated with this object. |
| 159 | |
| 160 | \membersection{wxPageSetupDialogData::SetDefaultInfo}\label{wxpagesetupdialogdatasetdefaultinfo} |
| 161 | |
| 162 | \func{void}{SetDefaultInfo}{\param{bool}{ flag}} |
| 163 | |
| 164 | Pass TRUE if the dialog will simply return default printer information (such as orientation) |
| 165 | instead of showing a dialog. Windows only. |
| 166 | |
| 167 | \membersection{wxPageSetupDialogData::SetDefaultMinMargins}\label{wxpagesetupdialogdatasetdefaultminmargins} |
| 168 | |
| 169 | \func{void}{SetDefaultMinMargins}{\param{bool}{ flag}} |
| 170 | |
| 171 | Pass TRUE if the page setup dialog will take its minimum margin values from the currently |
| 172 | selected printer properties. Windows only. |
| 173 | |
| 174 | \membersection{wxPageSetupDialogData::SetMarginTopLeft}\label{wxpagesetupdialogdatasetmargintopleft} |
| 175 | |
| 176 | \func{void}{GetMarginTopLeft}{\param{const wxPoint\& }{pt}} |
| 177 | |
| 178 | Sets the left (x) and top (y) margins. |
| 179 | |
| 180 | \membersection{wxPageSetupDialogData::SetMarginBottomRight}\label{wxpagesetupdialogdatasetmarginbottomright} |
| 181 | |
| 182 | \func{void}{SetMarginBottomRight}{\param{const wxPoint\& }{pt}} |
| 183 | |
| 184 | Sets the right (x) and bottom (y) margins. |
| 185 | |
| 186 | \membersection{wxPageSetupDialogData::SetMinMarginTopLeft}\label{wxpagesetupdialogdatasetminmargintopleft} |
| 187 | |
| 188 | \func{void}{SetMinMarginTopLeft}{\param{const wxPoint\& }{pt}} |
| 189 | |
| 190 | Sets the left (x) and top (y) minimum margins the user can enter (Windows only). |
| 191 | |
| 192 | \membersection{wxPageSetupDialogData::SetMinMarginBottomRight}\label{wxpagesetupdialogdatasetminmarginbottomright} |
| 193 | |
| 194 | \func{void}{SetMinMarginBottomRight}{\param{const wxPoint\& }{pt}} |
| 195 | |
| 196 | Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). |
| 197 | |
| 198 | \membersection{wxPageSetupDialogData::SetPaperId}\label{wxpagesetupdialogdatasetpaperid} |
| 199 | |
| 200 | \func{void}{SetPaperId}{\param{wxPaperSize\& }{id}} |
| 201 | |
| 202 | Sets the paper size id. For further information, see \helpref{wxPrintData::SetPaperId}{wxprintdatasetpaperid}. |
| 203 | |
| 204 | Calling this function overrides the explicit paper dimensions passed in \helpref{wxPageSetupDialogData::SetPaperSize}{wxpagesetupdialogdatasetpapersize}. |
| 205 | |
| 206 | \membersection{wxPageSetupDialogData::SetPaperSize}\label{wxpagesetupdialogdatasetpapersize} |
| 207 | |
| 208 | \func{void}{SetPaperSize}{\param{const wxSize\& }{size}} |
| 209 | |
| 210 | Sets the paper size in millimetres. If a corresponding paper id is found, it will be set in the |
| 211 | internal wxPrintData object, otherwise the paper size overrides the paper id. |
| 212 | |
| 213 | \membersection{wxPageSetupDialogData::SetPrintData}\label{wxpagesetupdialogdatasetprintdata} |
| 214 | |
| 215 | \func{void}{SetPrintData}{\param{const wxPrintData\&}{ printData}} |
| 216 | |
| 217 | Sets the \helpref{print data}{wxprintdata} associated with this object. |
| 218 | |
| 219 | \membersection{wxPageSetupDialogData::operator $=$}\label{wxpagesetupdialogdataassign} |
| 220 | |
| 221 | \func{void}{operator $=$}{\param{const wxPrintData\&}{ data}} |
| 222 | |
| 223 | Assigns print data to this object. |
| 224 | |
| 225 | \func{void}{operator $=$}{\param{const wxPageSetupDialogData\&}{ data}} |
| 226 | |
| 227 | Assigns page setup data to this object. |
| 228 | |
| 229 | \section{\class{wxPageSetupDialog}}\label{wxpagesetupdialog} |
| 230 | |
| 231 | This class represents the page setup common dialog. The page setup dialog is standard from |
| 232 | Windows 95 on, replacing the print setup dialog (which is retained in Windows and wxWindows |
| 233 | for backward compatibility). On Windows 95 and NT 4.0 and above, the page setup dialog is |
| 234 | native to the windowing system, otherwise it is emulated. |
| 235 | |
| 236 | The page setup dialog contains controls for paper size (A4, A5 etc.), orientation (landscape |
| 237 | or portrait), and controls for setting left, top, right and bottom margin sizes in millimetres. |
| 238 | |
| 239 | When the dialog has been closed, you need to query the \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} object |
| 240 | associated with the dialog. |
| 241 | |
| 242 | Note that the OK and Cancel buttons do not destroy the dialog; this must be done by the |
| 243 | application. |
| 244 | |
| 245 | \wxheading{Derived from} |
| 246 | |
| 247 | \helpref{wxDialog}{wxdialog}\\ |
| 248 | \helpref{wxWindow}{wxwindow}\\ |
| 249 | \helpref{wxEvtHandler}{wxevthandler}\\ |
| 250 | \helpref{wxObject}{wxobject} |
| 251 | |
| 252 | \wxheading{Include files} |
| 253 | |
| 254 | <wx/printdlg.h> |
| 255 | |
| 256 | \wxheading{See also} |
| 257 | |
| 258 | \helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} |
| 259 | |
| 260 | \latexignore{\rtfignore{\wxheading{Members}}} |
| 261 | |
| 262 | \membersection{wxPageSetupDialog::wxPageSetupDialog} |
| 263 | |
| 264 | \func{}{wxPageSetupDialog}{\param{wxWindow* }{parent}, \param{wxPageSetupDialogData* }{data = NULL}} |
| 265 | |
| 266 | Constructor. Pass a parent window, and optionally a pointer to a block of page setup |
| 267 | data, which will be copied to the print dialog's internal data. |
| 268 | |
| 269 | \membersection{wxPageSetupDialog::\destruct{wxPageSetupDialog}} |
| 270 | |
| 271 | \func{}{\destruct{wxPageSetupDialog}}{\void} |
| 272 | |
| 273 | Destructor. |
| 274 | |
| 275 | \membersection{wxPageSetupDialog::GetPageSetupData}\label{wxpagesetupdialoggetpagesetupdata} |
| 276 | |
| 277 | \func{wxPageSetupDialogData\&}{GetPageSetupData}{\void} |
| 278 | |
| 279 | Returns the \helpref{page setup data}{wxpagesetupdialogdata} associated with the dialog. |
| 280 | |
| 281 | \membersection{wxPageSetupDialog::ShowModal}\label{wxpagesetupdialogshowmodal} |
| 282 | |
| 283 | \func{int}{ShowModal}{\void} |
| 284 | |
| 285 | Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL |
| 286 | otherwise. |
| 287 | |
| 288 | |