]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: defs.h | |
3 | // Purpose: Declarations/definitions common to all wx source files | |
4 | // Author: Julian Smart and others | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) | |
3f4a0c5b | 9 | // Licence: wxWindows licence |
c801d85f KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
34138703 JS |
12 | #ifndef _WX_DEFS_H_ |
13 | #define _WX_DEFS_H_ | |
c801d85f KB |
14 | |
15 | #ifdef __GNUG__ | |
d22699b5 | 16 | #pragma interface "defs.h" |
c801d85f KB |
17 | #endif |
18 | ||
2c41c440 KB |
19 | |
20 | // needed to handle strings with xgettext: | |
21 | #ifndef gettext_noop | |
22 | # define gettext_noop(x) x | |
23 | #endif | |
24 | ||
3f4a0c5b VZ |
25 | // ---------------------------------------------------------------------------- |
26 | // compiler and OS identification | |
27 | // ---------------------------------------------------------------------------- | |
c801d85f | 28 | |
3f4a0c5b | 29 | // OS |
5b34447b VZ |
30 | #if defined(__unix) || defined(__unix__) || defined(____SVR4____) || \ |
31 | defined(__LINUX__) || defined(__sgi ) || \ | |
91b8de8d RR |
32 | defined(__hpux) || defined(sun) || defined(__SUN__) || defined(_AIX) || \ |
33 | defined(__EMX__) | |
5b34447b | 34 | |
3fb98ddf | 35 | #define __UNIX_LIKE__ |
3f4a0c5b VZ |
36 | |
37 | // Helps SGI compilation, apparently | |
38 | #ifdef __SGI__ | |
39 | #ifdef __GNUG__ | |
40 | #define __need_wchar_t | |
41 | #else // !gcc | |
42 | // Note I use the term __SGI_CC__ for both cc and CC, its not a good | |
43 | // idea to mix gcc and cc/CC, the name mangling is different | |
44 | #define __SGI_CC__ | |
45 | #endif // gcc/!gcc | |
46 | #endif // SGI | |
47 | ||
48 | #if defined(sun) || defined(__SUN__) | |
49 | #ifndef __GNUG__ | |
50 | #ifndef __SUNCC__ | |
51 | #define __SUNCC__ | |
52 | #endif // Sun CC | |
53 | #endif | |
54 | #endif // Sun | |
5b34447b | 55 | |
8be97d65 | 56 | #elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) ) |
5b34447b | 57 | // MacOS |
1777b9bb DW |
58 | #elif defined(__OS2__) |
59 | #if defined(__IBMCPP__) | |
60 | #define __VISAGEAVER__ __IBMCPP__ | |
61 | #endif | |
62 | #ifndef __WXOS2__ | |
63 | #define __WXOS2__ | |
64 | #endif | |
65 | #ifndef __WXPM__ | |
66 | #define __WXPM__ | |
67 | #endif | |
d5d63453 | 68 | |
1777b9bb | 69 | // Place other OS/2 compiler environment defines here |
d5d63453 | 70 | #define LINKAGEMODE _Optlink |
3f4a0c5b VZ |
71 | #else // Windows |
72 | #ifndef __WINDOWS__ | |
73 | #define __WINDOWS__ | |
74 | #endif // Windows | |
75 | ||
76 | // define another standard symbol for Microsoft Visual C++: the standard one | |
77 | // (_MSC_VER) is also defined by Metrowerks compiler | |
78 | #if defined(_MSC_VER) && !defined(__MWERKS__) | |
858f7d66 | 79 | #define __VISUALC__ _MSC_VER |
3f4a0c5b VZ |
80 | #elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__) |
81 | #define __BORLANDC__ | |
82 | #elif defined(__WATCOMC__) | |
83 | //#define __WATCOMC__ | |
84 | #elif defined(__SC__) | |
85 | #define __SYMANTECC__ | |
86 | #endif // compiler | |
87 | #endif // OS | |
5dcf05ae | 88 | |
d5d63453 VZ |
89 | // LINKAGEMODE mode is empty for everyting except OS/2 |
90 | #ifndef LINKAGEMODE | |
91 | #define LINKAGEMODE | |
92 | #endif // LINKAGEMODE | |
93 | ||
fd3f686c | 94 | // suppress some Visual C++ warnings |
3f4a0c5b | 95 | #ifdef __VISUALC__ |
197dd9af | 96 | # pragma warning(disable:4201) // nonstandard extension used: nameless struct/union |
539dae52 | 97 | # pragma warning(disable:4244) // conversion from double to float |
fd3f686c | 98 | # pragma warning(disable:4100) // unreferenced formal parameter |
a23fd0e1 VZ |
99 | # pragma warning(disable:4511) // copy ctor couldn't be generated |
100 | # pragma warning(disable:4512) // operator=() couldn't be generated | |
197dd9af | 101 | # pragma warning(disable:4699) // Using precompiled header |
27a9bd48 | 102 | # pragma warning(disable:4134) // conversion between pointers to members of same class |
197dd9af | 103 | #ifndef WIN32 |
27a9bd48 PA |
104 | # pragma warning(disable:4135) // conversion between different integral types |
105 | # pragma warning(disable:4769) // assignment of near pointer to long integer | |
197dd9af PA |
106 | // This one is really annoying, since it occurs for each cast to (HANDLE)... |
107 | # pragma warning(disable:4305) // truncation of long to near ptr | |
27a9bd48 | 108 | #endif |
539dae52 | 109 | #endif // __VISUALC__ |
c801d85f | 110 | |
a3ef5bf5 JS |
111 | // suppress some Salford C++ warnings |
112 | #ifdef __SALFORDC__ | |
113 | # pragma suppress 353 // Possible nested comments | |
114 | # pragma suppress 593 // Define not used | |
115 | # pragma suppress 61 // enum has no name (doesn't suppress!) | |
116 | # pragma suppress 106 // unnamed, unused parameter | |
117 | # pragma suppress 571 // Virtual function hiding | |
539dae52 VZ |
118 | #endif // __SALFORDC__ |
119 | ||
e90c1d2a VZ |
120 | #if defined(__VISUALC__) && !defined(WIN32) |
121 | // VC1.5 does not have LPTSTR type | |
122 | #define LPTSTR LPSTR | |
123 | #define LPCTSTR LPCSTR | |
124 | #endif // VC++ 1.5 | |
cc985fac | 125 | |
539dae52 | 126 | // Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files, |
e3f39499 | 127 | // so define it ourselves |
539dae52 VZ |
128 | #ifdef __DECCXX |
129 | #define __cplusplus | |
130 | #endif // __DECCXX | |
a3ef5bf5 | 131 | |
e3f39499 | 132 | // Resolves linking problems under HP-UX |
5b34447b | 133 | #if defined(__HPUX__) && defined(__GNUG__) |
e3f39499 VZ |
134 | #define va_list __gnuc_va_list |
135 | #endif // HP-UX | |
2f78bd2c | 136 | |
65fd5cb0 RS |
137 | // Mingw32 gcc-2.95 uses new windows headers which are more ms-like |
138 | // we are setting this define because of the complex check | |
139 | // using NORLANDER as Cygwin may follow. (header author is Anders Norlander) | |
4b6f0b91 | 140 | #if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) |
1a7f3062 | 141 | #ifndef wxUSE_NORLANDER_HEADERS |
65fd5cb0 RS |
142 | # define wxUSE_NORLANDER_HEADERS 1 |
143 | #endif | |
1a7f3062 | 144 | #endif |
65fd5cb0 | 145 | |
e3f39499 | 146 | |
c801d85f KB |
147 | ////////////////////////////////////////////////////////////////////////////////// |
148 | // Currently Only MS-Windows/NT, XView and Motif are supported | |
149 | // | |
508203b0 | 150 | #if defined(__HPUX__) && !defined(__WXGTK__) |
3f480da3 | 151 | #ifndef __WXMOTIF__ |
508203b0 VZ |
152 | #define __WXMOTIF__ |
153 | #endif // __WXMOTIF__ | |
c801d85f | 154 | #endif |
508203b0 | 155 | |
2049ba38 | 156 | #if defined(__WXMOTIF__) |
508203b0 | 157 | #define __X__ |
c801d85f KB |
158 | #endif |
159 | ||
16ee7f42 | 160 | #ifdef __WXMSW__ |
c801d85f | 161 | // wxWindows checks for WIN32, not __WIN32__ |
34138703 | 162 | #if ((defined(WIN32) || defined(__NT__)) && !defined(__WIN32__) && !defined(__WXSTUBS__)) |
c801d85f KB |
163 | #define __WIN32__ |
164 | #endif | |
165 | ||
5ea105e0 RR |
166 | #ifdef __WXWINE__ |
167 | #ifndef __WIN32__ | |
168 | #define __WIN32__ | |
169 | #endif | |
170 | #ifndef __WIN95__ | |
171 | #define __WIN95__ | |
172 | #endif | |
173 | #ifndef STRICT | |
174 | #define STRICT | |
175 | #endif | |
176 | #endif | |
177 | ||
c801d85f KB |
178 | #ifndef __WIN32__ |
179 | #define __WIN16__ | |
180 | #endif | |
181 | ||
182 | #if !defined(__WIN95__) && (WINVER >= 0x0400) | |
183 | #define __WIN95__ | |
184 | #endif | |
185 | ||
57c208c5 JS |
186 | #if defined(TWIN32) && !defined(__TWIN32__) |
187 | #define __TWIN32__ | |
188 | #endif | |
189 | ||
16ee7f42 VZ |
190 | #endif // wxMSW |
191 | ||
c801d85f | 192 | // Make sure the environment is set correctly |
2049ba38 | 193 | #if defined(__WXMSW__) && defined(__X__) |
ba6f401d | 194 | #error "Target can't be both X and Windows" |
e90c1d2a VZ |
195 | #elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \ |
196 | !defined(__WXPM__) && !defined(__WXMAC__) && !defined(__X__) && \ | |
197 | !defined(__WXQT__) && !defined(__WXSTUBS__) && wxUSE_GUI | |
1777b9bb | 198 | #error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXPM__|__WXSTUBS__]" |
c801d85f KB |
199 | #endif |
200 | ||
d22699b5 VZ |
201 | // ---------------------------------------------------------------------------- |
202 | // wxWindows options | |
203 | // ---------------------------------------------------------------------------- | |
204 | ||
205 | #include <stddef.h> | |
206 | ||
207 | #include "wx/setup.h" | |
208 | ||
209 | // just in case they were defined in setup.h | |
210 | #undef PACKAGE | |
211 | #undef VERSION | |
212 | ||
e115e771 RR |
213 | // this has to be done after including setup.h which might |
214 | // define __HPUX__ 1 itself | |
215 | #if defined(__hpux) && !defined(__HPUX__) | |
216 | #define __HPUX__ | |
217 | #endif // HP-UX | |
218 | ||
3fb98ddf VZ |
219 | // if we're on a Unixsystem but didn't use configure (so that setup.h didn't |
220 | // define __UNIX__), do define __UNIX__ now | |
221 | #if !defined(__UNIX__) && defined(__UNIX_LIKE__) | |
222 | #define __UNIX__ | |
223 | #endif // Unix | |
224 | ||
d22699b5 VZ |
225 | #include "wx/version.h" |
226 | ||
e90c1d2a VZ |
227 | // ---------------------------------------------------------------------------- |
228 | // compatibility defines | |
229 | // ---------------------------------------------------------------------------- | |
230 | ||
231 | // possibility to build non GUI apps is new, so don't burden ourselves with | |
232 | // compatibility code | |
233 | #if !wxUSE_GUI | |
234 | #undef WXWIN_COMPATIBILITY_2 | |
235 | #define WXWIN_COMPATIBILITY_2 0 | |
236 | #endif // !GUI | |
237 | ||
57493f9f VZ |
238 | // ============================================================================ |
239 | // non portable C++ features | |
240 | // ============================================================================ | |
241 | ||
242 | // ---------------------------------------------------------------------------- | |
243 | // check for native bool type and TRUE/FALSE constants | |
244 | // ---------------------------------------------------------------------------- | |
245 | ||
e90c1d2a VZ |
246 | // define boolean constants if not done yet |
247 | #ifndef TRUE | |
248 | #define TRUE 1 | |
249 | #endif | |
c801d85f | 250 | |
e90c1d2a VZ |
251 | #ifndef FALSE |
252 | #define FALSE 0 | |
253 | #endif | |
c801d85f | 254 | |
57493f9f VZ |
255 | // Add more tests here for Windows compilers that already define bool |
256 | // (under Unix, configure tests for this) | |
257 | #ifndef HAVE_BOOL | |
258 | #if defined( __MWERKS__ ) | |
585ae8cb | 259 | #if (__MWERKS__ >= 0x1000) && __option(bool) |
57493f9f VZ |
260 | #define HAVE_BOOL |
261 | #endif | |
262 | #elif defined(__VISUALC__) && (__VISUALC__ == 1020) | |
263 | // in VC++ 4.2 the bool keyword is reserved (hence can't be typedefed) | |
264 | // but not implemented, so we must #define it | |
265 | #define bool unsigned int | |
794005c0 JS |
266 | #elif defined(__VISUALC__) && (__VISUALC__ == 1010) |
267 | // For VisualC++ 4.1, we need to define | |
268 | // bool as something between 4.0 & 5.0... | |
269 | typedef unsigned int wxbool; | |
270 | #define bool wxbool | |
271 | #define HAVE_BOOL | |
57493f9f VZ |
272 | #elif defined(__VISUALC__) && (__VISUALC__ > 1020) |
273 | // VC++ supports bool since 4.2 | |
274 | #define HAVE_BOOL | |
275 | #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x500) | |
276 | // Borland 5.0+ supports bool | |
277 | #define HAVE_BOOL | |
278 | #elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) | |
279 | // Watcom 11+ supports bool | |
280 | #define HAVE_BOOL | |
6776a0b2 JS |
281 | #elif defined(__GNUWIN32__) |
282 | // Cygwin supports bool | |
283 | #define HAVE_BOOL | |
1777b9bb | 284 | #elif defined(__VISAGECPP__) |
51d7e4e7 DW |
285 | #if __IBMCPP__ < 400 |
286 | typedef unsigned long bool; | |
287 | #endif | |
1777b9bb | 288 | #define HAVE_BOOL |
57493f9f VZ |
289 | #endif // compilers |
290 | #endif // HAVE_BOOL | |
291 | ||
292 | #if !defined(HAVE_BOOL) && !defined(bool) | |
293 | // NB: of course, this doesn't replace the standard type, because, for | |
294 | // example, overloading based on bool/int parameter doesn't work and | |
295 | // so should be avoided in portable programs | |
dc9e1e56 | 296 | typedef unsigned int bool; |
57493f9f | 297 | #endif // bool |
c801d85f KB |
298 | |
299 | typedef short int WXTYPE; | |
42e69d6b VZ |
300 | |
301 | // special care should be taken with this type under Windows where the real | |
302 | // window id is unsigned, so we must always do the cast before comparing them | |
303 | // (or else they would be always different!). Usign wxGetWindowId() which does | |
304 | // the cast itself is recommended. Note that this type can't be unsigned | |
305 | // because -1 is a valid (and largely used) value for window id. | |
c801d85f KB |
306 | typedef int wxWindowID; |
307 | ||
308 | // Macro to cut down on compiler warnings. | |
309 | #if REMOVE_UNUSED_ARG | |
57493f9f | 310 | #define WXUNUSED(identifier) /* identifier */ |
c801d85f | 311 | #else // stupid, broken compiler |
57493f9f | 312 | #define WXUNUSED(identifier) identifier |
c801d85f KB |
313 | #endif |
314 | ||
0661ec39 VZ |
315 | // ---------------------------------------------------------------------------- |
316 | // portable calling conventions macros | |
317 | // ---------------------------------------------------------------------------- | |
318 | ||
319 | // wxCALLBACK should be used for the functions which are called back by | |
320 | // Windows (such as compare function for wxListCtrl) | |
321 | #if defined(__WXMSW__) | |
f3ef286f | 322 | #if defined(__MINGW32__) || defined(__GNUWIN32__) |
0661ec39 VZ |
323 | #define wxCALLBACK __attribute__((stdcall)) |
324 | #else | |
325 | // both VC++ and Borland understand this | |
326 | #define wxCALLBACK _stdcall | |
327 | #endif | |
328 | #else | |
329 | // no stdcall under Unix | |
330 | #define wxCALLBACK | |
331 | #endif // platform | |
332 | ||
333 | // callling convention for the qsort(3) callback | |
334 | ||
335 | #if defined(__VISUALC__) | |
336 | #define wxCMPFUNC_CONV _cdecl | |
337 | #elif defined(__VISAGECPP__) | |
338 | #define wxCMPFUNC_CONV _Optlink | |
339 | #else // !Visual C++ | |
340 | #define wxCMPFUNC_CONV | |
341 | #endif // compiler | |
342 | ||
343 | // compatibility :-( | |
344 | #define CMPFUNC_CONV wxCMPFUNC_CONV | |
345 | ||
346 | // ---------------------------------------------------------------------------- | |
347 | // Making or using wxWindows as a Windows DLL | |
348 | // ---------------------------------------------------------------------------- | |
c801d85f | 349 | |
1777b9bb | 350 | #if defined(__WXMSW__) |
c801d85f | 351 | |
aed0ed3c JS |
352 | // _declspec works in BC++ 5 and later, as well as VC++ |
353 | #if defined(__VISUALC__) || defined(__BORLANDC__) | |
c801d85f KB |
354 | |
355 | # ifdef WXMAKINGDLL | |
aed0ed3c JS |
356 | # define WXDLLEXPORT _declspec( dllexport ) |
357 | # define WXDLLEXPORT_DATA(type) _declspec( dllexport ) type | |
358 | # define WXDLLEXPORT_CTORFN | |
c801d85f | 359 | # elif defined(WXUSINGDLL) |
aed0ed3c JS |
360 | # define WXDLLEXPORT _declspec( dllimport ) |
361 | # define WXDLLEXPORT_DATA(type) _declspec( dllimport ) type | |
c801d85f KB |
362 | # define WXDLLEXPORT_CTORFN |
363 | # else | |
364 | # define WXDLLEXPORT | |
365 | # define WXDLLEXPORT_DATA(type) type | |
366 | # define WXDLLEXPORT_CTORFN | |
367 | # endif | |
368 | ||
1777b9bb DW |
369 | #elif defined(__WXPM__) |
370 | ||
371 | # ifdef WXMAKINGDLL | |
372 | # define WXDLLEXPORT _Export | |
373 | # define WXDLLEXPORT_DATA(type) _Export type | |
374 | # define WXDLLEXPORT_CTORFN | |
375 | # elif defined(WXUSINGDLL) | |
376 | # define WXDLLEXPORT _Export | |
377 | # define WXDLLEXPORT_DATA(type) _Export type | |
378 | # define WXDLLEXPORT_CTORFN | |
379 | # else | |
380 | # define WXDLLEXPORT | |
381 | # define WXDLLEXPORT_DATA(type) type | |
382 | # define WXDLLEXPORT_CTORFN | |
383 | # endif | |
384 | ||
aed0ed3c JS |
385 | #else |
386 | # define WXDLLEXPORT | |
387 | # define WXDLLEXPORT_DATA(type) type | |
388 | # define WXDLLEXPORT_CTORFN | |
c801d85f KB |
389 | #endif |
390 | ||
57493f9f | 391 | #else // !Windows |
c801d85f KB |
392 | # define WXDLLEXPORT |
393 | # define WXDLLEXPORT_DATA(type) type | |
394 | # define WXDLLEXPORT_CTORFN | |
57493f9f | 395 | #endif // Win/!Win |
c801d85f KB |
396 | |
397 | // For ostream, istream ofstream | |
398 | #if defined(__BORLANDC__) && defined( _RTLDLL ) | |
399 | # define WXDLLIMPORT __import | |
400 | #else | |
401 | # define WXDLLIMPORT | |
402 | #endif | |
403 | ||
404 | class WXDLLEXPORT wxObject; | |
405 | class WXDLLEXPORT wxEvent; | |
406 | ||
c86f1403 | 407 | /** symbolic constant used by all Find()-like functions returning positive |
c801d85f | 408 | integer on success as failure indicator */ |
3c67202d | 409 | #define wxNOT_FOUND (-1) |
c801d85f | 410 | |
c801d85f KB |
411 | // ---------------------------------------------------------------------------- |
412 | /** @name Very common macros */ | |
413 | // ---------------------------------------------------------------------------- | |
414 | //@{ | |
a3622daa VZ |
415 | /// delete pointer if it is not NULL and NULL it afterwards |
416 | // (checking that it's !NULL before passing it to delete is just a | |
417 | // a question of style, because delete will do it itself anyhow, but it might | |
418 | // be considered as an error by some overzealous debugging implementations of | |
419 | // the library, so we do it ourselves) | |
c67daf87 | 420 | #if defined(__SGI_CC__) |
d4b67f95 | 421 | // Okay this is bad styling, but the native SGI compiler is very picky, it |
c67daf87 | 422 | // wont let you compare/assign between a NULL (void *) and another pointer |
d4b67f95 RD |
423 | // type. To be really clean we'd need to pass in another argument, the type |
424 | // of p. | |
425 | // Also note the use of 0L, this would allow future possible 64bit support | |
426 | // (as yet untested) by ensuring that we zero all the bits in a pointer | |
427 | // (which is always the same length as a long (at least with the LP64 standard) | |
c67daf87 | 428 | // --- offer aug 98 |
d8260b2f | 429 | #define wxDELETE(p) if ( (p) ) { delete (p); p = 0L; } |
c67daf87 | 430 | #else |
d8260b2f | 431 | #define wxDELETE(p) if ( (p) != NULL ) { delete p; p = NULL; } |
c67daf87 | 432 | #endif /* __SGI__CC__ */ |
a3622daa VZ |
433 | |
434 | // delete an array and NULL it (see comments above) | |
c67daf87 UR |
435 | #if defined(__SGI_CC__) |
436 | // see above comment. | |
437 | #define wxDELETEA(p) if ( (p) ) { delete [] (p); p = 0L; } | |
438 | #else | |
d8260b2f | 439 | #define wxDELETEA(p) if ( ((void *) (p)) != NULL ) { delete [] p; p = NULL; } |
c67daf87 | 440 | #endif /* __SGI__CC__ */ |
c801d85f KB |
441 | |
442 | /// size of statically declared array | |
443 | #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) | |
444 | ||
8cb50e4b JS |
445 | // Use of these suppresses some compiler warnings |
446 | WXDLLEXPORT_DATA(extern const bool) wxTrue; | |
447 | WXDLLEXPORT_DATA(extern const bool) wxFalse; | |
448 | ||
c801d85f KB |
449 | // ---------------------------------------------------------------------------- |
450 | // compiler specific settings | |
451 | // ---------------------------------------------------------------------------- | |
452 | ||
453 | // to allow compiling with warning level 4 under Microsoft Visual C++ some | |
454 | // warnings just must be disabled | |
455 | #ifdef __VISUALC__ | |
456 | #pragma warning(disable: 4514) // unreferenced inline func has been removed | |
d4b67f95 | 457 | /* |
c801d85f | 458 | you might be tempted to disable this one also: triggered by CHECK and FAIL |
3f4a0c5b VZ |
459 | macros in debug.h, but it's, overall, a rather useful one, so I leave it and |
460 | will try to find some way to disable this warning just for CHECK/FAIL. Anyone? | |
c801d85f KB |
461 | */ |
462 | #pragma warning(disable: 4127) // conditional expression is constant | |
c801d85f KB |
463 | #endif // VC++ |
464 | ||
3f4a0c5b VZ |
465 | #if defined(__MWERKS__) |
466 | #undef try | |
467 | #undef except | |
468 | #undef finally | |
469 | #define except(x) catch(...) | |
470 | #endif // Metrowerks | |
8a60ae88 | 471 | |
85ee3474 UU |
472 | // where should i put this? we need to make sure of this as it breaks |
473 | // the <iostream> code. | |
ea57084d | 474 | #if !wxUSE_IOSTREAMH && defined(__WXDEBUG__) |
518f33a4 | 475 | #ifndef __MWERKS__ |
ea57084d | 476 | #undef __WXDEBUG__ |
85ee3474 | 477 | #endif |
518f33a4 | 478 | #endif |
85ee3474 | 479 | |
c801d85f KB |
480 | // Callback function type definition |
481 | typedef void (*wxFunction) (wxObject&, wxEvent&); | |
482 | ||
329e86bf RR |
483 | // ---------------------------------------------------------------------------- |
484 | // OS mnemonics -- Identify the running OS (useful for Windows) | |
485 | // ---------------------------------------------------------------------------- | |
486 | ||
487 | // Not all platforms are currently available or supported | |
488 | enum | |
489 | { | |
490 | wxUNKNOWN_PLATFORM, | |
491 | wxCURSES, // Text-only CURSES | |
492 | wxXVIEW_X, // Sun's XView OpenLOOK toolkit | |
493 | wxMOTIF_X, // OSF Motif 1.x.x | |
494 | wxCOSE_X, // OSF Common Desktop Environment | |
495 | wxNEXTSTEP, // NeXTStep | |
d597fcb7 RR |
496 | wxMACINTOSH, // Apple System 7 and 8 |
497 | wxBEOS, // BeOS | |
329e86bf RR |
498 | wxGTK, // GTK on X |
499 | wxGTK_WIN32, // GTK on Win32 | |
500 | wxGTK_OS2, // GTK on OS/2 | |
501 | wxGTK_BEOS, // GTK on BeOS | |
502 | wxQT, // Qt | |
503 | wxGEOS, // GEOS | |
504 | wxOS2_PM, // OS/2 Workplace | |
505 | wxWINDOWS, // Windows or WfW | |
506 | wxPENWINDOWS, // Windows for Pen Computing | |
507 | wxWINDOWS_NT, // Windows NT | |
508 | wxWIN32S, // Windows 32S API | |
509 | wxWIN95, // Windows 95 | |
510 | wxWIN386, // Watcom 32-bit supervisor modus | |
511 | wxMGL_UNIX, // MGL with direct hardware access | |
bac507e0 | 512 | wxMGL_X, // MGL on X |
329e86bf | 513 | wxMGL_WIN32, // MGL on Win32 |
45fcbf3b DW |
514 | wxMGL_OS2, // MGL on OS/2 |
515 | wxWINDOWS_OS2 // Native OS/2 PM | |
329e86bf RR |
516 | }; |
517 | ||
d716d967 | 518 | // ---------------------------------------------------------------------------- |
72cdf4c9 | 519 | // standard wxWindows types |
d716d967 RR |
520 | // ---------------------------------------------------------------------------- |
521 | ||
72cdf4c9 VZ |
522 | // the type for screen and DC coordinates |
523 | ||
524 | #if wxUSE_COMPATIBLE_COORD_TYPES | |
525 | // to ensure compatibility with 2.0, we must use long | |
526 | #define wxCoord long | |
527 | #else // !wxUSE_COMPATIBLE_COORD_TYPES | |
528 | #ifdef __WIN16__ | |
529 | // under Win16, int is too small, so use long to allow for bigger | |
530 | // virtual canvases | |
531 | typedef long wxCoord; | |
532 | #else // !Win16 | |
533 | // other platforms we support have at least 32bit int - quite enough | |
534 | typedef int wxCoord; | |
535 | #endif // Win16/!Win16 | |
536 | #endif // wxUSE_COMPATIBLE_COORD_TYPES/!wxUSE_COMPATIBLE_COORD_TYPES | |
537 | ||
d716d967 RR |
538 | // fixed length types |
539 | ||
56d7679d | 540 | #define wxInt8 char signed |
bac507e0 | 541 | #define wxUint8 char unsigned |
d716d967 RR |
542 | |
543 | #ifdef __WIN16__ | |
bac507e0 DW |
544 | #define wxInt16 int signed |
545 | #define wxUint16 int unsigned | |
546 | #define wxInt32 long signed | |
547 | #define wxUint32 long unsigned | |
d716d967 RR |
548 | #endif |
549 | ||
550 | #ifdef __WIN32__ | |
bac507e0 DW |
551 | #define wxInt16 short signed |
552 | #define wxUint16 short unsigned | |
553 | #define wxInt32 int signed | |
554 | #define wxUint32 int unsigned | |
d716d967 RR |
555 | #endif |
556 | ||
557 | #ifdef __WXMAC__ | |
bac507e0 DW |
558 | #define wxInt16 short signed |
559 | #define wxUint16 short unsigned | |
560 | #define wxInt32 int signed | |
561 | #define wxUint32 int unsigned | |
d716d967 RR |
562 | #endif |
563 | ||
564 | #ifdef __WXOS2__ | |
bac507e0 DW |
565 | #define wxInt16 short signed |
566 | #define wxUint16 short unsigned | |
567 | #define wxInt32 int signed | |
568 | #define wxUint32 int unsigned | |
d716d967 RR |
569 | #endif |
570 | ||
571 | #if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXOS2__) | |
572 | #if defined(SIZEOF_INT) | |
329e86bf | 573 | /* well, this shouldn't happen... */ |
bac507e0 DW |
574 | #define wxInt16 short signed |
575 | #define wxUint16 short unsigned | |
576 | #define wxInt32 int signed | |
577 | #define wxUint32 int unsigned | |
d716d967 | 578 | #else |
bac507e0 DW |
579 | #define wxInt16 short signed |
580 | #define wxUint16 short unsigned | |
581 | #define wxInt32 int signed | |
582 | #define wxUint32 int unsigned | |
d716d967 RR |
583 | #endif |
584 | #endif | |
585 | ||
56d7679d | 586 | #define wxByte wxUint8 |
bac507e0 | 587 | #define wxWord wxUint16 |
d716d967 | 588 | |
72cdf4c9 VZ |
589 | // ---------------------------------------------------------------------------- |
590 | // byte ordering related definition and macros | |
591 | // ---------------------------------------------------------------------------- | |
592 | ||
d716d967 RR |
593 | // byte sex |
594 | ||
595 | #define wxBIG_ENDIAN 4321 | |
596 | #define wxLITTLE_ENDIAN 1234 | |
597 | #define wxPDP_ENDIAN 3412 | |
598 | ||
599 | #ifdef WORDS_BIGENDIAN | |
600 | #define wxBYTE_ORDER wxBIG_ENDIAN | |
601 | #else | |
602 | #define wxBYTE_ORDER wxLITTLE_ENDIAN | |
603 | #endif | |
604 | ||
605 | // byte swapping | |
606 | ||
607 | #define wxUINT16_SWAP_ALWAYS(val) \ | |
608 | ((wxUint16) ( \ | |
609 | (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \ | |
610 | (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8))) | |
bac507e0 | 611 | |
d716d967 RR |
612 | #define wxINT16_SWAP_ALWAYS(val) \ |
613 | ((wxInt16) ( \ | |
7e2c43b8 RR |
614 | (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \ |
615 | (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8))) | |
bac507e0 | 616 | |
d716d967 RR |
617 | #define wxUINT32_SWAP_ALWAYS(val) \ |
618 | ((wxUint32) ( \ | |
619 | (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \ | |
620 | (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \ | |
621 | (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \ | |
622 | (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24))) | |
623 | ||
624 | #define wxINT32_SWAP_ALWAYS(val) \ | |
625 | ((wxInt32) ( \ | |
7e2c43b8 RR |
626 | (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \ |
627 | (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \ | |
628 | (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \ | |
629 | (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24))) | |
d716d967 RR |
630 | |
631 | // machine specific byte swapping | |
632 | ||
633 | #ifdef WORDS_BIGENDIAN | |
7e2c43b8 RR |
634 | #define wxUINT16_SWAP_ON_BE(val) wxUINT16_SWAP_ALWAYS(val) |
635 | #define wxINT16_SWAP_ON_BE(val) wxINT16_SWAP_ALWAYS(val) | |
636 | #define wxUINT16_SWAP_ON_LE(val) (val) | |
637 | #define wxINT16_SWAP_ON_LE(val) (val) | |
638 | #define wxUINT32_SWAP_ON_BE(val) wxUINT32_SWAP_ALWAYS(val) | |
639 | #define wxINT32_SWAP_ON_BE(val) wxINT32_SWAP_ALWAYS(val) | |
640 | #define wxUINT32_SWAP_ON_LE(val) (val) | |
641 | #define wxINT32_SWAP_ON_LE(val) (val) | |
d716d967 | 642 | #else |
7e2c43b8 RR |
643 | #define wxUINT16_SWAP_ON_LE(val) wxUINT16_SWAP_ALWAYS(val) |
644 | #define wxINT16_SWAP_ON_LE(val) wxINT16_SWAP_ALWAYS(val) | |
645 | #define wxUINT16_SWAP_ON_BE(val) (val) | |
646 | #define wxINT16_SWAP_ON_BE(val) (val) | |
647 | #define wxUINT32_SWAP_ON_LE(val) wxUINT32_SWAP_ALWAYS(val) | |
648 | #define wxINT32_SWAP_ON_LE(val) wxINT32_SWAP_ALWAYS(val) | |
649 | #define wxUINT32_SWAP_ON_BE(val) (val) | |
650 | #define wxINT32_SWAP_ON_BE(val) (val) | |
d716d967 RR |
651 | #endif |
652 | ||
d597fcb7 RR |
653 | // ---------------------------------------------------------------------------- |
654 | // Geometric flags | |
655 | // ---------------------------------------------------------------------------- | |
656 | ||
657 | enum wxGeometryCentre | |
658 | { | |
659 | wxCENTRE = 0x0001, | |
660 | wxCENTER = wxCENTRE | |
661 | }; | |
662 | ||
663 | // centering into frame rather than screen (obsolete) | |
664 | #define wxCENTER_FRAME 0x0000 | |
665 | // centre on screen rather than parent | |
666 | #define wxCENTRE_ON_SCREEN 0x0002 | |
667 | #define wxCENTER_ON_SCREEN wxCENTRE_ON_SCREEN | |
668 | ||
669 | enum wxOrientation | |
670 | { | |
671 | wxHORIZONTAL = 0x0004, | |
672 | wxVERTICAL = 0x0008, | |
2f78bd2c | 673 | |
d597fcb7 RR |
674 | wxBOTH = (wxVERTICAL | wxHORIZONTAL) |
675 | }; | |
676 | ||
677 | enum wxDirection | |
678 | { | |
679 | wxLEFT = 0x0010, | |
680 | wxRIGHT = 0x0020, | |
681 | wxUP = 0x0040, | |
682 | wxDOWN = 0x0080, | |
2f78bd2c | 683 | |
d597fcb7 RR |
684 | wxTOP = wxUP, |
685 | wxBOTTOM = wxDOWN, | |
2f78bd2c | 686 | |
d597fcb7 RR |
687 | wxNORTH = wxUP, |
688 | wxSOUTH = wxDOWN, | |
689 | wxWEST = wxLEFT, | |
690 | wxEAST = wxRIGHT, | |
2f78bd2c | 691 | |
d597fcb7 RR |
692 | wxALL = (wxUP | wxDOWN | wxRIGHT | wxLEFT) |
693 | }; | |
694 | ||
695 | enum wxAlignment | |
696 | { | |
697 | wxALIGN_NOT = 0x0000, | |
be2577e4 RD |
698 | wxALIGN_CENTER_HORIZONTAL = 0x0100, |
699 | wxALIGN_CENTRE_HORIZONTAL = wxALIGN_CENTER_HORIZONTAL, | |
d597fcb7 RR |
700 | wxALIGN_LEFT = wxALIGN_NOT, |
701 | wxALIGN_TOP = wxALIGN_NOT, | |
702 | wxALIGN_RIGHT = 0x0200, | |
be2577e4 RD |
703 | wxALIGN_BOTTOM = 0x0400, |
704 | wxALIGN_CENTER_VERTICAL = 0x0800, | |
705 | wxALIGN_CENTRE_VERTICAL = wxALIGN_CENTER_VERTICAL, | |
706 | ||
707 | wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL), | |
708 | wxALIGN_CENTRE = wxALIGN_CENTER | |
d597fcb7 RR |
709 | }; |
710 | ||
711 | enum wxStretch | |
712 | { | |
713 | wxSTRETCH_NOT = 0x0000, | |
714 | wxSHRINK = 0x1000, | |
715 | wxGROW = 0x2000, | |
be2577e4 RD |
716 | wxEXPAND = wxGROW, |
717 | wxSHAPED = 0x4000 | |
d597fcb7 RR |
718 | }; |
719 | ||
d716d967 RR |
720 | // ---------------------------------------------------------------------------- |
721 | // Window style flags | |
722 | // ---------------------------------------------------------------------------- | |
723 | ||
c801d85f | 724 | /* |
c801d85f KB |
725 | * Values are chosen so they can be |'ed in a bit list. |
726 | * Some styles are used across more than one group, | |
727 | * so the values mustn't clash with others in the group. | |
728 | * Otherwise, numbers can be reused across groups. | |
729 | * | |
730 | * From version 1.66: | |
731 | * Window (cross-group) styles now take up the first half | |
732 | * of the flag, and control-specific styles the | |
733 | * second half. | |
d4b67f95 | 734 | * |
c801d85f KB |
735 | */ |
736 | ||
737 | /* | |
738 | * Window (Frame/dialog/subwindow/panel item) style flags | |
739 | */ | |
329e86bf RR |
740 | #define wxVSCROLL 0x80000000 |
741 | #define wxHSCROLL 0x40000000 | |
742 | #define wxCAPTION 0x20000000 | |
c801d85f KB |
743 | |
744 | // New styles | |
329e86bf RR |
745 | #define wxDOUBLE_BORDER 0x10000000 |
746 | #define wxSUNKEN_BORDER 0x08000000 | |
747 | #define wxRAISED_BORDER 0x04000000 | |
748 | #define wxBORDER 0x02000000 | |
749 | #define wxSIMPLE_BORDER wxBORDER | |
750 | #define wxSTATIC_BORDER 0x01000000 | |
751 | #define wxTRANSPARENT_WINDOW 0x00100000 | |
752 | #define wxNO_BORDER 0x00200000 | |
753 | ||
754 | #define wxUSER_COLOURS 0x00800000 | |
c801d85f KB |
755 | // Override CTL3D etc. control colour processing to |
756 | // allow own background colour | |
64693098 | 757 | // OBSOLETE - use wxNO_3D instead |
329e86bf | 758 | #define wxNO_3D 0x00800000 |
c801d85f | 759 | // Override CTL3D or native 3D styles for children |
329e86bf | 760 | #define wxCLIP_CHILDREN 0x00400000 |
565215b2 JS |
761 | // Clip children when painting, which reduces flicker in |
762 | // e.g. frames and splitter windows, but can't be used in | |
763 | // a panel where a static box must be 'transparent' (panel | |
764 | // paints the background for it) | |
c801d85f KB |
765 | |
766 | // Add this style to a panel to get tab traversal working | |
767 | // outside of dialogs. | |
329e86bf | 768 | #define wxTAB_TRAVERSAL 0x00080000 |
c801d85f | 769 | |
9bf84618 VZ |
770 | // Add this style if the control wants to get all keyboard messages (under |
771 | // Windows, it won't normally get the dialog navigation key events) | |
329e86bf | 772 | #define wxWANTS_CHARS 0x00040000 |
9bf84618 | 773 | |
329e86bf | 774 | // Make window retained (mostly Motif, I think) |
d9ea011f | 775 | #define wxRETAINED 0x00020000 |
329e86bf | 776 | #define wxBACKINGSTORE wxRETAINED |
c801d85f | 777 | |
d9ea011f VZ |
778 | // don't invalidate the whole window (resulting in a PAINT event) when the |
779 | // window is resized (currently, makes sense for wxMSW only) | |
193fe989 | 780 | #define wxNO_FULL_REPAINT_ON_RESIZE 0x00010000 |
c801d85f | 781 | /* |
329e86bf | 782 | * wxFrame/wxDialog style flags |
c801d85f | 783 | */ |
3f4a0c5b VZ |
784 | #define wxSTAY_ON_TOP 0x8000 |
785 | #define wxICONIZE 0x4000 | |
786 | #define wxMINIMIZE wxICONIZE | |
787 | #define wxMAXIMIZE 0x2000 | |
788 | #define wxTHICK_FRAME 0x1000 | |
3f480da3 | 789 | #define wxSYSTEM_MENU 0x0800 |
3f4a0c5b VZ |
790 | #define wxMINIMIZE_BOX 0x0400 |
791 | #define wxMAXIMIZE_BOX 0x0200 | |
792 | #define wxTINY_CAPTION_HORIZ 0x0100 | |
793 | #define wxTINY_CAPTION_VERT 0x0080 | |
794 | #define wxRESIZE_BOX wxMAXIMIZE_BOX | |
795 | #define wxRESIZE_BORDER 0x0040 | |
796 | #define wxDIALOG_MODAL 0x0020 | |
797 | #define wxDIALOG_MODELESS 0x0000 | |
329e86bf | 798 | // Add for normal Windows frame behaviour |
aeab10d0 | 799 | #define wxFRAME_FLOAT_ON_PARENT 0x0020 |
c801d85f | 800 | |
c801d85f KB |
801 | |
802 | #if WXWIN_COMPATIBILITY | |
803 | #define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE | |
804 | #endif | |
805 | ||
329e86bf RR |
806 | #define wxDEFAULT_FRAME_STYLE \ |
807 | (wxSYSTEM_MENU | wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN) | |
aa64626e KB |
808 | |
809 | #ifdef __WXMSW__ | |
810 | # define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU|wxCAPTION|wxTHICK_FRAME) | |
811 | #else | |
812 | // Under Unix, the dialogs don't have a system menu. Specifying | |
813 | // wxSYSTEM_MENU here, will make a close button appear. | |
3e469ea3 | 814 | # define wxDEFAULT_DIALOG_STYLE (wxCAPTION|wxTHICK_FRAME) |
aa64626e KB |
815 | #endif |
816 | ||
c801d85f | 817 | /* |
329e86bf | 818 | * wxExtDialog style flags |
c801d85f | 819 | */ |
329e86bf RR |
820 | #define wxED_CLIENT_MARGIN 0x0004 |
821 | #define wxED_BUTTONS_BOTTOM 0x0000 // has no effect | |
822 | #define wxED_BUTTONS_RIGHT 0x0002 | |
823 | #define wxED_STATIC_LINE 0x0001 | |
824 | ||
825 | #if defined(__WXMSW__) || defined(__WXMAC__) | |
826 | # define wxEXT_DIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxED_CLIENT_MARGIN) | |
827 | #else | |
828 | # define wxEXT_DIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxED_CLIENT_MARGIN|wxED_STATIC_LINE) | |
829 | #endif | |
c801d85f KB |
830 | |
831 | /* | |
832 | * wxToolBar style flags | |
833 | */ | |
329e86bf RR |
834 | #define wxTB_3DBUTTONS 0x8000 |
835 | #define wxTB_HORIZONTAL 0x0002 | |
836 | #define wxTB_VERTICAL 0x0004 | |
858b5bdd | 837 | // Flatbar/Coolbar under Win98/ GTK 1.2 |
329e86bf | 838 | #define wxTB_FLAT 0x0008 |
858b5bdd | 839 | // use native docking under GTK |
329e86bf | 840 | #define wxTB_DOCKABLE 0x0010 |
c801d85f KB |
841 | |
842 | /* | |
3502e687 | 843 | * wxMenuBar style flags |
c801d85f | 844 | */ |
3502e687 RR |
845 | // use native docking |
846 | #define wxMB_DOCKABLE 0x0001 | |
847 | ||
ae53c98c KB |
848 | /* |
849 | * wxMenu style flags | |
850 | */ | |
851 | #define wxMENU_TEAROFF 0x0001 | |
d4b67f95 | 852 | |
3502e687 RR |
853 | /* |
854 | * Apply to all panel items | |
855 | */ | |
c801d85f | 856 | #define wxCOLOURED 0x0800 |
c801d85f | 857 | #define wxFIXED_LENGTH 0x0400 |
c801d85f KB |
858 | |
859 | /* | |
860 | * Styles for wxListBox | |
861 | */ | |
c801d85f | 862 | #define wxLB_SORT 0x0010 |
9c331ded | 863 | #define wxLB_SINGLE 0x0020 |
c801d85f KB |
864 | #define wxLB_MULTIPLE 0x0040 |
865 | #define wxLB_EXTENDED 0x0080 | |
866 | // wxLB_OWNERDRAW is Windows-only | |
867 | #define wxLB_OWNERDRAW 0x0100 | |
9c331ded JS |
868 | #define wxLB_NEEDED_SB 0x0200 |
869 | #define wxLB_ALWAYS_SB 0x0400 | |
c801d85f KB |
870 | #define wxLB_HSCROLL wxHSCROLL |
871 | ||
872 | /* | |
873 | * wxTextCtrl style flags | |
874 | */ | |
875 | #define wxPROCESS_ENTER 0x0004 | |
876 | #define wxPASSWORD 0x0008 | |
877 | #define wxTE_PROCESS_ENTER wxPROCESS_ENTER | |
878 | #define wxTE_PASSWORD wxPASSWORD | |
879 | #define wxTE_READONLY 0x0010 | |
880 | #define wxTE_MULTILINE 0x0020 | |
2004484f | 881 | #define wxTE_PROCESS_TAB 0x0040 |
c49245f8 VZ |
882 | // this style means to use RICHEDIT control and does something only under wxMSW |
883 | // and Win32 and is silently ignored under all other platforms | |
884 | #define wxTE_RICH 0x0080 | |
b70ababc | 885 | #define wxTE_NO_VSCROLL 0x0100 |
7682a175 | 886 | #define wxTE_AUTO_SCROLL 0x0200 |
c801d85f KB |
887 | |
888 | /* | |
889 | * wxComboBox style flags | |
890 | */ | |
891 | #define wxCB_SIMPLE 0x0004 | |
c801d85f | 892 | #define wxCB_SORT 0x0008 |
9c331ded JS |
893 | #define wxCB_READONLY 0x0010 |
894 | #define wxCB_DROPDOWN 0x0020 | |
c801d85f KB |
895 | |
896 | /* | |
0544bc0a | 897 | * wxRadioBox style flags |
c801d85f | 898 | */ |
fa18b757 | 899 | // New, more intuitive names to specify majorDim argument |
0544bc0a RR |
900 | #define wxRA_SPECIFY_COLS wxHORIZONTAL |
901 | #define wxRA_SPECIFY_ROWS wxVERTICAL | |
fa18b757 | 902 | // Old names for compatibility |
c801d85f KB |
903 | #define wxRA_HORIZONTAL wxHORIZONTAL |
904 | #define wxRA_VERTICAL wxVERTICAL | |
0544bc0a RR |
905 | |
906 | /* | |
907 | * wxRadioButton style flag | |
908 | */ | |
c801d85f KB |
909 | #define wxRB_GROUP 0x0004 |
910 | ||
911 | /* | |
912 | * wxGauge flags | |
913 | */ | |
c801d85f KB |
914 | #define wxGA_HORIZONTAL wxHORIZONTAL |
915 | #define wxGA_VERTICAL wxVERTICAL | |
e115e771 | 916 | #define wxGA_PROGRESSBAR 0x0010 |
329e86bf | 917 | // Windows only |
e115e771 | 918 | #define wxGA_SMOOTH 0x0020 |
c801d85f KB |
919 | |
920 | /* | |
921 | * wxSlider flags | |
922 | */ | |
2f78bd2c RD |
923 | #define wxSL_HORIZONTAL wxHORIZONTAL // 4 |
924 | #define wxSL_VERTICAL wxVERTICAL // 8 | |
c801d85f KB |
925 | // The next one is obsolete - use scroll events instead |
926 | #define wxSL_NOTIFY_DRAG 0x0000 | |
2f78bd2c | 927 | #define wxSL_AUTOTICKS 0x0010 |
c801d85f KB |
928 | // #define wxSL_MANUALTICKS 0x0010 |
929 | #define wxSL_LABELS 0x0020 | |
930 | #define wxSL_LEFT 0x0040 | |
931 | #define wxSL_TOP 0x0080 | |
932 | #define wxSL_RIGHT 0x0100 | |
933 | #define wxSL_BOTTOM 0x0200 | |
934 | #define wxSL_BOTH 0x0400 | |
935 | #define wxSL_SELRANGE 0x0800 | |
936 | ||
937 | /* | |
938 | * wxScrollBar flags | |
939 | */ | |
c801d85f KB |
940 | #define wxSB_HORIZONTAL wxHORIZONTAL |
941 | #define wxSB_VERTICAL wxVERTICAL | |
942 | ||
943 | /* | |
b0351fc9 | 944 | * wxButton flags (Win32 only) |
c801d85f | 945 | */ |
c801d85f KB |
946 | #define wxBU_AUTODRAW 0x0004 |
947 | #define wxBU_NOAUTODRAW 0x0000 | |
948 | ||
949 | /* | |
950 | * wxTreeCtrl flags | |
951 | */ | |
c801d85f KB |
952 | #define wxTR_HAS_BUTTONS 0x0004 |
953 | #define wxTR_EDIT_LABELS 0x0008 | |
64693098 | 954 | #define wxTR_LINES_AT_ROOT 0x0010 |
c801d85f | 955 | |
c25ccf85 RR |
956 | #define wxTR_SINGLE 0x0000 |
957 | #define wxTR_MULTIPLE 0x0020 | |
958 | #define wxTR_EXTENDED 0x0040 | |
5ea47806 | 959 | #define wxTR_HAS_VARIABLE_ROW_HEIGHT 0x0080 |
c25ccf85 | 960 | |
c801d85f KB |
961 | /* |
962 | * wxListCtrl flags | |
963 | */ | |
c801d85f KB |
964 | #define wxLC_ICON 0x0004 |
965 | #define wxLC_SMALL_ICON 0x0008 | |
966 | #define wxLC_LIST 0x0010 | |
967 | #define wxLC_REPORT 0x0020 | |
968 | #define wxLC_ALIGN_TOP 0x0040 | |
969 | #define wxLC_ALIGN_LEFT 0x0080 | |
970 | #define wxLC_AUTOARRANGE 0x0100 | |
971 | #define wxLC_USER_TEXT 0x0200 | |
972 | #define wxLC_EDIT_LABELS 0x0400 | |
973 | #define wxLC_NO_HEADER 0x0800 | |
974 | #define wxLC_NO_SORT_HEADER 0x1000 | |
975 | #define wxLC_SINGLE_SEL 0x2000 | |
976 | #define wxLC_SORT_ASCENDING 0x4000 | |
977 | #define wxLC_SORT_DESCENDING 0x8000 | |
978 | ||
979 | #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT) | |
980 | #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT) | |
981 | #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING) | |
982 | ||
983 | // Omitted because (a) too much detail (b) not enough style flags | |
984 | // #define wxLC_NO_SCROLL | |
985 | // #define wxLC_NO_LABEL_WRAP | |
986 | // #define wxLC_OWNERDRAW_FIXED | |
987 | // #define wxLC_SHOW_SEL_ALWAYS | |
988 | ||
989 | /* | |
990 | * wxSpinButton flags | |
991 | */ | |
a3e7d24d RR |
992 | #define wxSP_HORIZONTAL wxHORIZONTAL // 4 |
993 | #define wxSP_VERTICAL wxVERTICAL // 8 | |
994 | #define wxSP_ARROW_KEYS 0x0010 | |
995 | #define wxSP_WRAP 0x0020 | |
c801d85f KB |
996 | |
997 | /* | |
cd2df130 | 998 | * wxSplitterWindow flags |
c801d85f | 999 | */ |
a3e7d24d RR |
1000 | #define wxSP_NOBORDER 0x0000 |
1001 | #define wxSP_3D 0x0010 | |
1002 | #define wxSP_BORDER 0x0020 | |
1003 | #define wxSP_PERMIT_UNSPLIT 0x0040 | |
1004 | #define wxSP_LIVE_UPDATE 0x0080 | |
c801d85f | 1005 | |
cd2df130 JS |
1006 | /* |
1007 | * wxFrame extra flags | |
1008 | */ | |
cd2df130 JS |
1009 | // No title on taskbar |
1010 | #define wxFRAME_TOOL_WINDOW 0x0004 | |
1011 | ||
c801d85f KB |
1012 | /* |
1013 | * wxTabCtrl flags | |
1014 | */ | |
329e86bf | 1015 | #define wxTC_MULTILINE 0x0000 |
a3e7d24d RR |
1016 | #define wxTC_RIGHTJUSTIFY 0x0010 |
1017 | #define wxTC_FIXEDWIDTH 0x0020 | |
1018 | #define wxTC_OWNERDRAW 0x0040 | |
10b959e3 | 1019 | |
58a8ab88 JS |
1020 | /* |
1021 | * wxNotebook flags | |
1022 | */ | |
a3e7d24d | 1023 | #define wxNB_FIXEDWIDTH 0x0010 |
4a0253b8 RS |
1024 | #define wxNB_LEFT 0x0020 |
1025 | #define wxNB_RIGHT 0x0040 | |
1026 | #define wxNB_BOTTOM 0x0080 | |
58a8ab88 | 1027 | |
c801d85f KB |
1028 | /* |
1029 | * wxStatusBar95 flags | |
1030 | */ | |
a3e7d24d | 1031 | #define wxST_SIZEGRIP 0x0010 |
c801d85f | 1032 | |
185fa6bf VZ |
1033 | /* |
1034 | * wxStaticText flags | |
1035 | */ | |
1036 | #define wxST_NO_AUTORESIZE 0x0001 | |
1037 | ||
b0351fc9 RR |
1038 | /* |
1039 | * wxStaticLine flags | |
1040 | */ | |
329e86bf RR |
1041 | #define wxLI_HORIZONTAL wxHORIZONTAL |
1042 | #define wxLI_VERTICAL wxVERTICAL | |
b0351fc9 | 1043 | |
9726da4f VZ |
1044 | /* |
1045 | * wxProgressDialog flags | |
1046 | */ | |
329e86bf RR |
1047 | #define wxPD_CAN_ABORT 0x0001 |
1048 | #define wxPD_APP_MODAL 0x0002 | |
1049 | #define wxPD_AUTO_HIDE 0x0004 | |
1050 | #define wxPD_ELAPSED_TIME 0x0008 | |
1051 | #define wxPD_ESTIMATED_TIME 0x0010 | |
1052 | #define wxPD_REMAINING_TIME 0x0020 | |
b0351fc9 | 1053 | |
ea8fe90e VS |
1054 | /* |
1055 | * wxHtmlWindow flags | |
1056 | */ | |
1057 | #define wxHW_SCROLLBAR_NEVER 0x0002 | |
1058 | #define wxHW_SCROLLBAR_AUTO 0x0004 | |
1059 | ||
c801d85f | 1060 | /* |
bac507e0 | 1061 | * extended dialog specifiers. these values are stored in a different |
329e86bf RR |
1062 | * flag and thus do not overlap with other style flags. note that these |
1063 | * values do not correspond to the return values of the dialogs (for | |
bac507e0 | 1064 | * those values, look at the wxID_XXX defines). |
c801d85f | 1065 | */ |
d597fcb7 RR |
1066 | |
1067 | // wxCENTRE already defined as 0x00000001 | |
1068 | #define wxOK 0x00000004 | |
1069 | #define wxYES_NO 0x00000008 | |
1070 | #define wxCANCEL 0x00000010 | |
1071 | #define wxYES 0x00000020 | |
1072 | #define wxNO 0x00000040 | |
1073 | #define wxNO_DEFAULT 0x00000080 | |
329e86bf RR |
1074 | #define wxYES_DEFAULT 0x00000000 // has no effect |
1075 | ||
d597fcb7 RR |
1076 | #define wxICON_EXCLAMATION 0x00000100 |
1077 | #define wxICON_HAND 0x00000200 | |
ebea0891 KB |
1078 | #define wxICON_WARNING wxICON_EXCLAMATION |
1079 | #define wxICON_ERROR wxICON_HAND | |
d597fcb7 RR |
1080 | #define wxICON_QUESTION 0x00000400 |
1081 | #define wxICON_INFORMATION 0x00000800 | |
329e86bf RR |
1082 | #define wxICON_STOP wxICON_HAND |
1083 | #define wxICON_ASTERISK wxICON_INFORMATION | |
d597fcb7 | 1084 | #define wxICON_MASK (0x00000100|0x00000200|0x00000400|0x00000800) |
329e86bf | 1085 | |
d597fcb7 RR |
1086 | #define wxFORWARD 0x00001000 |
1087 | #define wxBACKWARD 0x00002000 | |
1088 | #define wxRESET 0x00004000 | |
1089 | #define wxHELP 0x00008000 | |
1090 | #define wxMORE 0x00010000 | |
1091 | #define wxSETUP 0x00020000 | |
329e86bf RR |
1092 | |
1093 | // ---------------------------------------------------------------------------- | |
1094 | // standard IDs | |
1095 | // ---------------------------------------------------------------------------- | |
1096 | ||
1097 | // Standard menu IDs | |
1098 | #define wxID_LOWEST 4999 | |
1099 | ||
1100 | #define wxID_OPEN 5000 | |
1101 | #define wxID_CLOSE 5001 | |
1102 | #define wxID_NEW 5002 | |
1103 | #define wxID_SAVE 5003 | |
1104 | #define wxID_SAVEAS 5004 | |
1105 | #define wxID_REVERT 5005 | |
1106 | #define wxID_EXIT 5006 | |
1107 | #define wxID_UNDO 5007 | |
1108 | #define wxID_REDO 5008 | |
1109 | #define wxID_HELP 5009 | |
1110 | #define wxID_PRINT 5010 | |
1111 | #define wxID_PRINT_SETUP 5011 | |
1112 | #define wxID_PREVIEW 5012 | |
1113 | #define wxID_ABOUT 5013 | |
1114 | #define wxID_HELP_CONTENTS 5014 | |
1115 | #define wxID_HELP_COMMANDS 5015 | |
1116 | #define wxID_HELP_PROCEDURES 5016 | |
1117 | #define wxID_HELP_CONTEXT 5017 | |
1118 | ||
1119 | #define wxID_CUT 5030 | |
1120 | #define wxID_COPY 5031 | |
1121 | #define wxID_PASTE 5032 | |
1122 | #define wxID_CLEAR 5033 | |
1123 | #define wxID_FIND 5034 | |
1124 | #define wxID_DUPLICATE 5035 | |
1125 | #define wxID_SELECTALL 5036 | |
1126 | ||
1127 | #define wxID_FILE1 5050 | |
1128 | #define wxID_FILE2 5051 | |
1129 | #define wxID_FILE3 5052 | |
1130 | #define wxID_FILE4 5053 | |
1131 | #define wxID_FILE5 5054 | |
1132 | #define wxID_FILE6 5055 | |
1133 | #define wxID_FILE7 5056 | |
1134 | #define wxID_FILE8 5057 | |
1135 | #define wxID_FILE9 5058 | |
1136 | ||
1137 | // Standard button IDs | |
1138 | #define wxID_OK 5100 | |
1139 | #define wxID_CANCEL 5101 | |
1140 | #define wxID_APPLY 5102 | |
1141 | #define wxID_YES 5103 | |
1142 | #define wxID_NO 5104 | |
1143 | #define wxID_STATIC 5105 | |
1144 | #define wxID_FORWARD 5106 | |
1145 | #define wxID_BACKWARD 5107 | |
1146 | #define wxID_DEFAULT 5108 | |
1147 | #define wxID_MORE 5109 | |
1148 | #define wxID_SETUP 5110 | |
1149 | #define wxID_RESET 5111 | |
1150 | ||
a16d3c04 KB |
1151 | // IDs used by generic file dialog (11 consecutive starting from this value) |
1152 | #define wxID_FILEDLGG 5900 | |
329e86bf RR |
1153 | #define wxID_HIGHEST 5999 |
1154 | ||
329e86bf RR |
1155 | // ---------------------------------------------------------------------------- |
1156 | // Possible SetSize flags | |
1157 | // ---------------------------------------------------------------------------- | |
1158 | ||
1159 | // Use internally-calculated width if -1 | |
1160 | #define wxSIZE_AUTO_WIDTH 0x0001 | |
1161 | // Use internally-calculated height if -1 | |
1162 | #define wxSIZE_AUTO_HEIGHT 0x0002 | |
1163 | // Use internally-calculated width and height if each is -1 | |
1164 | #define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT) | |
1165 | // Ignore missing (-1) dimensions (use existing). | |
1166 | // For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code. | |
1167 | #define wxSIZE_USE_EXISTING 0x0000 | |
1168 | // Allow -1 as a valid position | |
1169 | #define wxSIZE_ALLOW_MINUS_ONE 0x0004 | |
1170 | // Don't do parent client adjustments (for implementation only) | |
1171 | #define wxSIZE_NO_ADJUSTMENTS 0x0008 | |
1172 | ||
1173 | // ---------------------------------------------------------------------------- | |
1174 | // GDI descriptions | |
1175 | // ---------------------------------------------------------------------------- | |
c801d85f KB |
1176 | |
1177 | enum { | |
1178 | // Text font families | |
1179 | wxDEFAULT = 70, | |
1180 | wxDECORATIVE, | |
1181 | wxROMAN, | |
1182 | wxSCRIPT, | |
1183 | wxSWISS, | |
1184 | wxMODERN, | |
1185 | wxTELETYPE, /* @@@@ */ | |
1186 | ||
1187 | // Proportional or Fixed width fonts (not yet used) | |
1188 | wxVARIABLE = 80, | |
1189 | wxFIXED, | |
1190 | ||
1191 | wxNORMAL = 90, | |
1192 | wxLIGHT, | |
1193 | wxBOLD, | |
1194 | // Also wxNORMAL for normal (non-italic text) | |
1195 | wxITALIC, | |
1196 | wxSLANT, | |
1197 | ||
1198 | // Pen styles | |
1199 | wxSOLID = 100, | |
1200 | wxDOT, | |
1201 | wxLONG_DASH, | |
1202 | wxSHORT_DASH, | |
1203 | wxDOT_DASH, | |
1204 | wxUSER_DASH, | |
1205 | ||
1206 | wxTRANSPARENT, | |
1207 | ||
1208 | // Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! | |
1209 | // Note also that stippling a Pen IS meaningfull, because a Line is | |
1210 | // drawn with a Pen, and without any Brush -- and it can be stippled. | |
1211 | wxSTIPPLE = 110, | |
1212 | wxBDIAGONAL_HATCH, | |
1213 | wxCROSSDIAG_HATCH, | |
1214 | wxFDIAGONAL_HATCH, | |
1215 | wxCROSS_HATCH, | |
1216 | wxHORIZONTAL_HATCH, | |
1217 | wxVERTICAL_HATCH, | |
3f4a0c5b | 1218 | #define IS_HATCH(s) ((s)>=wxBDIAGONAL_HATCH && (s)<=wxVERTICAL_HATCH) |
c801d85f KB |
1219 | |
1220 | wxJOIN_BEVEL = 120, | |
1221 | wxJOIN_MITER, | |
1222 | wxJOIN_ROUND, | |
1223 | ||
1224 | wxCAP_ROUND = 130, | |
1225 | wxCAP_PROJECTING, | |
1226 | wxCAP_BUTT | |
1227 | }; | |
1228 | ||
1229 | ||
1230 | // Logical ops | |
3f4a0c5b | 1231 | typedef enum |
83624f79 | 1232 | { |
c801d85f KB |
1233 | wxCLEAR, // 0 |
1234 | wxXOR, // src XOR dst | |
1235 | wxINVERT, // NOT dst | |
1236 | wxOR_REVERSE, // src OR (NOT dst) | |
1237 | wxAND_REVERSE,// src AND (NOT dst) | |
1238 | wxCOPY, // src | |
1239 | wxAND, // src AND dst | |
1240 | wxAND_INVERT, // (NOT src) AND dst | |
1241 | wxNO_OP, // dst | |
1242 | wxNOR, // (NOT src) AND (NOT dst) | |
1243 | wxEQUIV, // (NOT src) XOR dst | |
1244 | wxSRC_INVERT, // (NOT src) | |
1245 | wxOR_INVERT, // (NOT src) OR dst | |
1246 | wxNAND, // (NOT src) OR (NOT dst) | |
1247 | wxOR, // src OR dst | |
1248 | wxSET, // 1 | |
1249 | wxSRC_OR, // source _bitmap_ OR destination | |
1250 | wxSRC_AND // source _bitmap_ AND destination | |
1251 | } form_ops_t; | |
1252 | ||
329e86bf | 1253 | /* Flood styles */ |
c801d85f KB |
1254 | #define wxFLOOD_SURFACE 1 |
1255 | #define wxFLOOD_BORDER 2 | |
1256 | ||
329e86bf | 1257 | /* Polygon filling mode */ |
c801d85f KB |
1258 | #define wxODDEVEN_RULE 1 |
1259 | #define wxWINDING_RULE 2 | |
1260 | ||
329e86bf | 1261 | /* ToolPanel in wxFrame */ |
3f4a0c5b VZ |
1262 | #define wxTOOL_TOP 1 |
1263 | #define wxTOOL_BOTTOM 2 | |
1264 | #define wxTOOL_LEFT 3 | |
1265 | #define wxTOOL_RIGHT 4 | |
c801d85f | 1266 | |
9e2896e5 VZ |
1267 | // the values of the format constants should be the same as correspondign |
1268 | // CF_XXX constants in Windows API | |
3f480da3 | 1269 | enum wxDataFormatId |
e3e65dac | 1270 | { |
9e2896e5 VZ |
1271 | wxDF_INVALID = 0, |
1272 | wxDF_TEXT = 1, /* CF_TEXT */ | |
1273 | wxDF_BITMAP = 2, /* CF_BITMAP */ | |
1274 | wxDF_METAFILE = 3, /* CF_METAFILEPICT */ | |
1275 | wxDF_SYLK = 4, | |
1276 | wxDF_DIF = 5, | |
1277 | wxDF_TIFF = 6, | |
1278 | wxDF_OEMTEXT = 7, /* CF_OEMTEXT */ | |
1279 | wxDF_DIB = 8, /* CF_DIB */ | |
1280 | wxDF_PALETTE = 9, | |
1281 | wxDF_PENDATA = 10, | |
1282 | wxDF_RIFF = 11, | |
1283 | wxDF_WAVE = 12, | |
1284 | wxDF_UNICODETEXT = 13, | |
1285 | wxDF_ENHMETAFILE = 14, | |
1286 | wxDF_FILENAME = 15, /* CF_HDROP */ | |
1287 | wxDF_LOCALE = 16, | |
1288 | wxDF_PRIVATE = 20, | |
1289 | wxDF_MAX | |
e3e65dac | 1290 | }; |
c801d85f | 1291 | |
83624f79 | 1292 | /* Virtual keycodes */ |
e3e65dac | 1293 | |
3f4a0c5b | 1294 | enum wxKeyCode |
83624f79 | 1295 | { |
adde8c98 RR |
1296 | WXK_BACK = 8, |
1297 | WXK_TAB = 9, | |
1298 | WXK_RETURN = 13, | |
1299 | WXK_ESCAPE = 27, | |
1300 | WXK_SPACE = 32, | |
1301 | WXK_DELETE = 127, | |
1302 | ||
1303 | WXK_START = 300, | |
1304 | WXK_LBUTTON, | |
1305 | WXK_RBUTTON, | |
1306 | WXK_CANCEL, | |
1307 | WXK_MBUTTON, | |
1308 | WXK_CLEAR, | |
1309 | WXK_SHIFT, | |
861ccde4 | 1310 | WXK_ALT, |
adde8c98 RR |
1311 | WXK_CONTROL, |
1312 | WXK_MENU, | |
1313 | WXK_PAUSE, | |
1314 | WXK_CAPITAL, | |
1315 | WXK_PRIOR, /* Page up */ | |
1316 | WXK_NEXT, /* Page down */ | |
1317 | WXK_END, | |
1318 | WXK_HOME, | |
1319 | WXK_LEFT, | |
1320 | WXK_UP, | |
1321 | WXK_RIGHT, | |
1322 | WXK_DOWN, | |
1323 | WXK_SELECT, | |
1324 | WXK_PRINT, | |
1325 | WXK_EXECUTE, | |
1326 | WXK_SNAPSHOT, | |
1327 | WXK_INSERT, | |
1328 | WXK_HELP, | |
1329 | WXK_NUMPAD0, | |
1330 | WXK_NUMPAD1, | |
1331 | WXK_NUMPAD2, | |
1332 | WXK_NUMPAD3, | |
1333 | WXK_NUMPAD4, | |
1334 | WXK_NUMPAD5, | |
1335 | WXK_NUMPAD6, | |
1336 | WXK_NUMPAD7, | |
1337 | WXK_NUMPAD8, | |
1338 | WXK_NUMPAD9, | |
1339 | WXK_MULTIPLY, | |
1340 | WXK_ADD, | |
1341 | WXK_SEPARATOR, | |
1342 | WXK_SUBTRACT, | |
1343 | WXK_DECIMAL, | |
1344 | WXK_DIVIDE, | |
1345 | WXK_F1, | |
1346 | WXK_F2, | |
1347 | WXK_F3, | |
1348 | WXK_F4, | |
1349 | WXK_F5, | |
1350 | WXK_F6, | |
1351 | WXK_F7, | |
1352 | WXK_F8, | |
1353 | WXK_F9, | |
1354 | WXK_F10, | |
1355 | WXK_F11, | |
1356 | WXK_F12, | |
1357 | WXK_F13, | |
1358 | WXK_F14, | |
1359 | WXK_F15, | |
1360 | WXK_F16, | |
1361 | WXK_F17, | |
1362 | WXK_F18, | |
1363 | WXK_F19, | |
1364 | WXK_F20, | |
1365 | WXK_F21, | |
1366 | WXK_F22, | |
1367 | WXK_F23, | |
1368 | WXK_F24, | |
1369 | WXK_NUMLOCK, | |
1370 | WXK_SCROLL, | |
1371 | WXK_PAGEUP, | |
1372 | WXK_PAGEDOWN, | |
3f480da3 | 1373 | |
adde8c98 RR |
1374 | WXK_NUMPAD_SPACE, |
1375 | WXK_NUMPAD_TAB, | |
1376 | WXK_NUMPAD_ENTER, | |
1377 | WXK_NUMPAD_F1, | |
1378 | WXK_NUMPAD_F2, | |
1379 | WXK_NUMPAD_F3, | |
1380 | WXK_NUMPAD_F4, | |
1381 | WXK_NUMPAD_HOME, | |
1382 | WXK_NUMPAD_LEFT, | |
1383 | WXK_NUMPAD_UP, | |
1384 | WXK_NUMPAD_RIGHT, | |
1385 | WXK_NUMPAD_DOWN, | |
1386 | WXK_NUMPAD_PRIOR, | |
1387 | WXK_NUMPAD_PAGEUP, | |
b78cd60d | 1388 | WXK_NUMPAD_NEXT, |
adde8c98 RR |
1389 | WXK_NUMPAD_PAGEDOWN, |
1390 | WXK_NUMPAD_END, | |
1391 | WXK_NUMPAD_BEGIN, | |
1392 | WXK_NUMPAD_INSERT, | |
1393 | WXK_NUMPAD_DELETE, | |
1394 | WXK_NUMPAD_EQUAL, | |
1395 | WXK_NUMPAD_MULTIPLY, | |
1396 | WXK_NUMPAD_ADD, | |
1397 | WXK_NUMPAD_SEPARATOR, | |
1398 | WXK_NUMPAD_SUBTRACT, | |
1399 | WXK_NUMPAD_DECIMAL, | |
1400 | WXK_NUMPAD_DIVIDE | |
c801d85f KB |
1401 | }; |
1402 | ||
e3065973 JS |
1403 | // Mapping modes (as per Windows) |
1404 | #define wxMM_TEXT 1 | |
1405 | #define wxMM_LOMETRIC 2 | |
1406 | #define wxMM_HIMETRIC 3 | |
1407 | #define wxMM_LOENGLISH 4 | |
1408 | #define wxMM_HIENGLISH 5 | |
1409 | #define wxMM_TWIPS 6 | |
1410 | #define wxMM_ISOTROPIC 7 | |
1411 | #define wxMM_ANISOTROPIC 8 | |
1412 | ||
1413 | #define wxMM_POINTS 9 | |
1414 | #define wxMM_METRIC 10 | |
1415 | ||
83624f79 | 1416 | /* Shortcut for easier dialog-unit-to-pixel conversion */ |
387a3b02 | 1417 | #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt) |
fd71308f | 1418 | |
7bcb11d3 JS |
1419 | /* Paper types */ |
1420 | typedef enum { | |
1421 | wxPAPER_NONE, // Use specific dimensions | |
1422 | wxPAPER_LETTER, // Letter, 8 1/2 by 11 inches | |
1423 | wxPAPER_LEGAL, // Legal, 8 1/2 by 14 inches | |
1424 | wxPAPER_A4, // A4 Sheet, 210 by 297 millimeters | |
1425 | wxPAPER_CSHEET, // C Sheet, 17 by 22 inches | |
1426 | wxPAPER_DSHEET, // D Sheet, 22 by 34 inches | |
1427 | wxPAPER_ESHEET, // E Sheet, 34 by 44 inches | |
1428 | wxPAPER_LETTERSMALL, // Letter Small, 8 1/2 by 11 inches | |
1429 | wxPAPER_TABLOID, // Tabloid, 11 by 17 inches | |
1430 | wxPAPER_LEDGER, // Ledger, 17 by 11 inches | |
1431 | wxPAPER_STATEMENT, // Statement, 5 1/2 by 8 1/2 inches | |
1432 | wxPAPER_EXECUTIVE, // Executive, 7 1/4 by 10 1/2 inches | |
1433 | wxPAPER_A3, // A3 sheet, 297 by 420 millimeters | |
1434 | wxPAPER_A4SMALL, // A4 small sheet, 210 by 297 millimeters | |
1435 | wxPAPER_A5, // A5 sheet, 148 by 210 millimeters | |
1436 | wxPAPER_B4, // B4 sheet, 250 by 354 millimeters | |
1437 | wxPAPER_B5, // B5 sheet, 182-by-257-millimeter paper | |
1438 | wxPAPER_FOLIO, // Folio, 8-1/2-by-13-inch paper | |
1439 | wxPAPER_QUARTO, // Quarto, 215-by-275-millimeter paper | |
1440 | wxPAPER_10X14, // 10-by-14-inch sheet | |
1441 | wxPAPER_11X17, // 11-by-17-inch sheet | |
1442 | wxPAPER_NOTE, // Note, 8 1/2 by 11 inches | |
1443 | wxPAPER_ENV_9, // #9 Envelope, 3 7/8 by 8 7/8 inches | |
1444 | wxPAPER_ENV_10, // #10 Envelope, 4 1/8 by 9 1/2 inches | |
1445 | wxPAPER_ENV_11, // #11 Envelope, 4 1/2 by 10 3/8 inches | |
1446 | wxPAPER_ENV_12, // #12 Envelope, 4 3/4 by 11 inches | |
1447 | wxPAPER_ENV_14, // #14 Envelope, 5 by 11 1/2 inches | |
1448 | wxPAPER_ENV_DL, // DL Envelope, 110 by 220 millimeters | |
1449 | wxPAPER_ENV_C5, // C5 Envelope, 162 by 229 millimeters | |
1450 | wxPAPER_ENV_C3, // C3 Envelope, 324 by 458 millimeters | |
1451 | wxPAPER_ENV_C4, // C4 Envelope, 229 by 324 millimeters | |
1452 | wxPAPER_ENV_C6, // C6 Envelope, 114 by 162 millimeters | |
1453 | wxPAPER_ENV_C65, // C65 Envelope, 114 by 229 millimeters | |
1454 | wxPAPER_ENV_B4, // B4 Envelope, 250 by 353 millimeters | |
1455 | wxPAPER_ENV_B5, // B5 Envelope, 176 by 250 millimeters | |
1456 | wxPAPER_ENV_B6, // B6 Envelope, 176 by 125 millimeters | |
1457 | wxPAPER_ENV_ITALY, // Italy Envelope, 110 by 230 millimeters | |
1458 | wxPAPER_ENV_MONARCH, // Monarch Envelope, 3 7/8 by 7 1/2 inches | |
1459 | wxPAPER_ENV_PERSONAL, // 6 3/4 Envelope, 3 5/8 by 6 1/2 inches | |
1460 | wxPAPER_FANFOLD_US, // US Std Fanfold, 14 7/8 by 11 inches | |
1461 | wxPAPER_FANFOLD_STD_GERMAN, // German Std Fanfold, 8 1/2 by 12 inches | |
1462 | wxPAPER_FANFOLD_LGL_GERMAN, // German Legal Fanfold, 8 1/2 by 13 inches | |
1463 | ||
1464 | wxPAPER_ISO_B4, // B4 (ISO) 250 x 353 mm | |
1465 | wxPAPER_JAPANESE_POSTCARD, // Japanese Postcard 100 x 148 mm | |
1466 | wxPAPER_9X11, // 9 x 11 in | |
1467 | wxPAPER_10X11, // 10 x 11 in | |
1468 | wxPAPER_15X11, // 15 x 11 in | |
1469 | wxPAPER_ENV_INVITE, // Envelope Invite 220 x 220 mm | |
1470 | wxPAPER_LETTER_EXTRA, // Letter Extra 9 \275 x 12 in | |
1471 | wxPAPER_LEGAL_EXTRA, // Legal Extra 9 \275 x 15 in | |
1472 | wxPAPER_TABLOID_EXTRA, // Tabloid Extra 11.69 x 18 in | |
1473 | wxPAPER_A4_EXTRA, // A4 Extra 9.27 x 12.69 in | |
1474 | wxPAPER_LETTER_TRANSVERSE, // Letter Transverse 8 \275 x 11 in | |
1475 | wxPAPER_A4_TRANSVERSE, // A4 Transverse 210 x 297 mm | |
1476 | wxPAPER_LETTER_EXTRA_TRANSVERSE, // Letter Extra Transverse 9\275 x 12 in | |
1477 | wxPAPER_A_PLUS, // SuperA/SuperA/A4 227 x 356 mm | |
1478 | wxPAPER_B_PLUS, // SuperB/SuperB/A3 305 x 487 mm | |
1479 | wxPAPER_LETTER_PLUS, // Letter Plus 8.5 x 12.69 in | |
1480 | wxPAPER_A4_PLUS, // A4 Plus 210 x 330 mm | |
1481 | wxPAPER_A5_TRANSVERSE, // A5 Transverse 148 x 210 mm | |
1482 | wxPAPER_B5_TRANSVERSE, // B5 (JIS) Transverse 182 x 257 mm | |
1483 | wxPAPER_A3_EXTRA, // A3 Extra 322 x 445 mm | |
1484 | wxPAPER_A5_EXTRA, // A5 Extra 174 x 235 mm | |
1485 | wxPAPER_B5_EXTRA, // B5 (ISO) Extra 201 x 276 mm | |
1486 | wxPAPER_A2, // A2 420 x 594 mm | |
1487 | wxPAPER_A3_TRANSVERSE, // A3 Transverse 297 x 420 mm | |
1488 | wxPAPER_A3_EXTRA_TRANSVERSE // A3 Extra Transverse 322 x 445 mm | |
1489 | ||
1490 | } wxPaperSize ; | |
1491 | ||
1492 | /* Printing orientation */ | |
1493 | #ifndef wxPORTRAIT | |
1494 | #define wxPORTRAIT 1 | |
1495 | #define wxLANDSCAPE 2 | |
1496 | #endif | |
1497 | ||
1498 | /* Duplex printing modes | |
1499 | */ | |
1500 | ||
1501 | typedef enum { | |
1502 | wxDUPLEX_SIMPLEX, // Non-duplex | |
1503 | wxDUPLEX_HORIZONTAL, | |
1504 | wxDUPLEX_VERTICAL | |
1505 | } wxDuplexMode; | |
1506 | ||
1507 | /* Print quality. | |
1508 | */ | |
1509 | ||
1510 | #define wxPRINT_QUALITY_HIGH -1 | |
1511 | #define wxPRINT_QUALITY_MEDIUM -2 | |
1512 | #define wxPRINT_QUALITY_LOW -3 | |
1513 | #define wxPRINT_QUALITY_DRAFT -4 | |
1514 | ||
1515 | typedef int wxPrintQuality; | |
1516 | ||
1517 | /* Print mode (currently PostScript only) | |
1518 | */ | |
1519 | ||
1520 | typedef enum { | |
1521 | wxPRINT_MODE_NONE = 0, | |
1522 | wxPRINT_MODE_PREVIEW = 1, // Preview in external application | |
1523 | wxPRINT_MODE_FILE = 2, // Print to file | |
1524 | wxPRINT_MODE_PRINTER = 3 // Send to printer | |
1525 | } wxPrintMode; | |
1526 | ||
2c41c440 KB |
1527 | // --------------------------------------------------------------------------- |
1528 | // Macro to specify "All Files" on different platforms | |
1529 | // --------------------------------------------------------------------------- | |
1530 | #if defined(__WXMSW__) | |
1531 | # define wxALL_FILES_PATTERN "*.*" | |
1532 | # define wxALL_FILES gettext_noop("All files (*.*)|*.*") | |
1533 | #else | |
1534 | # define wxALL_FILES_PATTERN "*" | |
1535 | # define wxALL_FILES gettext_noop("All files (*)|*") | |
1536 | #endif | |
329e86bf RR |
1537 | // --------------------------------------------------------------------------- |
1538 | // macros that enable wxWindows apps to be compiled in absence of the | |
1539 | // sytem headers, although some platform specific types are used in the | |
1540 | // platform specific (implementation) parts of the headers | |
1541 | // --------------------------------------------------------------------------- | |
7bcb11d3 | 1542 | |
519cb848 SC |
1543 | #ifdef __WXMAC__ |
1544 | ||
1545 | typedef WindowPtr WXHWND; | |
1546 | typedef Handle WXHANDLE; | |
1547 | typedef CIconHandle WXHICON; | |
1548 | //typedef unsigned long WXHFONT; | |
1549 | typedef MenuHandle WXHMENU; | |
1550 | //typedef unsigned long WXHPEN; | |
1551 | //typedef unsigned long WXHBRUSH; | |
1552 | //typedef unsigned long WXHPALETTE; | |
1553 | typedef CursHandle WXHCURSOR; | |
1554 | typedef RgnHandle WXHRGN; | |
1555 | //typedef unsigned long WXHACCEL; | |
1556 | //typedef unsigned long WXHINSTANCE; | |
1557 | typedef GWorldPtr WXHBITMAP; | |
1558 | //typedef unsigned long WXHIMAGELIST; | |
1559 | //typedef unsigned long WXHGLOBAL; | |
1560 | typedef GrafPtr WXHDC; | |
1561 | typedef unsigned int WXUINT; | |
1562 | typedef unsigned long WXDWORD; | |
1563 | typedef unsigned short WXWORD; | |
1564 | //typedef unsigned int WXWPARAM; | |
1565 | //typedef long WXLPARAM; | |
1566 | typedef RGBColor WXCOLORREF; | |
1567 | //typedef void * WXRGNDATA; | |
1568 | //typedef void * WXMSG; | |
1569 | //typedef unsigned long WXHCONV; | |
1570 | //typedef unsigned long WXHKEY; | |
1571 | //typedef void * WXDRAWITEMSTRUCT; | |
1572 | //typedef void * WXMEASUREITEMSTRUCT; | |
1573 | //typedef void * WXLPCREATESTRUCT; | |
1574 | typedef int (*WXFARPROC)(); | |
1575 | ||
1576 | typedef WindowPtr WXWindow; | |
1577 | typedef ControlHandle WXWidget; | |
1578 | ||
1579 | #endif | |
1580 | ||
bac507e0 DW |
1581 | #if defined(__WXMSW__) || defined(__WXPM__) |
1582 | // Stand-ins for Windows types or OS/2, to avoid #including all of windows.h or os2.h | |
c801d85f KB |
1583 | typedef unsigned long WXHWND; |
1584 | typedef unsigned long WXHANDLE; | |
1585 | typedef unsigned long WXHICON; | |
1586 | typedef unsigned long WXHFONT; | |
1587 | typedef unsigned long WXHMENU; | |
1588 | typedef unsigned long WXHPEN; | |
1589 | typedef unsigned long WXHBRUSH; | |
1590 | typedef unsigned long WXHPALETTE; | |
1591 | typedef unsigned long WXHCURSOR; | |
1592 | typedef unsigned long WXHRGN; | |
57a7b7c1 | 1593 | typedef unsigned long WXHACCEL; |
c801d85f KB |
1594 | typedef unsigned long WXHINSTANCE; |
1595 | typedef unsigned long WXHBITMAP; | |
1596 | typedef unsigned long WXHIMAGELIST; | |
1597 | typedef unsigned long WXHGLOBAL; | |
1598 | typedef unsigned long WXHDC; | |
1599 | typedef unsigned int WXUINT; | |
1600 | typedef unsigned long WXDWORD; | |
1601 | typedef unsigned short WXWORD; | |
45fcbf3b | 1602 | #ifdef __WXMSW__ |
c801d85f KB |
1603 | typedef unsigned int WXWPARAM; |
1604 | typedef long WXLPARAM; | |
45fcbf3b DW |
1605 | #else |
1606 | # define WXWPARAM MPARAM | |
1607 | # define WXLPARAM MPARAM | |
86de7616 DW |
1608 | # define RECT RECTL |
1609 | # define LOGFONT FATTRS | |
11e59d47 DW |
1610 | # define LOWORD SHORT1FROMMP |
1611 | # define HIWORD SHORT2FROMMP | |
16a12a3d | 1612 | #endif // __WXMSW__ |
c801d85f | 1613 | typedef unsigned long WXCOLORREF; |
c801d85f KB |
1614 | typedef void * WXRGNDATA; |
1615 | typedef void * WXMSG; | |
1616 | typedef unsigned long WXHCONV; | |
0d8d91a9 | 1617 | typedef unsigned long WXHKEY; |
ef366d32 | 1618 | typedef unsigned long WXHTREEITEM; |
a23fd0e1 | 1619 | |
c801d85f KB |
1620 | typedef void * WXDRAWITEMSTRUCT; |
1621 | typedef void * WXMEASUREITEMSTRUCT; | |
1622 | typedef void * WXLPCREATESTRUCT; | |
a23fd0e1 | 1623 | |
54da4255 DW |
1624 | #if defined(__WXPM__) |
1625 | typedef unsigned long WXMPARAM; | |
1626 | typedef unsigned long WXMSGID; | |
1627 | typedef void* WXRESULT; | |
1628 | typedef int (*WXFARPROC)(); | |
1629 | // some windows handles not defined by PM | |
16a12a3d | 1630 | typedef unsigned long COLORREF; |
54da4255 DW |
1631 | typedef unsigned long HANDLE; |
1632 | typedef unsigned long HICON; | |
1633 | typedef unsigned long HFONT; | |
1634 | typedef unsigned long HMENU; | |
1635 | typedef unsigned long HPEN; | |
1636 | typedef unsigned long HBRUSH; | |
1637 | typedef unsigned long HPALETTE; | |
1638 | typedef unsigned long HCURSOR; | |
1639 | typedef unsigned long HINSTANCE; | |
1640 | typedef unsigned long HIMAGELIST; | |
1641 | typedef unsigned long HGLOBAL; | |
1642 | typedef unsigned long DWORD; | |
1643 | typedef unsigned short WORD; | |
1644 | #endif | |
1645 | ||
5ea105e0 | 1646 | #if defined(__GNUWIN32__) || defined(__WXWINE__) |
a23fd0e1 | 1647 | typedef int (*WXFARPROC)(); |
1e6d9499 | 1648 | #elif defined(__WIN32__) |
a23fd0e1 | 1649 | typedef int (__stdcall *WXFARPROC)(); |
1e6d9499 | 1650 | #else |
a23fd0e1 | 1651 | typedef int (*WXFARPROC)(); |
14b72bf5 | 1652 | #endif |
c801d85f | 1653 | |
f03fc89f | 1654 | typedef WXHWND WXWidget; |
8fb3a512 JS |
1655 | |
1656 | #if defined(__BORLANDC__) && !defined(__WIN32__) | |
1657 | #ifndef LPTSTR | |
1658 | #define LPTSTR LPSTR | |
1659 | #endif | |
1660 | #ifndef LPCTSTR | |
1661 | #define LPCTSTR LPSTR | |
1662 | #endif | |
1663 | #endif | |
1664 | ||
f03fc89f | 1665 | #endif // MSW |
c801d85f | 1666 | |
589f0e3e | 1667 | #ifdef __WXMOTIF__ |
83624f79 | 1668 | /* Stand-ins for X/Xt/Motif types */ |
589f0e3e JS |
1669 | typedef void* WXWindow; |
1670 | typedef void* WXWidget; | |
1671 | typedef void* WXAppContext; | |
46ccb510 | 1672 | typedef void* WXColormap; |
589f0e3e JS |
1673 | typedef void WXDisplay; |
1674 | typedef void WXEvent; | |
46ccb510 | 1675 | typedef void* WXCursor; |
50414e24 | 1676 | typedef void* WXPixmap; |
dfc54541 JS |
1677 | typedef void* WXFontStructPtr; |
1678 | typedef void* WXGC; | |
1679 | typedef void* WXRegion; | |
e97f20a0 | 1680 | typedef void* WXFont; |
f97c9854 JS |
1681 | typedef void* WXImage; |
1682 | typedef void* WXCursor; | |
1683 | typedef void* WXFontList; | |
da175b2c RR |
1684 | |
1685 | typedef unsigned long Atom; /* this might fail on a few architectures */ | |
1686 | ||
f03fc89f | 1687 | #endif // Motif |
589f0e3e | 1688 | |
83624f79 RR |
1689 | #ifdef __WXGTK__ |
1690 | /* Stand-ins for GLIB types */ | |
1691 | typedef int gint; | |
1692 | typedef unsigned guint; | |
1693 | typedef unsigned long gulong; | |
1694 | typedef void* gpointer; | |
953704c1 | 1695 | typedef struct _GSList GSList; |
83624f79 RR |
1696 | |
1697 | /* Stand-ins for GDK types */ | |
1698 | typedef gulong GdkAtom; | |
1699 | typedef struct _GdkColor GdkColor; | |
1700 | typedef struct _GdkColormap GdkColormap; | |
1701 | typedef struct _GdkFont GdkFont; | |
1702 | typedef struct _GdkGC GdkGC; | |
1703 | typedef struct _GdkWindow GdkWindow; | |
1704 | typedef struct _GdkWindow GdkBitmap; | |
1705 | typedef struct _GdkWindow GdkPixmap; | |
1706 | typedef struct _GdkCursor GdkCursor; | |
1707 | typedef struct _GdkRegion GdkRegion; | |
8a126fcc | 1708 | typedef struct _GdkDragContext GdkDragContext; |
83624f79 RR |
1709 | |
1710 | /* Stand-ins for GTK types */ | |
8a126fcc RR |
1711 | typedef struct _GtkWidget GtkWidget; |
1712 | typedef struct _GtkStyle GtkStyle; | |
1713 | typedef struct _GtkAdjustment GtkAdjustment; | |
1714 | typedef struct _GtkList GtkList; | |
1715 | typedef struct _GtkToolbar GtkToolbar; | |
1716 | typedef struct _GtkTooltips GtkTooltips; | |
1717 | typedef struct _GtkNotebook GtkNotebook; | |
1718 | typedef struct _GtkNotebookPage GtkNotebookPage; | |
1719 | typedef struct _GtkAccelGroup GtkAccelGroup; | |
1720 | typedef struct _GtkItemFactory GtkItemFactory; | |
1721 | typedef struct _GtkSelectionData GtkSelectionData; | |
ad5c34f3 | 1722 | |
f03fc89f VZ |
1723 | typedef GtkWidget *WXWidget; |
1724 | #endif // GTK | |
ad5c34f3 JS |
1725 | |
1726 | // This is required because of clashing macros in windows.h, which may be | |
1727 | // included before or after wxWindows classes, and therefore must be | |
1728 | // disabled here before any significant wxWindows headers are included. | |
1729 | #ifdef __WXMSW__ | |
1730 | #ifdef GetClassInfo | |
1731 | #undef GetClassInfo | |
1732 | #endif | |
1733 | ||
1734 | #ifdef GetClassName | |
1735 | #undef GetClassName | |
1736 | #endif | |
1737 | ||
1738 | #ifdef DrawText | |
1739 | #undef DrawText | |
1740 | #endif | |
1741 | ||
1742 | #ifdef GetCharWidth | |
1743 | #undef GetCharWidth | |
1744 | #endif | |
1745 | ||
1746 | #ifdef StartDoc | |
1747 | #undef StartDoc | |
1748 | #endif | |
1749 | ||
1750 | #ifdef FindWindow | |
1751 | #undef FindWindow | |
1752 | #endif | |
1753 | ||
1754 | #ifdef FindResource | |
1755 | #undef FindResource | |
1756 | #endif | |
83624f79 | 1757 | #endif |
ad5c34f3 | 1758 | // __WXMSW__ |
83624f79 | 1759 | |
a23fd0e1 VZ |
1760 | // --------------------------------------------------------------------------- |
1761 | // macro to define a class without copy ctor nor assignment operator | |
1762 | // --------------------------------------------------------------------------- | |
1763 | ||
1764 | #define DECLARE_NO_COPY_CLASS(classname) \ | |
1765 | private: \ | |
1766 | classname(const classname&); \ | |
1767 | classname& operator=(const classname&) | |
1768 | ||
c801d85f | 1769 | #endif |
34138703 | 1770 | // _WX_DEFS_H_ |