]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/window.h
don't change WXWIN_COMPATIBLITY settings, it affects binary compatibility
[wxWidgets.git] / include / wx / window.h
index dce69059f9b882836d3c9c13ca4798744608ab1e..c506460376086556647e90e782033fd5cd3d1478 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _WX_WINDOW_H_BASE_
 #define _WX_WINDOW_H_BASE_
 
-#if defined(__GNUG__) && !defined(__APPLE__)
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma interface "windowbase.h"
 #endif
 
@@ -219,6 +219,8 @@ public:
         return wxPoint(w, h);
     }
 
+       void SetPosition( const wxPoint& pt ) { Move( pt ) ; }
+
     void GetSize( int *w, int *h ) const { DoGetSize(w, h); }
     wxSize GetSize() const
     {
@@ -581,8 +583,8 @@ public:
         // repaint all invalid areas of the window immediately
     virtual void Update() { }
 
-        // clear the window entirely
-    virtual void Clear() = 0;
+        // clear the window background
+    virtual void ClearBackground();
 
         // freeze the window: don't redraw it until it is thawed
     virtual void Freeze() { }
@@ -831,7 +833,17 @@ public:
     wxSizer *GetSizer() const { return m_windowSizer; }
 
     // Track if this window is a member of a sizer
-    void SetContainingSizer(wxSizer* sizer) { m_containingSizer = sizer; }
+    void SetContainingSizer(wxSizer* sizer)
+    {
+        // adding a window to a sizer twice is going to result in fatal and
+        // hard to debug problems later because when deleting the second
+        // associated wxSizerItem we're going to dereference a dangling
+        // pointer; so try to detect this as early as possible
+        wxASSERT_MSG( !sizer || m_containingSizer != sizer,
+                        _T("Adding a window to the same sizer twice?") );
+
+        m_containingSizer = sizer;
+    }
     wxSizer *GetContainingSizer() const { return m_containingSizer; }
 
     // accessibility
@@ -1141,6 +1153,9 @@ private:
     #else // !wxUniv
         #define wxWindowMSW wxWindow
         #define sm_classwxWindowMSW sm_classwxWindow
+        #define sm_constructorPropertiesCountwxWindowMSW sm_constructorPropertiesCountwxWindow
+        #define sm_constructorPropertieswxWindowMSW sm_constructorPropertieswxWindow
+        #define sm_constructorwxWindowMSW sm_constructorwxWindow
     #endif // wxUniv/!wxUniv
     #include "wx/msw/window.h"
 #elif defined(__WXMOTIF__)