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

@@ -59,8 +59,8 @@ protected:
// called when one of the bitmap is changed by user
virtual void OnSetBitmap();
// set bitmap to the given one if it's ok or to m_bmpNormal and return
// true if the bitmap really changed
// set bitmap to the given one if it's ok or to the normal bitmap and
// return true if the bitmap really changed
bool ChangeBitmap(const wxBitmap& bmp);
private:

View File

@@ -87,8 +87,6 @@ public:
virtual ~wxButton();
virtual void SetImageLabel(const wxBitmap& bitmap);
virtual void SetImageMargins(wxCoord x, wxCoord y);
virtual wxWindow *SetDefault();
virtual bool IsPressed() const { return m_isPressed; }
@@ -119,6 +117,9 @@ protected:
virtual bool DoDrawBackground(wxDC& dc);
virtual void DoDraw(wxControlRenderer *renderer);
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual void DoSetBitmapMargins(wxCoord x, wxCoord y);
// common part of all ctors
void Init();