preparation work for implementing images support in wxButton: move wxBitmapButton methods to the base class (enhancing/completing them in the process); there are no functionality changes yet (hopefully)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-06-14 22:55:24 +00:00
parent 0455894395
commit 2352862a7e
19 changed files with 500 additions and 382 deletions

View File

@@ -44,13 +44,6 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
// override some base class methods to automatically synthesize the
// disabled bitmap if it wasn't set by the user
virtual void SetBitmapLabel(const wxBitmap& bitmap);
virtual void SetBitmapFocus(const wxBitmap& focus);
virtual void SetBitmapDisabled(const wxBitmap& disabled);
virtual void SetBitmapHover(const wxBitmap& hover);
// Implementation
virtual bool SetBackgroundColour(const wxColour& colour);
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
@@ -70,6 +63,8 @@ protected:
virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
// invalidate m_brushDisabled when system colours change
void OnSysColourChanged(wxSysColourChangedEvent& event);
@@ -81,11 +76,12 @@ protected:
// the brush we use to draw disabled buttons
wxBrush m_brushDisabled;
// true if m_bmpDisabled was set by user, false if we created it ourselves
// from m_bmpNormal
// true if disabled bitmap was set by user, false if we created it
// ourselves from the normal one
bool m_disabledSetByUser;
// true if m_bmpHover was set by user, false if it was set from m_bmpFocus
// true if hover bitmap was set by user, false if it was set from focused
// one
bool m_hoverSetByUser;