X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/caf95d2aef2a88279df7f249d3b9440e18941d7d..fa9666fbe69e76f57042b46ba2c8ad5b18a527b6:/include/wx/msw/notebook.h?ds=sidebyside diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h index caa4a9f710..01e861258a 100644 --- a/include/wx/msw/notebook.h +++ b/include/wx/msw/notebook.h @@ -162,12 +162,18 @@ public: // ------------------- #if wxUSE_UXTHEME - // handler for child pages erase background event - void DoEraseBackground(wxEraseEvent& event); + virtual bool SetBackgroundColour(const wxColour& colour) + { + if ( !wxNotebookBase::SetBackgroundColour(colour) ) + return false; - // get the brush to be used for painting the background for the controls - // which need it in their MSWControlColor() - WXHBRUSH GetThemeBackgroundBrush() const { return m_hbrBackground; } + UpdateBgBrush(); + + return true; + } + + virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindow *win); + virtual wxColour MSWGetBgColourForChild(wxWindow *win); #endif // wxUSE_UXTHEME protected: @@ -184,6 +190,14 @@ protected: void AdjustPageSize(wxNotebookPage *page); #if wxUSE_UXTHEME + // this is a slightly ugly function which gets the bitmap of notebook + // background and either returns the colour under the specified window in it + // or creates a brush from it + // + // so if win == NULL, a brush is created and returned + // win != NULL, returns COLORREF of the pixel under its top left corner + WXHANDLE QueryBgBitmap(wxWindow *win = NULL); + // creates the brush to be used for drawing the tab control background void UpdateBgBrush(); #endif // wxUSE_UXTHEME