]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/window.h
added test for writing empty value to the config
[wxWidgets.git] / include / wx / window.h
index 93818581c6a0676c186db2a0d8cda917a02146fa..f425041036a237e2feaf5e210b42d3774bc62195 100644 (file)
     #include "wx/accel.h"
 #endif // wxUSE_ACCEL
 
     #include "wx/accel.h"
 #endif // wxUSE_ACCEL
 
+// when building wxUniv/Foo we don't want the code for native menu use to be
+// compiled in - it should only be used when building real wxFoo
+#ifdef __WXUNIVERSAL__
+    #define wxUSE_MENUS_NATIVE 0
+#else // __WXMSW__
+    #define wxUSE_MENUS_NATIVE wxUSE_MENUS
+#endif // __WXUNIVERSAL__/__WXMSW__
+
 // ----------------------------------------------------------------------------
 // forward declarations
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // forward declarations
 // ----------------------------------------------------------------------------
@@ -953,15 +961,19 @@ private:
 
 // include the declaration of the platform-specific class
 #if defined(__WXMSW__)
 
 // include the declaration of the platform-specific class
 #if defined(__WXMSW__)
-    #if !defined(__WXUNIVERSAL__)
+    #ifdef __WXUNIVERSAL__
+        #define wxWindowNative wxWindowMSW
+    #else // !wxUniv
         #define wxWindowMSW wxWindow
         #define sm_classwxWindowMSW sm_classwxWindow
         #define wxWindowMSW wxWindow
         #define sm_classwxWindowMSW sm_classwxWindow
-    #endif // wxUniv
+    #endif // wxUniv/!wxUniv
     #include "wx/msw/window.h"
 #elif defined(__WXMOTIF__)
     #include "wx/motif/window.h"
 #elif defined(__WXGTK__)
     #include "wx/msw/window.h"
 #elif defined(__WXMOTIF__)
     #include "wx/motif/window.h"
 #elif defined(__WXGTK__)
-    #if !defined(__WXUNIVERSAL__)
+    #ifdef __WXUNIVERSAL__
+        #define wxWindowNative wxWindowGTK
+    #else // !wxUniv
         #define wxWindowGTK wxWindow
         #define sm_classwxWindowGTK sm_classwxWindow
     #endif // wxUniv
         #define wxWindowGTK wxWindow
         #define sm_classwxWindowGTK sm_classwxWindow
     #endif // wxUniv
@@ -969,14 +981,30 @@ private:
 #elif defined(__WXQT__)
     #include "wx/qt/window.h"
 #elif defined(__WXMAC__)
 #elif defined(__WXQT__)
     #include "wx/qt/window.h"
 #elif defined(__WXMAC__)
+    #ifdef __WXUNIVERSAL__
+        #define wxWindowNative wxWindowMac
+    #else // !wxUniv
+        #define wxWindowMac wxWindow
+        #define sm_classwxWindowMac sm_classwxWindow
+    #endif // wxUniv
     #include "wx/mac/window.h"
 #elif defined(__WXPM__)
     #include "wx/mac/window.h"
 #elif defined(__WXPM__)
+    #ifdef __WXUNIVERSAL__
+        #define wxWindowNative wxWindowOS2
+    #else // !wxUniv
+        #define wxWindowOS2 wxWindow
+        #define sm_classwxWindowOS2 sm_classwxWindow
+    #endif // wxUniv/!wxUniv
     #include "wx/os2/window.h"
 #endif
 
 // for wxUniversal, we now derive the real wxWindow from wxWindow<platform>,
 // for the native ports we already have defined it above
 #if defined(__WXUNIVERSAL__)
     #include "wx/os2/window.h"
 #endif
 
 // for wxUniversal, we now derive the real wxWindow from wxWindow<platform>,
 // for the native ports we already have defined it above
 #if defined(__WXUNIVERSAL__)
+    #ifndef wxWindowNative
+        #error "wxWindowNative must be defined above!"
+    #endif
+
     #include "wx/univ/window.h"
 #endif // wxUniv
 
     #include "wx/univ/window.h"
 #endif // wxUniv
 
@@ -994,8 +1022,6 @@ inline wxWindow *wxWindowBase::GetGrandParent() const
 // global functions
 // ----------------------------------------------------------------------------
 
 // global functions
 // ----------------------------------------------------------------------------
 
-WXDLLEXPORT extern wxWindow* wxGetActiveWindow();
-
 // Find the wxWindow at the current mouse position, also returning the mouse
 // position.
 WXDLLEXPORT extern wxWindow* wxFindWindowAtPointer(wxPoint& pt);
 // Find the wxWindow at the current mouse position, also returning the mouse
 // position.
 WXDLLEXPORT extern wxWindow* wxFindWindowAtPointer(wxPoint& pt);