X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3839f37ed32f788ffe3237a616ef60e93a017e4e..e2813725c9c8d409b3b99768abc2dcf9ee1fa76f:/include/wx/msw/notebook.h?ds=inline diff --git a/include/wx/msw/notebook.h b/include/wx/msw/notebook.h index 97a3141c54..90c0fc7b81 100644 --- a/include/wx/msw/notebook.h +++ b/include/wx/msw/notebook.h @@ -167,6 +167,8 @@ public: virtual bool DoPhase(int nPhase); #endif // wxUSE_CONSTRAINTS + // Attempts to get colour for UX theme page background + wxColour GetThemeBackgroundColour() const; // implementation only // ------------------- @@ -181,9 +183,6 @@ public: return true; } - - virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindow *win); - virtual wxColour MSWGetBgColourForChild(wxWindow *win); #endif // wxUSE_UXTHEME protected: @@ -196,20 +195,31 @@ protected: // remove one page from the notebook, without deleting virtual wxNotebookPage *DoRemovePage(size_t nPage); + // get the page rectangle for the current notebook size + // + // returns empty rectangle if an error occurs, do test for it + wxRect GetPageSize() const; + // set the size of the given page to fit in the notebook 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); + // gets the bitmap of notebook background and returns a brush from it + WXHBRUSH QueryBgBitmap(); // creates the brush to be used for drawing the tab control background void UpdateBgBrush(); + + // return the themed brush for painting our children + virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, WXHWND hWnd); + + // draw child background + virtual bool MSWPrintChild(WXHDC hDC, wxWindow *win); + + // common part of QueryBgBitmap() and MSWPrintChild() + // + // if child == NULL, draw background for the entire notebook itself + bool DoDrawBackground(WXHDC hDC, wxWindow *child = NULL); #endif // wxUSE_UXTHEME // the current selection (-1 if none) @@ -222,6 +232,11 @@ protected: WXHBRUSH m_hbrBackground; #endif // wxUSE_UXTHEME + // No need to optimize for WinCE +#ifndef __WXWINCE__ + void OnEraseBackground(wxEraseEvent& event); + void OnPaint(wxPaintEvent& event); +#endif DECLARE_DYNAMIC_CLASS_NO_COPY(wxNotebook) DECLARE_EVENT_TABLE()