]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxPageSetupData}}\label{wxpagesetupdata} |
2 | ||
3 | This class holds a variety of information related to \helpref{wxPageSetupDialog}{wxpagesetupdialog}. | |
4 | ||
5 | \wxheading{Derived from} | |
6 | ||
7 | \helpref{wxObject}{wxobject} | |
8 | ||
954b8ae6 JS |
9 | \wxheading{Include files} |
10 | ||
11 | <wx/cmndata.h> | |
12 | ||
a660d684 KB |
13 | \wxheading{See also} |
14 | ||
15 | \helpref{wxPageSetupDialog}{wxpagesetupdialog} | |
16 | ||
17 | \latexignore{\rtfignore{\wxheading{Members}}} | |
18 | ||
19 | \membersection{wxPageSetupData::wxPageSetupData} | |
20 | ||
21 | \func{}{wxPageSetupData}{\void} | |
22 | ||
23 | Constructor. | |
24 | ||
25 | \membersection{wxPageSetupData::\destruct{wxPageSetupData}} | |
26 | ||
27 | \func{}{\destruct{wxPageSetupData}}{\void} | |
28 | ||
29 | Destructor. | |
30 | ||
31 | \membersection{wxPageSetupData::EnableHelp}\label{wxpagesetupdataenablehelp} | |
32 | ||
33 | \func{void}{EnableHelp}{\param{bool }{flag}} | |
34 | ||
35 | Enables or disables the `Help' button (Windows only). | |
36 | ||
37 | \membersection{wxPageSetupData::EnableMargins}\label{wxpagesetupdataenablemargins} | |
38 | ||
39 | \func{void}{EnableMargins}{\param{bool }{flag}} | |
40 | ||
41 | Enables or disables the margin controls (Windows only). | |
42 | ||
43 | \membersection{wxPageSetupData::EnableOrientation}\label{wxpagesetupdataenableorientation} | |
44 | ||
45 | \func{void}{EnableOrientation}{\param{bool }{flag}} | |
46 | ||
47 | Enables or disables the orientation control (Windows only). | |
48 | ||
49 | \membersection{wxPageSetupData::EnablePaper}\label{wxpagesetupdataenablepaper} | |
50 | ||
51 | \func{void}{EnablePaper}{\param{bool }{flag}} | |
52 | ||
53 | Enables or disables the paper size control (Windows only). | |
54 | ||
55 | \membersection{wxPageSetupData::EnablePrinter}\label{wxpagesetupdataenableprinter} | |
56 | ||
57 | \func{void}{EnablePrinter}{\param{bool }{flag}} | |
58 | ||
59 | Enables or disables the {\bf Printer} button, which invokes a printer setup dialog. | |
60 | ||
61 | \membersection{wxPageSetupData::GetPaperSize}\label{wxpagesetupdatagetpapersize} | |
62 | ||
63 | \func{wxPoint}{GetPaperSize}{\void} | |
64 | ||
65 | Returns the paper size in millimetres. | |
66 | ||
67 | \membersection{wxPageSetupData::GetMarginTopLeft}\label{wxpagesetupdatagetmargintopleft} | |
68 | ||
69 | \func{wxPoint}{GetMarginTopLeft}{\void} | |
70 | ||
71 | Returns the left (x) and top (y) margins. | |
72 | ||
73 | \membersection{wxPageSetupData::GetMarginBottomRight}\label{wxpagesetupdatagetmarginbottomright} | |
74 | ||
75 | \func{wxPoint}{GetMarginBottomRight}{\void} | |
76 | ||
77 | Returns the right (x) and bottom (y) margins. | |
78 | ||
79 | \membersection{wxPageSetupData::GetMinMarginTopLeft}\label{wxpagesetupdatagetminmargintopleft} | |
80 | ||
81 | \func{wxPoint}{GetMinMarginTopLeft}{\void} | |
82 | ||
83 | Returns the left (x) and top (y) minimum margins the user can enter (Windows only). | |
84 | ||
85 | \membersection{wxPageSetupData::GetMinMarginBottomRight}\label{wxpagesetupdatagetminmarginbottomright} | |
86 | ||
87 | \func{wxPoint}{GetMinMarginBottomRight}{\void} | |
88 | ||
89 | Returns the right (x) and bottom (y) minimum margins the user can enter (Windows only). | |
90 | ||
91 | \membersection{wxPageSetupData::GetOrientation}\label{wxpagesetupdatagetorientation} | |
92 | ||
93 | \func{int}{GetOrientation}{\void} | |
94 | ||
95 | Returns the orientation, which can be wxPORTRAIT or wxLANDSCAPE. | |
96 | ||
97 | \membersection{wxPageSetupData::GetDefaultMinMargins}\label{wxpagesetupdatagetdefaultminmargins} | |
98 | ||
99 | \func{bool}{GetDefaultMinMargins}{\void} | |
100 | ||
101 | Returns TRUE if the page setup dialog will take its minimum margin values from the currently | |
102 | selected printer properties. Windows only. | |
103 | ||
104 | \membersection{wxPageSetupData::GetEnableMargins}\label{wxpagesetupdatagetenablemargins} | |
105 | ||
106 | \func{bool}{GetEnableMargins}{\void} | |
107 | ||
108 | Returns TRUE if the margin controls are enabled (Windows only). | |
109 | ||
110 | \membersection{wxPageSetupData::GetEnableOrientation}\label{wxpagesetupdatagetenableorientation} | |
111 | ||
112 | \func{bool}{GetEnableOrientation}{\void} | |
113 | ||
114 | Returns TRUE if the orientation control is enabled (Windows only). | |
115 | ||
116 | \membersection{wxPageSetupData::GetEnablePaper}\label{wxpagesetupdatagetenablepaper} | |
117 | ||
118 | \func{bool}{GetEnablePaper}{\void} | |
119 | ||
120 | Returns TRUE if the paper size control is enabled (Windows only). | |
121 | ||
122 | \membersection{wxPageSetupData::GetEnablePrinter}\label{wxpagesetupdatagetenableprinter} | |
123 | ||
124 | \func{bool}{GetEnablePrinter}{\void} | |
125 | ||
126 | Returns TRUE if the printer setup button is enabled. | |
127 | ||
128 | \membersection{wxPageSetupData::GetEnableHelp}\label{wxpagesetupdatagetenablehelp} | |
129 | ||
130 | \func{bool}{GetEnableHelp}{\void} | |
131 | ||
132 | Returns TRUE if the printer setup button is enabled. | |
133 | ||
134 | \membersection{wxPageSetupData::GetDefaultInfo}\label{wxpagesetupdatagetdefaultinfo} | |
135 | ||
136 | \func{bool}{GetDefaultInfo}{\void} | |
137 | ||
138 | Returns TRUE if the dialog will simply return default printer information (such as orientation) | |
139 | instead of showing a dialog. Windows only. | |
140 | ||
141 | \membersection{wxPageSetupData::SetPaperSize}\label{wxpagesetupdatasetpapersize} | |
142 | ||
143 | \func{void}{SetPaperSize}{\param{const wxPoint\& }{size}} | |
144 | ||
145 | Sets the paper size in millimetres. | |
146 | ||
147 | \membersection{wxPageSetupData::SetMarginTopLeft}\label{wxpagesetupdatasetmargintopleft} | |
148 | ||
149 | \func{void}{GetMarginTopLeft}{\param{const wxPoint\& }{pt}} | |
150 | ||
151 | Sets the left (x) and top (y) margins. | |
152 | ||
153 | \membersection{wxPageSetupData::SetMarginBottomRight}\label{wxpagesetupdatasetmarginbottomright} | |
154 | ||
155 | \func{void}{SetMarginBottomRight}{\param{const wxPoint\& }{pt}} | |
156 | ||
157 | Sets the right (x) and bottom (y) margins. | |
158 | ||
159 | \membersection{wxPageSetupData::SetMinMarginTopLeft}\label{wxpagesetupdatasetminmargintopleft} | |
160 | ||
161 | \func{void}{SetMinMarginTopLeft}{\param{const wxPoint\& }{pt}} | |
162 | ||
163 | Sets the left (x) and top (y) minimum margins the user can enter (Windows only). | |
164 | ||
165 | \membersection{wxPageSetupData::SetMinMarginBottomRight}\label{wxpagesetupdatasetminmarginbottomright} | |
166 | ||
167 | \func{void}{SetMinMarginBottomRight}{\param{const wxPoint\& }{pt}} | |
168 | ||
169 | Sets the right (x) and bottom (y) minimum margins the user can enter (Windows only). | |
170 | ||
171 | \membersection{wxPageSetupData::SetOrientation}\label{wxpagesetupdatasetorientation} | |
172 | ||
173 | \func{void}{SetOrientation}{\param{int }{orientation}} | |
174 | ||
175 | Sets the orientation, which can be wxPORTRAIT or wxLANDSCAPE. | |
176 | ||
177 | \membersection{wxPageSetupData::SetDefaultMinMargins}\label{wxpagesetupdatasetdefaultminmargins} | |
178 | ||
179 | \func{void}{SetDefaultMinMargins}{\param{bool}{ flag}} | |
180 | ||
181 | Pass TRUE if the page setup dialog will take its minimum margin values from the currently | |
182 | selected printer properties. Windows only. | |
183 | ||
184 | \membersection{wxPageSetupData::SetDefaultInfo}\label{wxpagesetupdatasetdefaultinfo} | |
185 | ||
186 | \func{void}{SetDefaultInfo}{\param{bool}{ flag}} | |
187 | ||
188 | Pass TRUE if the dialog will simply return default printer information (such as orientation) | |
189 | instead of showing a dialog. Windows only. | |
190 | ||
191 | \section{\class{wxPageSetupDialog}}\label{wxpagesetupdialog} | |
192 | ||
193 | This class represents the page setup common dialog. The page setup dialog is standard from | |
194 | Windows 95 on, replacing the print setup dialog (which is retained in Windows and wxWindows | |
195 | for backward compatibility). On Windows 95 and NT 4.0 and above, the page setup dialog is | |
196 | native to the windowing system, otherwise it is emulated. | |
197 | ||
198 | The page setup dialog contains controls for paper size (A4, A5 etc.), orientation (landscape | |
199 | or portrait), and controls for setting left, top, right and bottom margin sizes in millimetres. | |
200 | The page setup dialog does not set any global information (the exception being orientation | |
201 | for PostScript printing) so you need to query the \helpref{wxPageSetupData}{wxpagesetupdata} object | |
202 | associated with the dialog. | |
203 | ||
204 | Note that the OK and Cancel buttons do not destroy the dialog; this must be done by the | |
205 | application. | |
206 | ||
207 | \wxheading{Derived from} | |
208 | ||
209 | \helpref{wxDialog}{wxdialog}\\ | |
210 | \helpref{wxWindow}{wxwindow}\\ | |
211 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
212 | \helpref{wxObject}{wxobject} | |
213 | ||
954b8ae6 JS |
214 | \wxheading{Include files} |
215 | ||
216 | <wx/printdlg.h> | |
217 | ||
a660d684 KB |
218 | \wxheading{See also} |
219 | ||
220 | \helpref{wxPrintDialog}{wxprintdialog}, \helpref{wxPageSetupData}{wxpagesetupdata} | |
221 | ||
222 | \latexignore{\rtfignore{\wxheading{Members}}} | |
223 | ||
224 | \membersection{wxPageSetupDialog::wxPageSetupDialog} | |
225 | ||
226 | \func{}{wxPageSetupDialog}{\param{wxWindow* }{parent}, \param{wxPageSetupData* }{data = NULL}} | |
227 | ||
228 | Constructor. Pass a parent window, and optionally a pointer to a block of page setup | |
229 | data, which will be copied to the print dialog's internal data. | |
230 | ||
231 | \membersection{wxPageSetupDialog::\destruct{wxPageSetupDialog}} | |
232 | ||
233 | \func{}{\destruct{wxPageSetupDialog}}{\void} | |
234 | ||
235 | Destructor. | |
236 | ||
237 | \membersection{wxPageSetupDialog::GetPageSetupData}\label{wxpagesetupdialoggetpagesetupdata} | |
238 | ||
239 | \func{wxPageSetupData\&}{GetPageSetupData}{\void} | |
240 | ||
241 | Returns the \helpref{page setup data}{wxpagesetupdata} associated with the dialog. | |
242 | ||
243 | \membersection{wxPageSetupDialog::ShowModal}\label{wxpagesetupdialogshowmodal} | |
244 | ||
245 | \func{int}{ShowModal}{\void} | |
246 | ||
247 | Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL | |
248 | otherwise. | |
249 | ||
250 |