]> git.saurik.com Git - wxWidgets.git/commitdiff
moved ProvidesBackground() from wxUniv to base wxWindow class; use it to prevent...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Dec 2004 20:51:06 +0000 (20:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Dec 2004 20:51:06 +0000 (20:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/bookctrl.h
include/wx/toplevel.h
include/wx/univ/toplevel.h
include/wx/univ/window.h
include/wx/window.h

index a8e7ef7ce6809264a1e23746cd2d0c3e35bb1690..e1605aef7310da1e771aee91a47eb2e16c0d2d2b 100644 (file)
@@ -179,8 +179,10 @@ public:
         }
     }
 
+    // override some base class virtuals
     virtual void ApplyParentThemeBackground(const wxColour& bg)
         { SetBackgroundColour(bg); }
+    virtual bool ProvidesBackground() const { return true; }
 
 protected:
     // remove the page and return a pointer to it
index b14af59160546da465093adb2543500330f79bba..a3821d3199b55d5f1c052743f6ef536fb45194f3 100644 (file)
@@ -191,6 +191,7 @@ public:
     virtual bool Destroy();
     virtual bool IsTopLevel() const { return true; }
     virtual wxSize GetMaxSize() const;
+    virtual bool ProvidesBackground() const { return true; }
 
     // event handlers
     void OnCloseWindow(wxCloseEvent& event);
index e0fb181d12495897d9bf84965ea495f415dbd455..70f04446c3c24bf6ca8a63bf6ba84f40bf0a6d71 100644 (file)
@@ -143,8 +143,6 @@ public:
     virtual int GetMinWidth() const;
     virtual int GetMinHeight() const;
 
-    virtual bool ProvidesBackground() const { return true; }
-    
 protected:
     // handle titlebar button click event
     virtual void ClickTitleBarButton(long button);
index c39940a21a19cf666848f8724b0807c1a98d4fcb..2ef6b3ea943d927770a5bd780685179210378c76 100644 (file)
@@ -148,11 +148,6 @@ public:
     // as a wxStaticText and wxCheckBox and the background should
     // be adapted from a parent window
     virtual bool HasTransparentBackground() { return false; }
-    
-    // to be used with function above: transparent windows get
-    // their background from parents that return true here,
-    // so this is mostly for wxPanel, wxTopLevelWindow etc.
-    virtual bool ProvidesBackground() const { return false; }
 
     // return true if this control can be highlighted when the mouse is over
     // it (the theme decides itself whether it is really highlighted or not)
@@ -183,7 +178,7 @@ public:
 
     // erase part of the control
     virtual void EraseBackground(wxDC& dc, const wxRect& rect);
-    
+
     // overridden base class methods
     // -----------------------------
 
@@ -252,12 +247,12 @@ protected:
 
     // the renderer we use
     wxRenderer *m_renderer;
-    
+
     // background bitmap info
     wxBitmap  m_bitmapBg;
     int       m_alignBgBitmap;
     wxStretch m_stretchBgBitmap;
-    
+
     // old size
     wxSize m_oldSize;
 
index db5205b6a71aee14afca970f17497fc1256a7b13..47e9d653e12d67b21a809001423620a10b600ea0 100644 (file)
@@ -757,6 +757,13 @@ public:
     }
     wxColour GetBackgroundColour() const;
 
+    // if the window shouldn't inherit its colour from the parent, override
+    // this function to return true
+    //
+    // this is currently only used by wxMSW and wxUniv but should be useful for
+    // the other ports too
+    virtual bool ProvidesBackground() const { return false; }
+
     virtual bool SetForegroundColour(const wxColour& colour);
     void SetOwnForegroundColour(const wxColour& colour)
     {