// check for native bool type and TRUE/FALSE constants
// ----------------------------------------------------------------------------
-// define boolean constants if not done yet
-#ifndef TRUE
- #define TRUE 1
-#endif
-
-#ifndef FALSE
- #define FALSE 0
-#endif
-
// Add more tests here for Windows compilers that already define bool
// (under Unix, configure tests for this)
#ifndef HAVE_BOOL
// NB: of course, this doesn't replace the standard type, because, for
// example, overloading based on bool/int parameter doesn't work and
// so should be avoided in portable programs
-typedef unsigned int bool;
+ typedef unsigned int bool;
#endif // bool
+#ifdef __cplusplus
+ // define boolean constants: don't use true/false here as not all compilers
+ // support them but also redefine TRUE which could have been defined as 1
+ // by previous headers: this would be incorrect as our TRUE is supposed to
+ // be of type bool, just like true, not int
+ //
+ // however if the user code absolutely needs TRUE to be defined in its own
+ // way, it can predefine WX_TRUE_DEFINED to prevent the redefinition here
+ #ifdef TRUE
+ #ifndef WX_TRUE_DEFINED
+ #undef TRUE
+ #undef FALSE
+ #endif
+ #endif
+
+ #ifndef TRUE
+ #define TRUE ((bool)1)
+ #define FALSE ((bool)0)
+ #endif
+#else // !__cplusplus
+ // the definitions above don't work for C sources
+ #ifndef TRUE
+ #define TRUE 1
+ #endif
+
+ #ifndef FALSE
+ #define FALSE 0
+ #endif
+#endif // C++/!C++
+
typedef short int WXTYPE;
// special care should be taken with this type under Windows where the real
// other feature tests
// ----------------------------------------------------------------------------
- // Every ride down a slippery slope begins with a single step..
- //
- // Yes, using nested classes is indeed against our coding standards in
- // general, but there are places where you can use them to advantage
- // without totally breaking ports that cannot use them. If you do, then
- // wrap it in this guard, but such cases should still be relatively rare.
-
+// Every ride down a slippery slope begins with a single step..
+//
+// Yes, using nested classes is indeed against our coding standards in
+// general, but there are places where you can use them to advantage
+// without totally breaking ports that cannot use them. If you do, then
+// wrap it in this guard, but such cases should still be relatively rare.
#ifndef __WIN16__
-#define wxUSE_NESTED_CLASSES 1
+ #define wxUSE_NESTED_CLASSES 1
#else
-#define wxUSE_NESTED_CLASSES 0
+ #define wxUSE_NESTED_CLASSES 0
#endif
// ----------------------------------------------------------------------------
typedef void (*wxFunction) (wxObject&, wxEvent&);
#endif
+// Printf-like attribute definitions to obtain warnings with GNU C/C++
+#if defined(__GNUC__)
+# ifndef ATTRIBUTE_PRINTF
+# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
+# define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
+# define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
+# define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
+# define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
+# define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
+# endif /* ATTRIBUTE_PRINTF */
+#else
+# ifndef ATTRIBUTE_PRINTF
+# define ATTRIBUTE_PRINTF
+# define ATTRIBUTE_PRINTF_1
+# define ATTRIBUTE_PRINTF_2
+# define ATTRIBUTE_PRINTF_3
+# define ATTRIBUTE_PRINTF_4
+# define ATTRIBUTE_PRINTF_5
+# endif /* ATTRIBUTE_PRINTF */
+#endif
+
// ----------------------------------------------------------------------------
// OS mnemonics -- Identify the running OS (useful for Windows)
// ----------------------------------------------------------------------------
#define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
#define wxFRAME_NO_TASKBAR 0x0002 // No taskbar button (MSW only)
#define wxFRAME_TOOL_WINDOW 0x0004 // No taskbar button, no system menu
+#define wxFRAME_FLOAT_ON_PARENT 0x0008 // Always above its parent
// deprecated versions defined for compatibility reasons
#define wxRESIZE_BOX wxMAXIMIZE_BOX
#define wxTHICK_FRAME wxRESIZE_BORDER
-#define wxFRAME_FLOAT_ON_PARENT wxFRAME_TOOL_WINDOW
// obsolete styles, unused any more
#define wxDIALOG_MODAL 0x0020 // free flag value 0x0020
wxDF_FILENAME = 15, /* CF_HDROP */
wxDF_LOCALE = 16,
wxDF_PRIVATE = 20,
+ wxDF_HTML = 30, /* Note: does not correspond to CF_ constant */
wxDF_MAX
};
typedef void* WXWidget ;
typedef void* WXWindow ;
+typedef void* WXDisplay ;
/*
typedef WindowPtr WXHWND;
typedef Handle WXHANDLE;