const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNOTEBOOK_NAME);
+ virtual ~wxNotebook();
// accessors
// ---------
// set the padding between tabs (in pixels)
void SetPadding(const wxSize& padding);
- // Windows only: attempts to get colour for UX theme page background
- wxColour GetThemeBackgroundColour();
-
// operations
// ----------
// remove all pages
// style.
void SetTabSize(const wxSize& sz);
- // Windows only: attempts to apply the UX theme page background to this page
- void ApplyThemeBackground(wxWindow* window, const wxColour& colour);
-
// hit test
virtual int HitTest(const wxPoint& pt, long *flags = NULL) const;
virtual bool DoPhase(int nPhase);
#endif // wxUSE_CONSTRAINTS
+
+ // implementation only
+ // -------------------
+
+#if wxUSE_UXTHEME
+ // handler for child pages erase background event
+ void DoEraseBackground(wxEraseEvent& event);
+
+ // real implementation of the above method
+ void DoEraseBackground(wxWindow *win, WXHDC hDC);
+
+ // get the brush to be used for painting the background for the controls
+ // which need it in their MSWControlColor()
+ //
+ // the brush will be adjusted for use with the given window on this DC
+ WXHBRUSH GetThemeBackgroundBrush(WXHDC hDC, wxWindow *win) const;
+#endif // wxUSE_UXTHEME
+
protected:
// common part of all ctors
void Init();
// set the size of the given page to fit in the notebook
void AdjustPageSize(wxNotebookPage *page);
- // override WndProc.
#if wxUSE_UXTHEME
- virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
-#endif
+ // creates the brush to be used for drawing the tab control background
+ void UpdateBgBrush();
+#endif // wxUSE_UXTHEME
// the current selection (-1 if none)
int m_nSelection;
- wxNotebookPageInfoList m_pageInfos ;
+ wxNotebookPageInfoList m_pageInfos;
+
+#if wxUSE_UXTHEME
+ // background brush used to paint the tab control
+ WXHBRUSH m_hbrBackground;
+#endif // wxUSE_UXTHEME
DECLARE_DYNAMIC_CLASS_NO_COPY(wxNotebook)