moved ProvidesBackground() from wxUniv to base wxWindow class; use it to prevent inheriting background brush beyond the windows which normally have their own background
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -179,8 +179,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// override some base class virtuals
|
||||||
virtual void ApplyParentThemeBackground(const wxColour& bg)
|
virtual void ApplyParentThemeBackground(const wxColour& bg)
|
||||||
{ SetBackgroundColour(bg); }
|
{ SetBackgroundColour(bg); }
|
||||||
|
virtual bool ProvidesBackground() const { return true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// remove the page and return a pointer to it
|
// remove the page and return a pointer to it
|
||||||
|
@@ -191,6 +191,7 @@ public:
|
|||||||
virtual bool Destroy();
|
virtual bool Destroy();
|
||||||
virtual bool IsTopLevel() const { return true; }
|
virtual bool IsTopLevel() const { return true; }
|
||||||
virtual wxSize GetMaxSize() const;
|
virtual wxSize GetMaxSize() const;
|
||||||
|
virtual bool ProvidesBackground() const { return true; }
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
|
@@ -143,8 +143,6 @@ public:
|
|||||||
virtual int GetMinWidth() const;
|
virtual int GetMinWidth() const;
|
||||||
virtual int GetMinHeight() const;
|
virtual int GetMinHeight() const;
|
||||||
|
|
||||||
virtual bool ProvidesBackground() const { return true; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// handle titlebar button click event
|
// handle titlebar button click event
|
||||||
virtual void ClickTitleBarButton(long button);
|
virtual void ClickTitleBarButton(long button);
|
||||||
|
@@ -148,11 +148,6 @@ public:
|
|||||||
// as a wxStaticText and wxCheckBox and the background should
|
// as a wxStaticText and wxCheckBox and the background should
|
||||||
// be adapted from a parent window
|
// be adapted from a parent window
|
||||||
virtual bool HasTransparentBackground() { return false; }
|
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
|
// 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)
|
// it (the theme decides itself whether it is really highlighted or not)
|
||||||
@@ -183,7 +178,7 @@ public:
|
|||||||
|
|
||||||
// erase part of the control
|
// erase part of the control
|
||||||
virtual void EraseBackground(wxDC& dc, const wxRect& rect);
|
virtual void EraseBackground(wxDC& dc, const wxRect& rect);
|
||||||
|
|
||||||
// overridden base class methods
|
// overridden base class methods
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
@@ -252,12 +247,12 @@ protected:
|
|||||||
|
|
||||||
// the renderer we use
|
// the renderer we use
|
||||||
wxRenderer *m_renderer;
|
wxRenderer *m_renderer;
|
||||||
|
|
||||||
// background bitmap info
|
// background bitmap info
|
||||||
wxBitmap m_bitmapBg;
|
wxBitmap m_bitmapBg;
|
||||||
int m_alignBgBitmap;
|
int m_alignBgBitmap;
|
||||||
wxStretch m_stretchBgBitmap;
|
wxStretch m_stretchBgBitmap;
|
||||||
|
|
||||||
// old size
|
// old size
|
||||||
wxSize m_oldSize;
|
wxSize m_oldSize;
|
||||||
|
|
||||||
|
@@ -757,6 +757,13 @@ public:
|
|||||||
}
|
}
|
||||||
wxColour GetBackgroundColour() const;
|
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);
|
virtual bool SetForegroundColour(const wxColour& colour);
|
||||||
void SetOwnForegroundColour(const wxColour& colour)
|
void SetOwnForegroundColour(const wxColour& colour)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user