1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Declarations/definitions common to all wx source files
4 // Author: Julian Smart and others
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "defs.h"
20 // needed to handle strings with xgettext:
22 # define gettext_noop(x) x
25 // ----------------------------------------------------------------------------
26 // compiler and OS identification
27 // ----------------------------------------------------------------------------
30 #if defined(__unix) || defined(__unix__) || defined(____SVR4____) || \
31 defined(__LINUX__) || defined(__sgi ) || \
32 defined(__hpux) || defined(sun) || defined(__SUN__) || defined(_AIX) || \
37 // Helps SGI compilation, apparently
40 #define __need_wchar_t
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
48 #if defined(sun) || defined(__SUN__)
56 #elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) )
58 #elif defined(__OS2__)
59 #if defined(__IBMCPP__)
60 #define __VISAGEAVER__ __IBMCPP__
69 // Place other OS/2 compiler environment defines here
70 #define LINKAGEMODE _Optlink
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__)
79 #define __VISUALC__ _MSC_VER
80 #elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
82 #elif defined(__WATCOMC__)
89 // LINKAGEMODE mode is empty for everyting except OS/2
94 // suppress some Visual C++ warnings
96 # pragma warning(disable:4201) // nonstandard extension used: nameless struct/union
97 # pragma warning(disable:4244) // conversion from double to float
98 # pragma warning(disable:4100) // unreferenced formal parameter
99 # pragma warning(disable:4511) // copy ctor couldn't be generated
100 # pragma warning(disable:4512) // operator=() couldn't be generated
101 # pragma warning(disable:4699) // Using precompiled header
102 # pragma warning(disable:4134) // conversion between pointers to members of same class
104 # pragma warning(disable:4135) // conversion between different integral types
105 # pragma warning(disable:4769) // assignment of near pointer to long integer
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
109 #endif // __VISUALC__
111 // suppress some Salford C++ warnings
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
118 #endif // __SALFORDC__
120 #if defined(__VISUALC__) && !defined(WIN32)
121 // VC1.5 does not have LPTSTR type
123 #define LPCTSTR LPCSTR
126 // Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files,
127 // so define it ourselves
132 // Resolves linking problems under HP-UX
133 #if defined(__HPUX__) && defined(__GNUG__)
134 #define va_list __gnuc_va_list
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)
140 #if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
141 #ifndef wxUSE_NORLANDER_HEADERS
142 # define wxUSE_NORLANDER_HEADERS 1
147 //////////////////////////////////////////////////////////////////////////////////
148 // Currently Only MS-Windows/NT, XView and Motif are supported
150 #if defined(__HPUX__) && !defined(__WXGTK__)
153 #endif // __WXMOTIF__
156 #if defined(__WXMOTIF__)
161 // wxWindows checks for WIN32, not __WIN32__
162 #if ((defined(WIN32) || defined(__NT__)) && !defined(__WIN32__) && !defined(__WXSTUBS__))
182 #if !defined(__WIN95__) && (WINVER >= 0x0400)
186 #if defined(TWIN32) && !defined(__TWIN32__)
192 // Make sure the environment is set correctly
193 #if defined(__WXMSW__) && defined(__X__)
194 #error "Target can't be both X and Windows"
195 #elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \
196 !defined(__WXPM__) && !defined(__WXMAC__) && !defined(__X__) && \
197 !defined(__WXQT__) && !defined(__WXSTUBS__) && wxUSE_GUI
198 #error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXPM__|__WXSTUBS__]"
201 // ----------------------------------------------------------------------------
203 // ----------------------------------------------------------------------------
207 #include "wx/setup.h"
209 // just in case they were defined in setup.h
213 // this has to be done after including setup.h which might
214 // define __HPUX__ 1 itself
215 #if defined(__hpux) && !defined(__HPUX__)
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__)
225 #include "wx/version.h"
227 // ----------------------------------------------------------------------------
228 // compatibility defines
229 // ----------------------------------------------------------------------------
231 // possibility to build non GUI apps is new, so don't burden ourselves with
232 // compatibility code
234 #undef WXWIN_COMPATIBILITY_2
235 #define WXWIN_COMPATIBILITY_2 0
238 // ============================================================================
239 // non portable C++ features
240 // ============================================================================
242 // ----------------------------------------------------------------------------
243 // check for native bool type and TRUE/FALSE constants
244 // ----------------------------------------------------------------------------
246 // define boolean constants if not done yet
255 // Add more tests here for Windows compilers that already define bool
256 // (under Unix, configure tests for this)
258 #if defined( __MWERKS__ )
259 #if (__MWERKS__ >= 0x1000) && __option(bool)
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
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
;
272 #elif defined(__VISUALC__) && (__VISUALC__ > 1020)
273 // VC++ supports bool since 4.2
275 #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)
276 // Borland 5.0+ supports bool
278 #elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
279 // Watcom 11+ supports bool
281 #elif defined(__GNUWIN32__)
282 // Cygwin supports bool
284 #elif defined(__VISAGECPP__)
286 typedef unsigned long bool;
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
296 typedef unsigned int bool;
299 typedef short int WXTYPE
;
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.
306 typedef int wxWindowID
;
308 // Macro to cut down on compiler warnings.
309 #if REMOVE_UNUSED_ARG
310 #define WXUNUSED(identifier) /* identifier */
311 #else // stupid, broken compiler
312 #define WXUNUSED(identifier) identifier
315 // ----------------------------------------------------------------------------
316 // portable calling conventions macros
317 // ----------------------------------------------------------------------------
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__)
322 #if defined(__MINGW32__) || defined(__GNUWIN32__)
323 #define wxCALLBACK __attribute__((stdcall))
325 // both VC++ and Borland understand this
326 #define wxCALLBACK _stdcall
329 // no stdcall under Unix
333 // callling convention for the qsort(3) callback
335 #if defined(__VISUALC__)
336 #define wxCMPFUNC_CONV _cdecl
337 #elif defined(__VISAGECPP__)
338 #define wxCMPFUNC_CONV _Optlink
340 #define wxCMPFUNC_CONV
344 #define CMPFUNC_CONV wxCMPFUNC_CONV
346 // ----------------------------------------------------------------------------
347 // Making or using wxWindows as a Windows DLL
348 // ----------------------------------------------------------------------------
350 #if defined(__WXMSW__)
352 // _declspec works in BC++ 5 and later, as well as VC++
353 #if defined(__VISUALC__) || defined(__BORLANDC__)
356 # define WXDLLEXPORT _declspec( dllexport )
357 # define WXDLLEXPORT_DATA(type) _declspec( dllexport ) type
358 # define WXDLLEXPORT_CTORFN
359 # elif defined(WXUSINGDLL)
360 # define WXDLLEXPORT _declspec( dllimport )
361 # define WXDLLEXPORT_DATA(type) _declspec( dllimport ) type
362 # define WXDLLEXPORT_CTORFN
365 # define WXDLLEXPORT_DATA(type) type
366 # define WXDLLEXPORT_CTORFN
369 #elif defined(__WXPM__)
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
381 # define WXDLLEXPORT_DATA(type) type
382 # define WXDLLEXPORT_CTORFN
387 # define WXDLLEXPORT_DATA(type) type
388 # define WXDLLEXPORT_CTORFN
393 # define WXDLLEXPORT_DATA(type) type
394 # define WXDLLEXPORT_CTORFN
397 // For ostream, istream ofstream
398 #if defined(__BORLANDC__) && defined( _RTLDLL )
399 # define WXDLLIMPORT __import
404 class WXDLLEXPORT wxObject
;
405 class WXDLLEXPORT wxEvent
;
407 /** symbolic constant used by all Find()-like functions returning positive
408 integer on success as failure indicator */
409 #define wxNOT_FOUND (-1)
411 // ----------------------------------------------------------------------------
412 /** @name Very common macros */
413 // ----------------------------------------------------------------------------
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)
420 #if defined(__SGI_CC__)
421 // Okay this is bad styling, but the native SGI compiler is very picky, it
422 // wont let you compare/assign between a NULL (void *) and another pointer
423 // type. To be really clean we'd need to pass in another argument, the type
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)
429 #define wxDELETE(p) if ( (p) ) { delete (p); p = 0L; }
431 #define wxDELETE(p) if ( (p) != NULL ) { delete p; p = NULL; }
432 #endif /* __SGI__CC__ */
434 // delete an array and NULL it (see comments above)
435 #if defined(__SGI_CC__)
436 // see above comment.
437 #define wxDELETEA(p) if ( (p) ) { delete [] (p); p = 0L; }
439 #define wxDELETEA(p) if ( ((void *) (p)) != NULL ) { delete [] p; p = NULL; }
440 #endif /* __SGI__CC__ */
442 /// size of statically declared array
443 #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0]))
445 // Use of these suppresses some compiler warnings
446 WXDLLEXPORT_DATA(extern const bool) wxTrue
;
447 WXDLLEXPORT_DATA(extern const bool) wxFalse
;
449 // ----------------------------------------------------------------------------
450 // compiler specific settings
451 // ----------------------------------------------------------------------------
453 // to allow compiling with warning level 4 under Microsoft Visual C++ some
454 // warnings just must be disabled
456 #pragma warning(disable: 4514) // unreferenced inline func has been removed
458 you might be tempted to disable this one also: triggered by CHECK and FAIL
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?
462 #pragma warning(disable: 4127) // conditional expression is constant
465 #if defined(__MWERKS__)
469 #define except(x) catch(...)
472 // where should i put this? we need to make sure of this as it breaks
473 // the <iostream> code.
474 #if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
480 // Callback function type definition
481 typedef void (*wxFunction
) (wxObject
&, wxEvent
&);
483 // ----------------------------------------------------------------------------
484 // OS mnemonics -- Identify the running OS (useful for Windows)
485 // ----------------------------------------------------------------------------
487 // Not all platforms are currently available or supported
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
496 wxMACINTOSH
, // Apple System 7 and 8
499 wxGTK_WIN32
, // GTK on Win32
500 wxGTK_OS2
, // GTK on OS/2
501 wxGTK_BEOS
, // GTK on BeOS
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
513 wxMGL_WIN32
, // MGL on Win32
514 wxMGL_OS2
, // MGL on OS/2
515 wxWINDOWS_OS2
// Native OS/2 PM
518 // ----------------------------------------------------------------------------
519 // standard wxWindows types
520 // ----------------------------------------------------------------------------
522 // the type for screen and DC coordinates
524 #if wxUSE_COMPATIBLE_COORD_TYPES
525 // to ensure compatibility with 2.0, we must use long
527 #else // !wxUSE_COMPATIBLE_COORD_TYPES
529 // under Win16, int is too small, so use long to allow for bigger
531 typedef long wxCoord
;
533 // other platforms we support have at least 32bit int - quite enough
535 #endif // Win16/!Win16
536 #endif // wxUSE_COMPATIBLE_COORD_TYPES/!wxUSE_COMPATIBLE_COORD_TYPES
538 // fixed length types
540 #define wxInt8 char signed
541 #define wxUint8 char unsigned
544 #define wxInt16 int signed
545 #define wxUint16 int unsigned
546 #define wxInt32 long signed
547 #define wxUint32 long unsigned
551 #define wxInt16 short signed
552 #define wxUint16 short unsigned
553 #define wxInt32 int signed
554 #define wxUint32 int unsigned
558 #define wxInt16 short signed
559 #define wxUint16 short unsigned
560 #define wxInt32 int signed
561 #define wxUint32 int unsigned
565 #define wxInt16 short signed
566 #define wxUint16 short unsigned
567 #define wxInt32 int signed
568 #define wxUint32 int unsigned
571 #if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXOS2__)
572 #if defined(SIZEOF_INT)
573 /* well, this shouldn't happen... */
574 #define wxInt16 short signed
575 #define wxUint16 short unsigned
576 #define wxInt32 int signed
577 #define wxUint32 int unsigned
579 #define wxInt16 short signed
580 #define wxUint16 short unsigned
581 #define wxInt32 int signed
582 #define wxUint32 int unsigned
586 #define wxByte wxUint8
587 #define wxWord wxUint16
589 // ----------------------------------------------------------------------------
590 // byte ordering related definition and macros
591 // ----------------------------------------------------------------------------
595 #define wxBIG_ENDIAN 4321
596 #define wxLITTLE_ENDIAN 1234
597 #define wxPDP_ENDIAN 3412
599 #ifdef WORDS_BIGENDIAN
600 #define wxBYTE_ORDER wxBIG_ENDIAN
602 #define wxBYTE_ORDER wxLITTLE_ENDIAN
607 #define wxUINT16_SWAP_ALWAYS(val) \
609 (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \
610 (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8)))
612 #define wxINT16_SWAP_ALWAYS(val) \
614 (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \
615 (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8)))
617 #define wxUINT32_SWAP_ALWAYS(val) \
619 (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
620 (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
621 (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
622 (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
624 #define wxINT32_SWAP_ALWAYS(val) \
626 (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
627 (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
628 (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
629 (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
631 // machine specific byte swapping
633 #ifdef WORDS_BIGENDIAN
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)
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)
653 // ----------------------------------------------------------------------------
655 // ----------------------------------------------------------------------------
657 enum wxGeometryCentre
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
671 wxHORIZONTAL
= 0x0004,
674 wxBOTH
= (wxVERTICAL
| wxHORIZONTAL
)
692 wxALL
= (wxUP
| wxDOWN
| wxRIGHT
| wxLEFT
)
697 wxALIGN_NOT
= 0x0000,
698 wxALIGN_CENTER
= 0x0100,
699 wxALIGN_CENTRE
= wxALIGN_CENTER
,
700 wxALIGN_LEFT
= wxALIGN_NOT
,
701 wxALIGN_TOP
= wxALIGN_NOT
,
702 wxALIGN_RIGHT
= 0x0200,
703 wxALIGN_BOTTOM
= 0x0400
708 wxSTRETCH_NOT
= 0x0000,
714 // ----------------------------------------------------------------------------
715 // Window style flags
716 // ----------------------------------------------------------------------------
719 * Values are chosen so they can be |'ed in a bit list.
720 * Some styles are used across more than one group,
721 * so the values mustn't clash with others in the group.
722 * Otherwise, numbers can be reused across groups.
725 * Window (cross-group) styles now take up the first half
726 * of the flag, and control-specific styles the
732 * Window (Frame/dialog/subwindow/panel item) style flags
734 #define wxVSCROLL 0x80000000
735 #define wxHSCROLL 0x40000000
736 #define wxCAPTION 0x20000000
739 #define wxDOUBLE_BORDER 0x10000000
740 #define wxSUNKEN_BORDER 0x08000000
741 #define wxRAISED_BORDER 0x04000000
742 #define wxBORDER 0x02000000
743 #define wxSIMPLE_BORDER wxBORDER
744 #define wxSTATIC_BORDER 0x01000000
745 #define wxTRANSPARENT_WINDOW 0x00100000
746 #define wxNO_BORDER 0x00200000
748 #define wxUSER_COLOURS 0x00800000
749 // Override CTL3D etc. control colour processing to
750 // allow own background colour
751 // OBSOLETE - use wxNO_3D instead
752 #define wxNO_3D 0x00800000
753 // Override CTL3D or native 3D styles for children
754 #define wxCLIP_CHILDREN 0x00400000
755 // Clip children when painting, which reduces flicker in
756 // e.g. frames and splitter windows, but can't be used in
757 // a panel where a static box must be 'transparent' (panel
758 // paints the background for it)
760 // Add this style to a panel to get tab traversal working
761 // outside of dialogs.
762 #define wxTAB_TRAVERSAL 0x00080000
764 // Add this style if the control wants to get all keyboard messages (under
765 // Windows, it won't normally get the dialog navigation key events)
766 #define wxWANTS_CHARS 0x00040000
768 // Make window retained (mostly Motif, I think)
769 #define wxRETAINED 0x00020000
770 #define wxBACKINGSTORE wxRETAINED
772 // don't invalidate the whole window (resulting in a PAINT event) when the
773 // window is resized (currently, makes sense for wxMSW only)
774 #define wxNO_FULL_REPAINT_ON_RESIZE 0x00010000
776 * wxFrame/wxDialog style flags
778 #define wxSTAY_ON_TOP 0x8000
779 #define wxICONIZE 0x4000
780 #define wxMINIMIZE wxICONIZE
781 #define wxMAXIMIZE 0x2000
782 #define wxTHICK_FRAME 0x1000
783 #define wxSYSTEM_MENU 0x0800
784 #define wxMINIMIZE_BOX 0x0400
785 #define wxMAXIMIZE_BOX 0x0200
786 #define wxTINY_CAPTION_HORIZ 0x0100
787 #define wxTINY_CAPTION_VERT 0x0080
788 #define wxRESIZE_BOX wxMAXIMIZE_BOX
789 #define wxRESIZE_BORDER 0x0040
790 #define wxDIALOG_MODAL 0x0020
791 #define wxDIALOG_MODELESS 0x0000
792 // Add for normal Windows frame behaviour
793 #define wxFRAME_FLOAT_ON_PARENT 0x0020
796 #if WXWIN_COMPATIBILITY
797 #define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE
800 #define wxDEFAULT_FRAME_STYLE \
801 (wxSYSTEM_MENU | wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN)
804 # define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU|wxCAPTION|wxTHICK_FRAME)
806 // Under Unix, the dialogs don't have a system menu. Specifying
807 // wxSYSTEM_MENU here, will make a close button appear.
808 # define wxDEFAULT_DIALOG_STYLE (wxCAPTION)
812 * wxExtDialog style flags
814 #define wxED_CLIENT_MARGIN 0x0004
815 #define wxED_BUTTONS_BOTTOM 0x0000 // has no effect
816 #define wxED_BUTTONS_RIGHT 0x0002
817 #define wxED_STATIC_LINE 0x0001
819 #if defined(__WXMSW__) || defined(__WXMAC__)
820 # define wxEXT_DIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxED_CLIENT_MARGIN)
822 # define wxEXT_DIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxED_CLIENT_MARGIN|wxED_STATIC_LINE)
826 * wxToolBar style flags
828 #define wxTB_3DBUTTONS 0x8000
829 #define wxTB_HORIZONTAL 0x0002
830 #define wxTB_VERTICAL 0x0004
831 // Flatbar/Coolbar under Win98/ GTK 1.2
832 #define wxTB_FLAT 0x0008
833 // use native docking under GTK
834 #define wxTB_DOCKABLE 0x0010
837 * wxMenuBar style flags
839 // use native docking
840 #define wxMB_DOCKABLE 0x0001
845 #define wxMENU_TEAROFF 0x0001
848 * Apply to all panel items
850 #define wxCOLOURED 0x0800
851 #define wxFIXED_LENGTH 0x0400
854 * Styles for wxListBox
856 #define wxLB_SORT 0x0010
857 #define wxLB_SINGLE 0x0020
858 #define wxLB_MULTIPLE 0x0040
859 #define wxLB_EXTENDED 0x0080
860 // wxLB_OWNERDRAW is Windows-only
861 #define wxLB_OWNERDRAW 0x0100
862 #define wxLB_NEEDED_SB 0x0200
863 #define wxLB_ALWAYS_SB 0x0400
864 #define wxLB_HSCROLL wxHSCROLL
867 * wxTextCtrl style flags
869 #define wxPROCESS_ENTER 0x0004
870 #define wxPASSWORD 0x0008
871 #define wxTE_PROCESS_ENTER wxPROCESS_ENTER
872 #define wxTE_PASSWORD wxPASSWORD
873 #define wxTE_READONLY 0x0010
874 #define wxTE_MULTILINE 0x0020
875 #define wxTE_PROCESS_TAB 0x0040
876 // this style means to use RICHEDIT control and does something only under wxMSW
877 // and Win32 and is silently ignored under all other platforms
878 #define wxTE_RICH 0x0080
879 #define wxTE_NO_VSCROLL 0x0100
880 #define wxTE_AUTO_SCROLL 0x0200
883 * wxComboBox style flags
885 #define wxCB_SIMPLE 0x0004
886 #define wxCB_SORT 0x0008
887 #define wxCB_READONLY 0x0010
888 #define wxCB_DROPDOWN 0x0020
891 * wxRadioBox style flags
893 // New, more intuitive names to specify majorDim argument
894 #define wxRA_SPECIFY_COLS wxHORIZONTAL
895 #define wxRA_SPECIFY_ROWS wxVERTICAL
896 // Old names for compatibility
897 #define wxRA_HORIZONTAL wxHORIZONTAL
898 #define wxRA_VERTICAL wxVERTICAL
901 * wxRadioButton style flag
903 #define wxRB_GROUP 0x0004
908 #define wxGA_HORIZONTAL wxHORIZONTAL
909 #define wxGA_VERTICAL wxVERTICAL
910 #define wxGA_PROGRESSBAR 0x0010
912 #define wxGA_SMOOTH 0x0020
917 #define wxSL_HORIZONTAL wxHORIZONTAL // 4
918 #define wxSL_VERTICAL wxVERTICAL // 8
919 // The next one is obsolete - use scroll events instead
920 #define wxSL_NOTIFY_DRAG 0x0000
921 #define wxSL_AUTOTICKS 0x0010
922 // #define wxSL_MANUALTICKS 0x0010
923 #define wxSL_LABELS 0x0020
924 #define wxSL_LEFT 0x0040
925 #define wxSL_TOP 0x0080
926 #define wxSL_RIGHT 0x0100
927 #define wxSL_BOTTOM 0x0200
928 #define wxSL_BOTH 0x0400
929 #define wxSL_SELRANGE 0x0800
934 #define wxSB_HORIZONTAL wxHORIZONTAL
935 #define wxSB_VERTICAL wxVERTICAL
938 * wxButton flags (Win32 only)
940 #define wxBU_AUTODRAW 0x0004
941 #define wxBU_NOAUTODRAW 0x0000
946 #define wxTR_HAS_BUTTONS 0x0004
947 #define wxTR_EDIT_LABELS 0x0008
948 #define wxTR_LINES_AT_ROOT 0x0010
950 #define wxTR_SINGLE 0x0000
951 #define wxTR_MULTIPLE 0x0020
952 #define wxTR_EXTENDED 0x0040
953 #define wxTR_HAS_VARIABLE_ROW_HEIGHT 0x0080
958 #define wxLC_ICON 0x0004
959 #define wxLC_SMALL_ICON 0x0008
960 #define wxLC_LIST 0x0010
961 #define wxLC_REPORT 0x0020
962 #define wxLC_ALIGN_TOP 0x0040
963 #define wxLC_ALIGN_LEFT 0x0080
964 #define wxLC_AUTOARRANGE 0x0100
965 #define wxLC_USER_TEXT 0x0200
966 #define wxLC_EDIT_LABELS 0x0400
967 #define wxLC_NO_HEADER 0x0800
968 #define wxLC_NO_SORT_HEADER 0x1000
969 #define wxLC_SINGLE_SEL 0x2000
970 #define wxLC_SORT_ASCENDING 0x4000
971 #define wxLC_SORT_DESCENDING 0x8000
973 #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
974 #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
975 #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)
977 // Omitted because (a) too much detail (b) not enough style flags
978 // #define wxLC_NO_SCROLL
979 // #define wxLC_NO_LABEL_WRAP
980 // #define wxLC_OWNERDRAW_FIXED
981 // #define wxLC_SHOW_SEL_ALWAYS
986 #define wxSP_HORIZONTAL wxHORIZONTAL // 4
987 #define wxSP_VERTICAL wxVERTICAL // 8
988 #define wxSP_ARROW_KEYS 0x0010
989 #define wxSP_WRAP 0x0020
992 * wxSplitterWindow flags
994 #define wxSP_NOBORDER 0x0000
995 #define wxSP_3D 0x0010
996 #define wxSP_BORDER 0x0020
997 #define wxSP_PERMIT_UNSPLIT 0x0040
998 #define wxSP_LIVE_UPDATE 0x0080
1001 * wxFrame extra flags
1003 // No title on taskbar
1004 #define wxFRAME_TOOL_WINDOW 0x0004
1009 #define wxTC_MULTILINE 0x0000
1010 #define wxTC_RIGHTJUSTIFY 0x0010
1011 #define wxTC_FIXEDWIDTH 0x0020
1012 #define wxTC_OWNERDRAW 0x0040
1017 #define wxNB_FIXEDWIDTH 0x0010
1018 #define wxNB_LEFT 0x0020
1019 #define wxNB_RIGHT 0x0040
1020 #define wxNB_BOTTOM 0x0080
1023 * wxStatusBar95 flags
1025 #define wxST_SIZEGRIP 0x0010
1028 * wxStaticLine flags
1030 #define wxLI_HORIZONTAL wxHORIZONTAL
1031 #define wxLI_VERTICAL wxVERTICAL
1034 * wxProgressDialog flags
1036 #define wxPD_CAN_ABORT 0x0001
1037 #define wxPD_APP_MODAL 0x0002
1038 #define wxPD_AUTO_HIDE 0x0004
1039 #define wxPD_ELAPSED_TIME 0x0008
1040 #define wxPD_ESTIMATED_TIME 0x0010
1041 #define wxPD_REMAINING_TIME 0x0020
1044 * wxHtmlWindow flags
1046 #define wxHW_SCROLLBAR_NEVER 0x0002
1047 #define wxHW_SCROLLBAR_AUTO 0x0004
1050 * extended dialog specifiers. these values are stored in a different
1051 * flag and thus do not overlap with other style flags. note that these
1052 * values do not correspond to the return values of the dialogs (for
1053 * those values, look at the wxID_XXX defines).
1056 // wxCENTRE already defined as 0x00000001
1057 #define wxOK 0x00000004
1058 #define wxYES_NO 0x00000008
1059 #define wxCANCEL 0x00000010
1060 #define wxYES 0x00000020
1061 #define wxNO 0x00000040
1062 #define wxNO_DEFAULT 0x00000080
1063 #define wxYES_DEFAULT 0x00000000 // has no effect
1065 #define wxICON_EXCLAMATION 0x00000100
1066 #define wxICON_HAND 0x00000200
1067 #define wxICON_WARNING wxICON_EXCLAMATION
1068 #define wxICON_ERROR wxICON_HAND
1069 #define wxICON_QUESTION 0x00000400
1070 #define wxICON_INFORMATION 0x00000800
1071 #define wxICON_STOP wxICON_HAND
1072 #define wxICON_ASTERISK wxICON_INFORMATION
1073 #define wxICON_MASK (0x00000100|0x00000200|0x00000400|0x00000800)
1075 #define wxFORWARD 0x00001000
1076 #define wxBACKWARD 0x00002000
1077 #define wxRESET 0x00004000
1078 #define wxHELP 0x00008000
1079 #define wxMORE 0x00010000
1080 #define wxSETUP 0x00020000
1082 // ----------------------------------------------------------------------------
1084 // ----------------------------------------------------------------------------
1086 // Standard menu IDs
1087 #define wxID_LOWEST 4999
1089 #define wxID_OPEN 5000
1090 #define wxID_CLOSE 5001
1091 #define wxID_NEW 5002
1092 #define wxID_SAVE 5003
1093 #define wxID_SAVEAS 5004
1094 #define wxID_REVERT 5005
1095 #define wxID_EXIT 5006
1096 #define wxID_UNDO 5007
1097 #define wxID_REDO 5008
1098 #define wxID_HELP 5009
1099 #define wxID_PRINT 5010
1100 #define wxID_PRINT_SETUP 5011
1101 #define wxID_PREVIEW 5012
1102 #define wxID_ABOUT 5013
1103 #define wxID_HELP_CONTENTS 5014
1104 #define wxID_HELP_COMMANDS 5015
1105 #define wxID_HELP_PROCEDURES 5016
1106 #define wxID_HELP_CONTEXT 5017
1108 #define wxID_CUT 5030
1109 #define wxID_COPY 5031
1110 #define wxID_PASTE 5032
1111 #define wxID_CLEAR 5033
1112 #define wxID_FIND 5034
1113 #define wxID_DUPLICATE 5035
1114 #define wxID_SELECTALL 5036
1116 #define wxID_FILE1 5050
1117 #define wxID_FILE2 5051
1118 #define wxID_FILE3 5052
1119 #define wxID_FILE4 5053
1120 #define wxID_FILE5 5054
1121 #define wxID_FILE6 5055
1122 #define wxID_FILE7 5056
1123 #define wxID_FILE8 5057
1124 #define wxID_FILE9 5058
1126 // Standard button IDs
1127 #define wxID_OK 5100
1128 #define wxID_CANCEL 5101
1129 #define wxID_APPLY 5102
1130 #define wxID_YES 5103
1131 #define wxID_NO 5104
1132 #define wxID_STATIC 5105
1133 #define wxID_FORWARD 5106
1134 #define wxID_BACKWARD 5107
1135 #define wxID_DEFAULT 5108
1136 #define wxID_MORE 5109
1137 #define wxID_SETUP 5110
1138 #define wxID_RESET 5111
1140 // IDs used by generic file dialog (11 consecutive starting from this value)
1141 #define wxID_FILEDLGG 5900
1142 #define wxID_HIGHEST 5999
1144 // ----------------------------------------------------------------------------
1145 // Possible SetSize flags
1146 // ----------------------------------------------------------------------------
1148 // Use internally-calculated width if -1
1149 #define wxSIZE_AUTO_WIDTH 0x0001
1150 // Use internally-calculated height if -1
1151 #define wxSIZE_AUTO_HEIGHT 0x0002
1152 // Use internally-calculated width and height if each is -1
1153 #define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT)
1154 // Ignore missing (-1) dimensions (use existing).
1155 // For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code.
1156 #define wxSIZE_USE_EXISTING 0x0000
1157 // Allow -1 as a valid position
1158 #define wxSIZE_ALLOW_MINUS_ONE 0x0004
1159 // Don't do parent client adjustments (for implementation only)
1160 #define wxSIZE_NO_ADJUSTMENTS 0x0008
1162 // ----------------------------------------------------------------------------
1164 // ----------------------------------------------------------------------------
1167 // Text font families
1174 wxTELETYPE
, /* @@@@ */
1176 // Proportional or Fixed width fonts (not yet used)
1183 // Also wxNORMAL for normal (non-italic text)
1197 // Brush & Pen Stippling. Note that a stippled pen cannot be dashed!!
1198 // Note also that stippling a Pen IS meaningfull, because a Line is
1199 // drawn with a Pen, and without any Brush -- and it can be stippled.
1207 #define IS_HATCH(s) ((s)>=wxBDIAGONAL_HATCH && (s)<=wxVERTICAL_HATCH)
1223 wxXOR
, // src XOR dst
1224 wxINVERT
, // NOT dst
1225 wxOR_REVERSE
, // src OR (NOT dst)
1226 wxAND_REVERSE
,// src AND (NOT dst)
1228 wxAND
, // src AND dst
1229 wxAND_INVERT
, // (NOT src) AND dst
1231 wxNOR
, // (NOT src) AND (NOT dst)
1232 wxEQUIV
, // (NOT src) XOR dst
1233 wxSRC_INVERT
, // (NOT src)
1234 wxOR_INVERT
, // (NOT src) OR dst
1235 wxNAND
, // (NOT src) OR (NOT dst)
1238 wxSRC_OR
, // source _bitmap_ OR destination
1239 wxSRC_AND
// source _bitmap_ AND destination
1243 #define wxFLOOD_SURFACE 1
1244 #define wxFLOOD_BORDER 2
1246 /* Polygon filling mode */
1247 #define wxODDEVEN_RULE 1
1248 #define wxWINDING_RULE 2
1250 /* ToolPanel in wxFrame */
1251 #define wxTOOL_TOP 1
1252 #define wxTOOL_BOTTOM 2
1253 #define wxTOOL_LEFT 3
1254 #define wxTOOL_RIGHT 4
1256 // the values of the format constants should be the same as correspondign
1257 // CF_XXX constants in Windows API
1261 wxDF_TEXT
= 1, /* CF_TEXT */
1262 wxDF_BITMAP
= 2, /* CF_BITMAP */
1263 wxDF_METAFILE
= 3, /* CF_METAFILEPICT */
1267 wxDF_OEMTEXT
= 7, /* CF_OEMTEXT */
1268 wxDF_DIB
= 8, /* CF_DIB */
1273 wxDF_UNICODETEXT
= 13,
1274 wxDF_ENHMETAFILE
= 14,
1275 wxDF_FILENAME
= 15, /* CF_HDROP */
1281 /* Virtual keycodes */
1304 WXK_PRIOR
, /* Page up */
1305 WXK_NEXT
, /* Page down */
1378 WXK_NUMPAD_PAGEDOWN
,
1384 WXK_NUMPAD_MULTIPLY
,
1386 WXK_NUMPAD_SEPARATOR
,
1387 WXK_NUMPAD_SUBTRACT
,
1392 // Mapping modes (as per Windows)
1394 #define wxMM_LOMETRIC 2
1395 #define wxMM_HIMETRIC 3
1396 #define wxMM_LOENGLISH 4
1397 #define wxMM_HIENGLISH 5
1398 #define wxMM_TWIPS 6
1399 #define wxMM_ISOTROPIC 7
1400 #define wxMM_ANISOTROPIC 8
1402 #define wxMM_POINTS 9
1403 #define wxMM_METRIC 10
1405 /* Shortcut for easier dialog-unit-to-pixel conversion */
1406 #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
1410 wxPAPER_NONE
, // Use specific dimensions
1411 wxPAPER_LETTER
, // Letter, 8 1/2 by 11 inches
1412 wxPAPER_LEGAL
, // Legal, 8 1/2 by 14 inches
1413 wxPAPER_A4
, // A4 Sheet, 210 by 297 millimeters
1414 wxPAPER_CSHEET
, // C Sheet, 17 by 22 inches
1415 wxPAPER_DSHEET
, // D Sheet, 22 by 34 inches
1416 wxPAPER_ESHEET
, // E Sheet, 34 by 44 inches
1417 wxPAPER_LETTERSMALL
, // Letter Small, 8 1/2 by 11 inches
1418 wxPAPER_TABLOID
, // Tabloid, 11 by 17 inches
1419 wxPAPER_LEDGER
, // Ledger, 17 by 11 inches
1420 wxPAPER_STATEMENT
, // Statement, 5 1/2 by 8 1/2 inches
1421 wxPAPER_EXECUTIVE
, // Executive, 7 1/4 by 10 1/2 inches
1422 wxPAPER_A3
, // A3 sheet, 297 by 420 millimeters
1423 wxPAPER_A4SMALL
, // A4 small sheet, 210 by 297 millimeters
1424 wxPAPER_A5
, // A5 sheet, 148 by 210 millimeters
1425 wxPAPER_B4
, // B4 sheet, 250 by 354 millimeters
1426 wxPAPER_B5
, // B5 sheet, 182-by-257-millimeter paper
1427 wxPAPER_FOLIO
, // Folio, 8-1/2-by-13-inch paper
1428 wxPAPER_QUARTO
, // Quarto, 215-by-275-millimeter paper
1429 wxPAPER_10X14
, // 10-by-14-inch sheet
1430 wxPAPER_11X17
, // 11-by-17-inch sheet
1431 wxPAPER_NOTE
, // Note, 8 1/2 by 11 inches
1432 wxPAPER_ENV_9
, // #9 Envelope, 3 7/8 by 8 7/8 inches
1433 wxPAPER_ENV_10
, // #10 Envelope, 4 1/8 by 9 1/2 inches
1434 wxPAPER_ENV_11
, // #11 Envelope, 4 1/2 by 10 3/8 inches
1435 wxPAPER_ENV_12
, // #12 Envelope, 4 3/4 by 11 inches
1436 wxPAPER_ENV_14
, // #14 Envelope, 5 by 11 1/2 inches
1437 wxPAPER_ENV_DL
, // DL Envelope, 110 by 220 millimeters
1438 wxPAPER_ENV_C5
, // C5 Envelope, 162 by 229 millimeters
1439 wxPAPER_ENV_C3
, // C3 Envelope, 324 by 458 millimeters
1440 wxPAPER_ENV_C4
, // C4 Envelope, 229 by 324 millimeters
1441 wxPAPER_ENV_C6
, // C6 Envelope, 114 by 162 millimeters
1442 wxPAPER_ENV_C65
, // C65 Envelope, 114 by 229 millimeters
1443 wxPAPER_ENV_B4
, // B4 Envelope, 250 by 353 millimeters
1444 wxPAPER_ENV_B5
, // B5 Envelope, 176 by 250 millimeters
1445 wxPAPER_ENV_B6
, // B6 Envelope, 176 by 125 millimeters
1446 wxPAPER_ENV_ITALY
, // Italy Envelope, 110 by 230 millimeters
1447 wxPAPER_ENV_MONARCH
, // Monarch Envelope, 3 7/8 by 7 1/2 inches
1448 wxPAPER_ENV_PERSONAL
, // 6 3/4 Envelope, 3 5/8 by 6 1/2 inches
1449 wxPAPER_FANFOLD_US
, // US Std Fanfold, 14 7/8 by 11 inches
1450 wxPAPER_FANFOLD_STD_GERMAN
, // German Std Fanfold, 8 1/2 by 12 inches
1451 wxPAPER_FANFOLD_LGL_GERMAN
, // German Legal Fanfold, 8 1/2 by 13 inches
1453 wxPAPER_ISO_B4
, // B4 (ISO) 250 x 353 mm
1454 wxPAPER_JAPANESE_POSTCARD
, // Japanese Postcard 100 x 148 mm
1455 wxPAPER_9X11
, // 9 x 11 in
1456 wxPAPER_10X11
, // 10 x 11 in
1457 wxPAPER_15X11
, // 15 x 11 in
1458 wxPAPER_ENV_INVITE
, // Envelope Invite 220 x 220 mm
1459 wxPAPER_LETTER_EXTRA
, // Letter Extra 9 \275 x 12 in
1460 wxPAPER_LEGAL_EXTRA
, // Legal Extra 9 \275 x 15 in
1461 wxPAPER_TABLOID_EXTRA
, // Tabloid Extra 11.69 x 18 in
1462 wxPAPER_A4_EXTRA
, // A4 Extra 9.27 x 12.69 in
1463 wxPAPER_LETTER_TRANSVERSE
, // Letter Transverse 8 \275 x 11 in
1464 wxPAPER_A4_TRANSVERSE
, // A4 Transverse 210 x 297 mm
1465 wxPAPER_LETTER_EXTRA_TRANSVERSE
, // Letter Extra Transverse 9\275 x 12 in
1466 wxPAPER_A_PLUS
, // SuperA/SuperA/A4 227 x 356 mm
1467 wxPAPER_B_PLUS
, // SuperB/SuperB/A3 305 x 487 mm
1468 wxPAPER_LETTER_PLUS
, // Letter Plus 8.5 x 12.69 in
1469 wxPAPER_A4_PLUS
, // A4 Plus 210 x 330 mm
1470 wxPAPER_A5_TRANSVERSE
, // A5 Transverse 148 x 210 mm
1471 wxPAPER_B5_TRANSVERSE
, // B5 (JIS) Transverse 182 x 257 mm
1472 wxPAPER_A3_EXTRA
, // A3 Extra 322 x 445 mm
1473 wxPAPER_A5_EXTRA
, // A5 Extra 174 x 235 mm
1474 wxPAPER_B5_EXTRA
, // B5 (ISO) Extra 201 x 276 mm
1475 wxPAPER_A2
, // A2 420 x 594 mm
1476 wxPAPER_A3_TRANSVERSE
, // A3 Transverse 297 x 420 mm
1477 wxPAPER_A3_EXTRA_TRANSVERSE
// A3 Extra Transverse 322 x 445 mm
1481 /* Printing orientation */
1483 #define wxPORTRAIT 1
1484 #define wxLANDSCAPE 2
1487 /* Duplex printing modes
1491 wxDUPLEX_SIMPLEX
, // Non-duplex
1492 wxDUPLEX_HORIZONTAL
,
1499 #define wxPRINT_QUALITY_HIGH -1
1500 #define wxPRINT_QUALITY_MEDIUM -2
1501 #define wxPRINT_QUALITY_LOW -3
1502 #define wxPRINT_QUALITY_DRAFT -4
1504 typedef int wxPrintQuality
;
1506 /* Print mode (currently PostScript only)
1510 wxPRINT_MODE_NONE
= 0,
1511 wxPRINT_MODE_PREVIEW
= 1, // Preview in external application
1512 wxPRINT_MODE_FILE
= 2, // Print to file
1513 wxPRINT_MODE_PRINTER
= 3 // Send to printer
1516 // ---------------------------------------------------------------------------
1517 // Macro to specify "All Files" on different platforms
1518 // ---------------------------------------------------------------------------
1519 #if defined(__WXMSW__)
1520 # define wxALL_FILES_PATTERN "*.*"
1521 # define wxALL_FILES gettext_noop("All files (*.*)|*.*")
1523 # define wxALL_FILES_PATTERN "*"
1524 # define wxALL_FILES gettext_noop("All files (*)|*")
1526 // ---------------------------------------------------------------------------
1527 // macros that enable wxWindows apps to be compiled in absence of the
1528 // sytem headers, although some platform specific types are used in the
1529 // platform specific (implementation) parts of the headers
1530 // ---------------------------------------------------------------------------
1532 #if defined(__WXMSW__) || defined(__WXPM__)
1533 // Stand-ins for Windows types or OS/2, to avoid #including all of windows.h or os2.h
1534 typedef unsigned long WXHWND
;
1535 typedef unsigned long WXHANDLE
;
1536 typedef unsigned long WXHICON
;
1537 typedef unsigned long WXHFONT
;
1538 typedef unsigned long WXHMENU
;
1539 typedef unsigned long WXHPEN
;
1540 typedef unsigned long WXHBRUSH
;
1541 typedef unsigned long WXHPALETTE
;
1542 typedef unsigned long WXHCURSOR
;
1543 typedef unsigned long WXHRGN
;
1544 typedef unsigned long WXHACCEL
;
1545 typedef unsigned long WXHINSTANCE
;
1546 typedef unsigned long WXHBITMAP
;
1547 typedef unsigned long WXHIMAGELIST
;
1548 typedef unsigned long WXHGLOBAL
;
1549 typedef unsigned long WXHDC
;
1550 typedef unsigned int WXUINT
;
1551 typedef unsigned long WXDWORD
;
1552 typedef unsigned short WXWORD
;
1554 typedef unsigned int WXWPARAM
;
1555 typedef long WXLPARAM
;
1557 # define WXWPARAM MPARAM
1558 # define WXLPARAM MPARAM
1560 # define LOGFONT FATTRS
1561 # define LOWORD SHORT1FROMMP
1562 # define HIWORD SHORT2FROMMP
1564 typedef unsigned long WXCOLORREF
;
1565 typedef void * WXRGNDATA
;
1566 typedef void * WXMSG
;
1567 typedef unsigned long WXHCONV
;
1568 typedef unsigned long WXHKEY
;
1569 typedef unsigned long WXHTREEITEM
;
1571 typedef void * WXDRAWITEMSTRUCT
;
1572 typedef void * WXMEASUREITEMSTRUCT
;
1573 typedef void * WXLPCREATESTRUCT
;
1575 #if defined(__WXPM__)
1576 typedef unsigned long WXMPARAM
;
1577 typedef unsigned long WXMSGID
;
1578 typedef void* WXRESULT
;
1579 typedef int (*WXFARPROC
)();
1580 // some windows handles not defined by PM
1581 typedef unsigned long HANDLE
;
1582 typedef unsigned long HICON
;
1583 typedef unsigned long HFONT
;
1584 typedef unsigned long HMENU
;
1585 typedef unsigned long HPEN
;
1586 typedef unsigned long HBRUSH
;
1587 typedef unsigned long HPALETTE
;
1588 typedef unsigned long HCURSOR
;
1589 typedef unsigned long HINSTANCE
;
1590 typedef unsigned long HIMAGELIST
;
1591 typedef unsigned long HGLOBAL
;
1592 typedef unsigned long DWORD
;
1593 typedef unsigned short WORD
;
1596 #if defined(__GNUWIN32__) || defined(__WXWINE__)
1597 typedef int (*WXFARPROC
)();
1598 #elif defined(__WIN32__)
1599 typedef int (__stdcall
*WXFARPROC
)();
1601 typedef int (*WXFARPROC
)();
1604 typedef WXHWND WXWidget
;
1608 /* Stand-ins for X/Xt/Motif types */
1609 typedef void* WXWindow
;
1610 typedef void* WXWidget
;
1611 typedef void* WXAppContext
;
1612 typedef void* WXColormap
;
1613 typedef void WXDisplay
;
1614 typedef void WXEvent
;
1615 typedef void* WXCursor
;
1616 typedef void* WXPixmap
;
1617 typedef void* WXFontStructPtr
;
1619 typedef void* WXRegion
;
1620 typedef void* WXFont
;
1621 typedef void* WXImage
;
1622 typedef void* WXCursor
;
1623 typedef void* WXFontList
;
1625 typedef unsigned long Atom
; /* this might fail on a few architectures */
1630 /* Stand-ins for GLIB types */
1632 typedef unsigned guint
;
1633 typedef unsigned long gulong
;
1634 typedef void* gpointer
;
1635 typedef struct _GSList GSList
;
1637 /* Stand-ins for GDK types */
1638 typedef gulong GdkAtom
;
1639 typedef struct _GdkColor GdkColor
;
1640 typedef struct _GdkColormap GdkColormap
;
1641 typedef struct _GdkFont GdkFont
;
1642 typedef struct _GdkGC GdkGC
;
1643 typedef struct _GdkWindow GdkWindow
;
1644 typedef struct _GdkWindow GdkBitmap
;
1645 typedef struct _GdkWindow GdkPixmap
;
1646 typedef struct _GdkCursor GdkCursor
;
1647 typedef struct _GdkRegion GdkRegion
;
1648 typedef struct _GdkDragContext GdkDragContext
;
1650 /* Stand-ins for GTK types */
1651 typedef struct _GtkWidget GtkWidget
;
1652 typedef struct _GtkStyle GtkStyle
;
1653 typedef struct _GtkAdjustment GtkAdjustment
;
1654 typedef struct _GtkList GtkList
;
1655 typedef struct _GtkToolbar GtkToolbar
;
1656 typedef struct _GtkTooltips GtkTooltips
;
1657 typedef struct _GtkNotebook GtkNotebook
;
1658 typedef struct _GtkNotebookPage GtkNotebookPage
;
1659 typedef struct _GtkAccelGroup GtkAccelGroup
;
1660 typedef struct _GtkItemFactory GtkItemFactory
;
1661 typedef struct _GtkSelectionData GtkSelectionData
;
1663 typedef GtkWidget
*WXWidget
;
1666 // This is required because of clashing macros in windows.h, which may be
1667 // included before or after wxWindows classes, and therefore must be
1668 // disabled here before any significant wxWindows headers are included.
1700 // ---------------------------------------------------------------------------
1701 // macro to define a class without copy ctor nor assignment operator
1702 // ---------------------------------------------------------------------------
1704 #define DECLARE_NO_COPY_CLASS(classname) \
1706 classname(const classname&); \
1707 classname& operator=(const classname&)