]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/window.h
Move wxScopedPtr::reset() implementation to wxDEFINE_SCOPED_PTR.
[wxWidgets.git] / include / wx / msw / window.h
index a65fa4910aedb6bb57811e9d7869b651537f2910..96b6d1bbe6dd96c9c59f265d46db5b126ceaf428 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef _WX_WINDOW_H_
 #define _WX_WINDOW_H_
 
-enum wxSystemColour;
+#include "wx/settings.h"        // solely for wxSystemColour
 
 // if this is set to 1, we use deferred window sizing to reduce flicker when
 // resizing complicated window hierarchies, but this can in theory result in
@@ -234,15 +234,6 @@ public:
     // created yet)
     void MSWUpdateStyle(long flagsOld, long exflagsOld);
 
-    // translate wxWidgets coords into Windows ones suitable to be passed to
-    // ::CreateWindow()
-    //
-    // returns true if non default coords are returned, false otherwise
-    bool MSWGetCreateWindowCoords(const wxPoint& pos,
-                                  const wxSize& size,
-                                  int& x, int& y,
-                                  int& w, int& h) const;
-
     // get the HWND to be used as parent of this window with CreateWindow()
     virtual WXHWND MSWGetParent() const;
 
@@ -428,7 +419,7 @@ public:
                                int themePart,
                                int themeState,
                                MSWThemeColour themeColour,
-                               wxSystemColour fallback);
+                               wxSystemColour fallback) const;
 
     // gives the parent the possibility to draw its children background, e.g.
     // this is used by wxNotebook to do it using DrawThemeBackground()
@@ -447,6 +438,27 @@ public:
         return true;
     }
 
+#if !defined(__WXWINCE__) && !defined(__WXUNIVERSAL__)
+    #define wxHAS_MSW_BACKGROUND_ERASE_HOOK
+#endif
+
+#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK
+    // allows the child to hook into its parent WM_ERASEBKGND processing: call
+    // MSWSetEraseBgHook() with a non-NULL window to make parent call
+    // MSWEraseBgHook() on this window (don't forget to reset it to NULL
+    // afterwards)
+    //
+    // this hack is used by wxToolBar, see comments there
+    void MSWSetEraseBgHook(wxWindow *child);
+
+    // return true if WM_ERASEBKGND is currently hooked
+    bool MSWHasEraseBgHook() const;
+
+    // called when the window on which MSWSetEraseBgHook() had been called
+    // receives WM_ERASEBKGND
+    virtual bool MSWEraseBgHook(WXHDC WXUNUSED(hDC)) { return false; }
+#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK
+
     // common part of Show/HideWithEffect()
     bool MSWShowWithEffect(bool show,
                            wxShowEffect effect,
@@ -571,6 +583,13 @@ protected:
     // for state as the system will decide for us what needs to be set
     void MSWUpdateUIState(int action, int state = 0);
 
+    // translate wxWidgets coords into Windows ones suitable to be passed to
+    // ::CreateWindow(), called from MSWCreate()
+    virtual void MSWGetCreateWindowCoords(const wxPoint& pos,
+                                          const wxSize& size,
+                                          int& x, int& y,
+                                          int& w, int& h) const;
+
 private:
     // common part of all ctors
     void Init();