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