]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/defs.h
don't use wxScopedPtr<> in wxDocTemplate::CreateDocument() as the document is implici...
[wxWidgets.git] / include / wx / defs.h
index 50be6dfdeb46b1a6784c8c8f52519d454c9b4897..64bd994a807f7e080343c7a36d1d4454a81e98bb 100644 (file)
@@ -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"
 
@@ -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 */
@@ -3119,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<arg>&);                 \
+        classname& operator=(const classname<arg>&)
 
-#define DECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg)  \
-    private:                                            \
-        classname(const classname<arg>&);               \
-        classname& operator=(const classname<arg>&);
+#define wxDECLARE_NO_COPY_TEMPLATE_CLASS_2(classname, arg1, arg2) \
+    private:                                                      \
+        classname(const classname<arg1, arg2>&);                  \
+        classname& operator=(const classname<arg1, arg2>&)
 
-#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 */