]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/notebook.h
only define wxUSE_NATIVE_STATUSBAR for the ports which have it (MSW and Mac)
[wxWidgets.git] / include / wx / msw / notebook.h
index c08588371470347ddea081832557a67317f300f2..883ffae275a36a39e2dfa6c536c15a2e895abd7c 100644 (file)
@@ -64,14 +64,14 @@ public:
              const wxPoint& pos = wxDefaultPosition,
              const wxSize& size = wxDefaultSize,
              long style = 0,
-             const wxString& name = wxNOTEBOOK_NAME);
+             const wxString& name = wxNotebookNameStr);
     // Create() function
   bool Create(wxWindow *parent,
               wxWindowID id,
               const wxPoint& pos = wxDefaultPosition,
               const wxSize& size = wxDefaultSize,
               long style = 0,
-              const wxString& name = wxNOTEBOOK_NAME);
+              const wxString& name = wxNotebookNameStr);
   virtual ~wxNotebook();
 
   // accessors
@@ -162,17 +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;
 
-  // real implementation of the above method
-  void DoEraseBackground(wxWindow *win, WXHDC hDC);
+      UpdateBgBrush();
 
-  // 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;
+      return true;
+  }
+
+  virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindow *win);
+  virtual wxColour MSWGetBgColourForChild(wxWindow *win);
 #endif // wxUSE_UXTHEME
 
 protected:
@@ -189,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