X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..1a87edf286921de9b182f3d19adb6bb63ba85ebd:/include/wx/msw/bmpbuttn.h diff --git a/include/wx/msw/bmpbuttn.h b/include/wx/msw/bmpbuttn.h index f1716a5473..c7e2113a74 100644 --- a/include/wx/msw/bmpbuttn.h +++ b/include/wx/msw/bmpbuttn.h @@ -18,6 +18,7 @@ #include "wx/button.h" #include "wx/bitmap.h" +#include "wx/brush.h" #define wxDEFAULT_BUTTON_MARGIN 4 @@ -48,6 +49,7 @@ public: const wxString& name = wxButtonNameStr); // Implementation + virtual bool SetBackgroundColour(const wxColour& colour); virtual void SetDefault(); virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel ); @@ -56,8 +58,16 @@ public: protected: virtual wxSize DoGetBestSize() const; - -private: + + // invalidate m_brushDisabled when system colours change + void OnSysColourChanged(wxSysColourChangedEvent& event); + + + // the brush we use to draw disabled buttons + wxBrush m_brushDisabled; + + + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton) };