]> git.saurik.com Git - wxWidgets.git/blob - interface/defs.h
check tables width parameter for invalid values
[wxWidgets.git] / interface / defs.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: defs.h
3 // Purpose: interface of global functions
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 Paper size types for use with the printing framework.
11
12 @see overview_printing, wxPrintData::SetPaperId()
13 */
14 enum wxPaperSize
15 {
16 wxPAPER_NONE, ///< Use specific dimensions
17 wxPAPER_LETTER, ///< Letter, 8 1/2 by 11 inches
18 wxPAPER_LEGAL, ///< Legal, 8 1/2 by 14 inches
19 wxPAPER_A4, ///< A4 Sheet, 210 by 297 millimeters
20 wxPAPER_CSHEET, ///< C Sheet, 17 by 22 inches
21 wxPAPER_DSHEET, ///< D Sheet, 22 by 34 inches
22 wxPAPER_ESHEET, ///< E Sheet, 34 by 44 inches
23 wxPAPER_LETTERSMALL, ///< Letter Small, 8 1/2 by 11 inches
24 wxPAPER_TABLOID, ///< Tabloid, 11 by 17 inches
25 wxPAPER_LEDGER, ///< Ledger, 17 by 11 inches
26 wxPAPER_STATEMENT, ///< Statement, 5 1/2 by 8 1/2 inches
27 wxPAPER_EXECUTIVE, ///< Executive, 7 1/4 by 10 1/2 inches
28 wxPAPER_A3, ///< A3 sheet, 297 by 420 millimeters
29 wxPAPER_A4SMALL, ///< A4 small sheet, 210 by 297 millimeters
30 wxPAPER_A5, ///< A5 sheet, 148 by 210 millimeters
31 wxPAPER_B4, ///< B4 sheet, 250 by 354 millimeters
32 wxPAPER_B5, ///< B5 sheet, 182-by-257-millimeter paper
33 wxPAPER_FOLIO, ///< Folio, 8-1/2-by-13-inch paper
34 wxPAPER_QUARTO, ///< Quarto, 215-by-275-millimeter paper
35 wxPAPER_10X14, ///< 10-by-14-inch sheet
36 wxPAPER_11X17, ///< 11-by-17-inch sheet
37 wxPAPER_NOTE, ///< Note, 8 1/2 by 11 inches
38 wxPAPER_ENV_9, ///< #9 Envelope, 3 7/8 by 8 7/8 inches
39 wxPAPER_ENV_10, ///< #10 Envelope, 4 1/8 by 9 1/2 inches
40 wxPAPER_ENV_11, ///< #11 Envelope, 4 1/2 by 10 3/8 inches
41 wxPAPER_ENV_12, ///< #12 Envelope, 4 3/4 by 11 inches
42 wxPAPER_ENV_14, ///< #14 Envelope, 5 by 11 1/2 inches
43 wxPAPER_ENV_DL, ///< DL Envelope, 110 by 220 millimeters
44 wxPAPER_ENV_C5, ///< C5 Envelope, 162 by 229 millimeters
45 wxPAPER_ENV_C3, ///< C3 Envelope, 324 by 458 millimeters
46 wxPAPER_ENV_C4, ///< C4 Envelope, 229 by 324 millimeters
47 wxPAPER_ENV_C6, ///< C6 Envelope, 114 by 162 millimeters
48 wxPAPER_ENV_C65, ///< C65 Envelope, 114 by 229 millimeters
49 wxPAPER_ENV_B4, ///< B4 Envelope, 250 by 353 millimeters
50 wxPAPER_ENV_B5, ///< B5 Envelope, 176 by 250 millimeters
51 wxPAPER_ENV_B6, ///< B6 Envelope, 176 by 125 millimeters
52 wxPAPER_ENV_ITALY, ///< Italy Envelope, 110 by 230 millimeters
53 wxPAPER_ENV_MONARCH, ///< Monarch Envelope, 3 7/8 by 7 1/2 inches
54 wxPAPER_ENV_PERSONAL, ///< 6 3/4 Envelope, 3 5/8 by 6 1/2 inches
55 wxPAPER_FANFOLD_US, ///< US Std Fanfold, 14 7/8 by 11 inches
56 wxPAPER_FANFOLD_STD_GERMAN, ///< German Std Fanfold, 8 1/2 by 12 inches
57 wxPAPER_FANFOLD_LGL_GERMAN, ///< German Legal Fanfold, 8 1/2 by 13 inches
58
59 // Windows 95 Only
60
61 wxPAPER_ISO_B4, ///< B4 (ISO) 250 x 353 mm
62 wxPAPER_JAPANESE_POSTCARD, ///< Japanese Postcard 100 x 148 mm
63 wxPAPER_9X11, ///< 9 x 11 in
64 wxPAPER_10X11, ///< 10 x 11 in
65 wxPAPER_15X11, ///< 15 x 11 in
66 wxPAPER_ENV_INVITE, ///< Envelope Invite 220 x 220 mm
67 wxPAPER_LETTER_EXTRA, ///< Letter Extra 9 \275 x 12 in
68 wxPAPER_LEGAL_EXTRA, ///< Legal Extra 9 \275 x 15 in
69 wxPAPER_TABLOID_EXTRA, ///< Tabloid Extra 11.69 x 18 in
70 wxPAPER_A4_EXTRA, ///< A4 Extra 9.27 x 12.69 in
71 wxPAPER_LETTER_TRANSVERSE, ///< Letter Transverse 8 \275 x 11 in
72 wxPAPER_A4_TRANSVERSE, ///< A4 Transverse 210 x 297 mm
73 wxPAPER_LETTER_EXTRA_TRANSVERSE, ///< Letter Extra Transverse 9\275 x 12 in
74 wxPAPER_A_PLUS, ///< SuperA/SuperA/A4 227 x 356 mm
75 wxPAPER_B_PLUS, ///< SuperB/SuperB/A3 305 x 487 mm
76 wxPAPER_LETTER_PLUS, ///< Letter Plus 8.5 x 12.69 in
77 wxPAPER_A4_PLUS, ///< A4 Plus 210 x 330 mm
78 wxPAPER_A5_TRANSVERSE, ///< A5 Transverse 148 x 210 mm
79 wxPAPER_B5_TRANSVERSE, ///< B5 (JIS) Transverse 182 x 257 mm
80 wxPAPER_A3_EXTRA, ///< A3 Extra 322 x 445 mm
81 wxPAPER_A5_EXTRA, ///< A5 Extra 174 x 235 mm
82 wxPAPER_B5_EXTRA, ///< B5 (ISO) Extra 201 x 276 mm
83 wxPAPER_A2, ///< A2 420 x 594 mm
84 wxPAPER_A3_TRANSVERSE, ///< A3 Transverse 297 x 420 mm
85 wxPAPER_A3_EXTRA_TRANSVERSE, ///< A3 Extra Transverse 322 x 445 mm
86
87 wxPAPER_DBL_JAPANESE_POSTCARD, ///< Japanese Double Postcard 200 x 148 mm
88 wxPAPER_A6, ///< A6 105 x 148 mm
89 wxPAPER_JENV_KAKU2, ///< Japanese Envelope Kaku #2
90 wxPAPER_JENV_KAKU3, ///< Japanese Envelope Kaku #3
91 wxPAPER_JENV_CHOU3, ///< Japanese Envelope Chou #3
92 wxPAPER_JENV_CHOU4, ///< Japanese Envelope Chou #4
93 wxPAPER_LETTER_ROTATED, ///< Letter Rotated 11 x 8 1/2 in
94 wxPAPER_A3_ROTATED, ///< A3 Rotated 420 x 297 mm
95 wxPAPER_A4_ROTATED, ///< A4 Rotated 297 x 210 mm
96 wxPAPER_A5_ROTATED, ///< A5 Rotated 210 x 148 mm
97 wxPAPER_B4_JIS_ROTATED, ///< B4 (JIS) Rotated 364 x 257 mm
98 wxPAPER_B5_JIS_ROTATED, ///< B5 (JIS) Rotated 257 x 182 mm
99 wxPAPER_JAPANESE_POSTCARD_ROTATED, ///< Japanese Postcard Rotated 148 x 100 mm
100 wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED, ///< Double Japanese Postcard Rotated 148 x 200 mm
101 wxPAPER_A6_ROTATED, ///< A6 Rotated 148 x 105 mm
102 wxPAPER_JENV_KAKU2_ROTATED, ///< Japanese Envelope Kaku #2 Rotated
103 wxPAPER_JENV_KAKU3_ROTATED, ///< Japanese Envelope Kaku #3 Rotated
104 wxPAPER_JENV_CHOU3_ROTATED, ///< Japanese Envelope Chou #3 Rotated
105 wxPAPER_JENV_CHOU4_ROTATED, ///< Japanese Envelope Chou #4 Rotated
106 wxPAPER_B6_JIS, ///< B6 (JIS) 128 x 182 mm
107 wxPAPER_B6_JIS_ROTATED, ///< B6 (JIS) Rotated 182 x 128 mm
108 wxPAPER_12X11, ///< 12 x 11 in
109 wxPAPER_JENV_YOU4, ///< Japanese Envelope You #4
110 wxPAPER_JENV_YOU4_ROTATED, ///< Japanese Envelope You #4 Rotated
111 wxPAPER_P16K, ///< PRC 16K 146 x 215 mm
112 wxPAPER_P32K, ///< PRC 32K 97 x 151 mm
113 wxPAPER_P32KBIG, ///< PRC 32K(Big) 97 x 151 mm
114 wxPAPER_PENV_1, ///< PRC Envelope #1 102 x 165 mm
115 wxPAPER_PENV_2, ///< PRC Envelope #2 102 x 176 mm
116 wxPAPER_PENV_3, ///< PRC Envelope #3 125 x 176 mm
117 wxPAPER_PENV_4, ///< PRC Envelope #4 110 x 208 mm
118 wxPAPER_PENV_5, ///< PRC Envelope #5 110 x 220 mm
119 wxPAPER_PENV_6, ///< PRC Envelope #6 120 x 230 mm
120 wxPAPER_PENV_7, ///< PRC Envelope #7 160 x 230 mm
121 wxPAPER_PENV_8, ///< PRC Envelope #8 120 x 309 mm
122 wxPAPER_PENV_9, ///< PRC Envelope #9 229 x 324 mm
123 wxPAPER_PENV_10, ///< PRC Envelope #10 324 x 458 mm
124 wxPAPER_P16K_ROTATED, ///< PRC 16K Rotated
125 wxPAPER_P32K_ROTATED, ///< PRC 32K Rotated
126 wxPAPER_P32KBIG_ROTATED, ///< PRC 32K(Big) Rotated
127 wxPAPER_PENV_1_ROTATED, ///< PRC Envelope #1 Rotated 165 x 102 mm
128 wxPAPER_PENV_2_ROTATED, ///< PRC Envelope #2 Rotated 176 x 102 mm
129 wxPAPER_PENV_3_ROTATED, ///< PRC Envelope #3 Rotated 176 x 125 mm
130 wxPAPER_PENV_4_ROTATED, ///< PRC Envelope #4 Rotated 208 x 110 mm
131 wxPAPER_PENV_5_ROTATED, ///< PRC Envelope #5 Rotated 220 x 110 mm
132 wxPAPER_PENV_6_ROTATED, ///< PRC Envelope #6 Rotated 230 x 120 mm
133 wxPAPER_PENV_7_ROTATED, ///< PRC Envelope #7 Rotated 230 x 160 mm
134 wxPAPER_PENV_8_ROTATED, ///< PRC Envelope #8 Rotated 309 x 120 mm
135 wxPAPER_PENV_9_ROTATED, ///< PRC Envelope #9 Rotated 324 x 229 mm
136 wxPAPER_PENV_10_ROTATED ///< PRC Envelope #10 Rotated 458 x 324 m
137 };
138
139
140 /** @ingroup group_funcmacro_byteorder */
141 //@{
142
143 /**
144 This macro will swap the bytes of the @a value variable from little endian
145 to big endian or vice versa unconditionally, i.e. independently of the
146 current platform.
147
148 @header{wx/defs.h}
149 */
150 #define wxINT32_SWAP_ALWAYS( wxInt32 value )
151 #define wxUINT32_SWAP_ALWAYS( wxUint32 value )
152 #define wxINT16_SWAP_ALWAYS( wxInt16 value )
153 #define wxUINT16_SWAP_ALWAYS( wxUint16 value )
154
155 //@}
156
157 /** @ingroup group_funcmacro_byteorder */
158 //@{
159
160 /**
161 This macro will swap the bytes of the @a value variable from little endian
162 to big endian or vice versa if the program is compiled on a big-endian
163 architecture (such as Sun work stations). If the program has been compiled
164 on a little-endian architecture, the value will be unchanged.
165
166 Use these macros to read data from and write data to a file that stores
167 data in little-endian (for example Intel i386) format.
168
169 @header{wx/defs.h}
170 */
171 #define wxINT32_SWAP_ON_BE( wxInt32 value )
172 #define wxUINT32_SWAP_ON_BE( wxUint32 value )
173 #define wxINT16_SWAP_ON_BE( wxInt16 value )
174 #define wxUINT16_SWAP_ON_BE( wxUint16 value )
175
176 //@}
177
178 /** @ingroup group_funcmacro_byteorder */
179 //@{
180
181 /**
182 This macro will swap the bytes of the @a value variable from little endian
183 to big endian or vice versa if the program is compiled on a little-endian
184 architecture (such as Intel PCs). If the program has been compiled on a
185 big-endian architecture, the value will be unchanged.
186
187 Use these macros to read data from and write data to a file that stores
188 data in big-endian format.
189
190 @header{wx/defs.h}
191 */
192 #define wxINT32_SWAP_ON_LE( wxInt32 value )
193 #define wxUINT32_SWAP_ON_LE( wxUint32 value )
194 #define wxINT16_SWAP_ON_LE( wxInt16 value )
195 #define wxUINT16_SWAP_ON_LE( wxUint16 value )
196
197 //@}
198
199
200
201 /** @ingroup group_funcmacro_misc */
202 //@{
203
204 /**
205 This macro can be used around a function declaration to generate warnings
206 indicating that this function is deprecated (i.e. obsolete and planned to
207 be removed in the future) when it is used. Only Visual C++ 7 and higher and
208 g++ compilers currently support this functionality.
209
210 Example of use:
211
212 @code
213 // old function, use wxString version instead
214 wxDEPRECATED( void wxGetSomething(char *buf, size_t len) );
215
216 // ...
217 wxString wxGetSomething();
218 @endcode
219
220 @header{wx/defs.h}
221 */
222 #define wxDEPRECATED(function)
223
224 /**
225 This is a special version of wxDEPRECATED() macro which only does something
226 when the deprecated function is used from the code outside wxWidgets itself
227 but doesn't generate warnings when it is used from wxWidgets.
228
229 It is used with the virtual functions which are called by the library
230 itself -- even if such function is deprecated the library still has to call
231 it to ensure that the existing code overriding it continues to work, but
232 the use of this macro ensures that a deprecation warning will be generated
233 if this function is used from the user code or, in case of Visual C++, even
234 when it is simply overridden.
235
236 @header{wx/defs.h}
237 */
238 #define wxDEPRECATED_BUT_USED_INTERNALLY(function)
239
240 /**
241 This macro is similar to wxDEPRECATED() but can be used to not only declare
242 the function @a function as deprecated but to also provide its (inline)
243 implementation @a body.
244
245 It can be used as following:
246
247 @code
248 class wxFoo
249 {
250 public:
251 // OldMethod() is deprecated, use NewMethod() instead
252 void NewMethod();
253 wxDEPRECATED_INLINE( void OldMethod(), NewMethod() );
254 };
255 @endcode
256
257 @header{wx/defs.h}
258 */
259 #define wxDEPRECATED_INLINE(func, body)
260
261 /**
262 @c wxEXPLICIT is a macro which expands to the C++ @c explicit keyword if
263 the compiler supports it or nothing otherwise. Thus, it can be used even in
264 the code which might have to be compiled with an old compiler without
265 support for this language feature but still take advantage of it when it is
266 available.
267
268 @header{wx/defs.h}
269 */
270 #define wxEXPLICIT
271
272 /**
273 GNU C++ compiler gives a warning for any class whose destructor is private
274 unless it has a friend. This warning may sometimes be useful but it doesn't
275 make sense for reference counted class which always delete themselves
276 (hence destructor should be private) but don't necessarily have any
277 friends, so this macro is provided to disable the warning in such case. The
278 @a name parameter should be the name of the class but is only used to
279 construct a unique friend class name internally.
280
281 Example of using the macro:
282
283 @code
284 class RefCounted
285 {
286 public:
287 RefCounted() { m_nRef = 1; }
288 void IncRef() { m_nRef++ ; }
289 void DecRef() { if ( !--m_nRef ) delete this; }
290
291 private:
292 ~RefCounted() { }
293
294 wxSUPPRESS_GCC_PRIVATE_DTOR(RefCounted)
295 };
296 @endcode
297
298 Notice that there should be no semicolon after this macro.
299
300 @header{wx/defs.h}
301 */
302 #define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name)
303
304 /**
305 This macro is the same as the standard C99 @c va_copy for the compilers
306 which support it or its replacement for those that don't. It must be used
307 to preserve the value of a @c va_list object if you need to use it after
308 passing it to another function because it can be modified by the latter.
309
310 As with @c va_start, each call to @c wxVaCopy must have a matching
311 @c va_end.
312
313 @header{wx/defs.h}
314 */
315 void wxVaCopy(va_list argptrDst, va_list argptrSrc);
316
317 //@}
318