X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99d82720737ebf91d3a387d53dd0cf6c8cf9a643..4c7d530a267f11be1e9cf20d7bfa5313286fee1c:/include/wx/defs.h diff --git a/include/wx/defs.h b/include/wx/defs.h index 5db80e86af..64bd994a80 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -503,7 +503,7 @@ typedef short int WXTYPE; handle the deprecation attribute even in the constructor. doesn't seem to work on Apple's gcc 4.0.1 unless using -O0 */ -#if defined( __DARWIN__ ) && !defined(__WXDEBUG__) +#if wxCHECK_GCC_VERSION(3, 4) || defined( __DARWIN__ ) #define wxDEPRECATED_CONSTRUCTOR(x) x #else #define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x) @@ -530,6 +530,17 @@ typedef short int WXTYPE; # define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x) #endif +/* + Combination of the two variants above: should be used for deprecated + functions which are defined inline and are used by wxWidgets itself. + */ +#ifdef WXBUILDING +# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) func { body } +#else +# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) \ + wxDEPRECATED(func) { body } +#endif + /* everybody gets the assert and other debug macros */ #include "wx/debug.h" @@ -1166,8 +1177,8 @@ inline void *wxUIntToPtr(wxUIntPtr p) /* base floating point types */ -/* wxFloat32: 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits */ -/* wxFloat64: 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits */ +/* wxFloat32: 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits ) */ +/* wxFloat64: 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits ) */ /* wxDouble: native fastest representation that has at least wxFloat64 */ /* precision, so use the IEEE types for storage, and this for */ /* calculations */ @@ -2094,6 +2105,8 @@ enum wxHitTest #define wxSIZE_NO_ADJUSTMENTS 0x0008 /* Change the window position even if it seems to be already correct */ #define wxSIZE_FORCE 0x0010 +/* Emit size event even if size didn't change */ +#define wxSIZE_FORCE_EVENT 0x0020 /* ---------------------------------------------------------------------------- */ /* GDI descriptions */ @@ -2196,13 +2209,20 @@ enum wxDataFormatId /* Virtual keycodes */ enum wxKeyCode { - WXK_BACK = 8, + WXK_BACK = 8, // backspace WXK_TAB = 9, WXK_RETURN = 13, WXK_ESCAPE = 27, + + /* values from 33 to 126 are reserved for the standard ASCII characters */ + WXK_SPACE = 32, WXK_DELETE = 127, + /* values from 128 to 255 are reserved for ASCII extended characters + (note that there isn't a real widely used standard for the meaning + of these values; avoid them in portable apps!) */ + /* These are, by design, not compatible with unicode characters. If you want to get a unicode character from a key event, use wxKeyEvent::GetUnicodeKey instead. */ @@ -3112,22 +3132,35 @@ typedef const void* WXWidget; #include "wx/features.h" /* --------------------------------------------------------------------------- */ -/* macro to define a class without copy ctor nor assignment operator */ +/* macros to define a class without copy ctor nor assignment operator */ /* --------------------------------------------------------------------------- */ -#define DECLARE_NO_COPY_CLASS(classname) \ +#define wxDECLARE_NO_COPY_CLASS(classname) \ private: \ classname(const classname&); \ - classname& operator=(const classname&); + classname& operator=(const classname&) + +#define wxDECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \ + private: \ + classname(const classname&); \ + classname& operator=(const classname&) -#define DECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \ - private: \ - classname(const classname&); \ - classname& operator=(const classname&); +#define wxDECLARE_NO_COPY_TEMPLATE_CLASS_2(classname, arg1, arg2) \ + private: \ + classname(const classname&); \ + classname& operator=(const classname&) -#define DECLARE_NO_ASSIGN_CLASS(classname) \ +#define wxDECLARE_NO_ASSIGN_CLASS(classname) \ private: \ - classname& operator=(const classname&); + classname& operator=(const classname&) + +// deprecated variants _not_ requiring a semicolon after them +#define DECLARE_NO_COPY_CLASS(classname) \ + wxDECLARE_NO_COPY_CLASS(classname); +#define DECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \ + wxDECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg); +#define DECLARE_NO_ASSIGN_CLASS(classname) \ + wxDECLARE_NO_ASSIGN_CLASS(classname); /* --------------------------------------------------------------------------- */ /* If a manifest is being automatically generated, add common controls 6 to it */