X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc26010927f5bb12825a32487949d063e6c605fc..43ff861df48f0837dac98005dd397c5f127ca136:/include/wx/msw/toolbar.h diff --git a/include/wx/msw/toolbar.h b/include/wx/msw/toolbar.h index 4de16f7180..bef24a2ee4 100644 --- a/include/wx/msw/toolbar.h +++ b/include/wx/msw/toolbar.h @@ -67,7 +67,6 @@ public: void OnMouseEvent(wxMouseEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event); - void OnEraseBackground(wxEraseEvent& event); void SetFocus() {} @@ -81,6 +80,11 @@ public: // returns true if the platform should explicitly apply a theme border virtual bool CanApplyThemeBorder() const { return false; } +#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK + virtual bool MSWEraseBgHook(WXHDC hDC); + virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindowMSW *child); +#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK + protected: // common part of all ctors void Init(); @@ -116,9 +120,9 @@ protected: // handlers for various events bool HandleSize(WXWPARAM wParam, WXLPARAM lParam); -#ifndef __WXWINCE__ +#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK bool HandlePaint(WXWPARAM wParam, WXLPARAM lParam); -#endif // __WXWINCE__ +#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK void HandleMouseMove(WXWPARAM wParam, WXLPARAM lParam); // should be called whenever the toolbar size changes @@ -157,12 +161,15 @@ private: // have void UpdateStretchableSpacersSize(); - // redraw the background of the given part of the window (or entire window - // if the parameter is NULL) to erase separator drawn in it - // - // return true if the background was erased using DrawThemeBackground() - bool MSWEraseRect(wxDC& dc, const wxRect *rectItem = NULL); +#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK + // do erase the toolbar background, always do it for the entire control as + // the caller sets the clipping region correctly to exclude parts which + // should not be erased + void MSWDoEraseBackground(WXHDC hDC); + // return the brush to use for erasing the toolbar background + WXHBRUSH MSWGetToolbarBgBrush(); +#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxToolBar)