X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/858f7d664166563a7725f3487249eed7f30e2f31..9018abe3ef28d237b0421c8d96987907adbe5532:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 48507c825a..35c46f8e3a 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -26,7 +26,8 @@ // ---------------------------------------------------------------------------- // OS -#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || defined(__unix__) +#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || \ + defined(__unix__) || defined(sun) || defined(__SUN__) #ifndef __UNIX__ #define __UNIX__ #endif // Unix @@ -49,6 +50,8 @@ #endif // Sun CC #endif #endif // Sun +#elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) ) + // MacOS #else // Windows #ifndef __WINDOWS__ #define __WINDOWS__ @@ -69,9 +72,9 @@ // suppress some Visual C++ warnings #ifdef __VISUALC__ -# pragma warning(disable:4244) // cobversion from double to float +# pragma warning(disable:4244) // conversion from double to float # pragma warning(disable:4100) // unreferenced formal parameter -#endif +#endif // __VISUALC__ // suppress some Salford C++ warnings #ifdef __SALFORDC__ @@ -80,7 +83,18 @@ # pragma suppress 61 // enum has no name (doesn't suppress!) # pragma suppress 106 // unnamed, unused parameter # pragma suppress 571 // Virtual function hiding -#endif +#endif // __SALFORDC__ + +// Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files, +// so define it ourselves +#ifdef __DECCXX + #define __cplusplus +#endif // __DECCXX + +// Resolves linking problems under HP-UX +#if defined(__HPUX__) && !defined(__GNUG__) + #define va_list __gnuc_va_list +#endif // HP-UX ////////////////////////////////////////////////////////////////////////////////// // Currently Only MS-Windows/NT, XView and Motif are supported @@ -158,8 +172,13 @@ #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500) typedef unsigned int bool; #elif defined(__WATCOMC__) +// typedef unsigned int bool; + + #if (__WATCOMC__ < 1100) typedef unsigned int bool; -#elif defined(__SUNCC__) + #endif + +#elif defined(__SUNCC__) || defined(__SUNPRO_CC) #ifdef __SUNPRO_CC // starting from version 5.0 Sun CC understands 'bool' #if __SUNPRO_CC <= 0x0420 @@ -194,6 +213,7 @@ typedef int wxWindowID; #ifdef __WXMSW__ +/* #ifdef __BORLANDC__ # ifdef WXMAKINGDLL @@ -211,14 +231,18 @@ typedef int wxWindowID; # endif #else +*/ + +// _declspec works in BC++ 5 and later, as well as VC++ +#if defined(__VISUALC__) || defined(__BORLANDC__) # ifdef WXMAKINGDLL -# define WXDLLEXPORT __declspec( dllexport ) -# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type -# define WXDLLEXPORT_CTORFN // __declspec( dllexport ) +# define WXDLLEXPORT _declspec( dllexport ) +# define WXDLLEXPORT_DATA(type) _declspec( dllexport ) type +# define WXDLLEXPORT_CTORFN # elif defined(WXUSINGDLL) -# define WXDLLEXPORT __declspec( dllimport ) -# define WXDLLEXPORT_DATA(type) __declspec( dllimport ) type +# define WXDLLEXPORT _declspec( dllimport ) +# define WXDLLEXPORT_DATA(type) _declspec( dllimport ) type # define WXDLLEXPORT_CTORFN # else # define WXDLLEXPORT @@ -226,6 +250,10 @@ typedef int wxWindowID; # define WXDLLEXPORT_CTORFN # endif +#else +# define WXDLLEXPORT +# define WXDLLEXPORT_DATA(type) type +# define WXDLLEXPORT_CTORFN #endif #else @@ -432,17 +460,24 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); /* * wxToolBar style flags */ - #define wxTB_3DBUTTONS 0x8000 #define wxTB_HORIZONTAL 0x0002 #define wxTB_VERTICAL 0x0004 // Flatbar/Coolbar under Win98 #define wxTB_FLAT 0x0008 +// use native docking +#define wxTB_DOCKABLE 0x0010 /* - * Apply to all panel items + * wxMenuBar style flags */ +// use native docking +#define wxMB_DOCKABLE 0x0001 + +/* + * Apply to all panel items + */ #define wxCOLOURED 0x0800 // Alignment for panel item labels: replaces characters with zeros // when creating label, so spaces can be included in string for alignment. @@ -455,7 +490,6 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); /* * Styles for wxListBox */ - #define wxLB_SORT 0x0010 #define wxLB_SINGLE 0x0020 #define wxLB_MULTIPLE 0x0040 @@ -511,7 +545,6 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); /* * wxSlider flags */ - #define wxSL_HORIZONTAL wxHORIZONTAL #define wxSL_VERTICAL wxVERTICAL // The next one is obsolete - use scroll events instead @@ -529,21 +562,18 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); /* * wxScrollBar flags */ - #define wxSB_HORIZONTAL wxHORIZONTAL #define wxSB_VERTICAL wxVERTICAL /* * wxButton flags */ - #define wxBU_AUTODRAW 0x0004 #define wxBU_NOAUTODRAW 0x0000 /* * wxTreeCtrl flags */ - #define wxTR_HAS_BUTTONS 0x0004 #define wxTR_EDIT_LABELS 0x0008 #define wxTR_LINES_AT_ROOT 0x0010 @@ -551,7 +581,6 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); /* * wxListCtrl flags */ - #define wxLC_ICON 0x0004 #define wxLC_SMALL_ICON 0x0008 #define wxLC_LIST 0x0010 @@ -938,6 +967,19 @@ enum #define wxID_HIGHEST 5999 +// Mapping modes (as per Windows) +#define wxMM_TEXT 1 +#define wxMM_LOMETRIC 2 +#define wxMM_HIMETRIC 3 +#define wxMM_LOENGLISH 4 +#define wxMM_HIENGLISH 5 +#define wxMM_TWIPS 6 +#define wxMM_ISOTROPIC 7 +#define wxMM_ANISOTROPIC 8 + +#define wxMM_POINTS 9 +#define wxMM_METRIC 10 + /* Shortcut for easier dialog-unit-to-pixel conversion */ #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)