X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4868bfb17e1c8c9174fb4a6e29b601f0f0f7fa01..cc4d5638c66a409e421420ed7110917755a66788:/src/osx/bmpbuttn_osx.cpp?ds=sidebyside diff --git a/src/osx/bmpbuttn_osx.cpp b/src/osx/bmpbuttn_osx.cpp index fd4d1fa5bf..581ddd0865 100644 --- a/src/osx/bmpbuttn_osx.cpp +++ b/src/osx/bmpbuttn_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: bmpbuttn.cpp 54820 2008-07-29 20:04:11Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,8 +19,6 @@ #include "wx/dcmemory.h" #endif -IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) - #include "wx/osx/private.h" //--------------------------------------------------------------------------- @@ -35,10 +32,10 @@ bool wxBitmapButton::Create( wxWindow *parent, const wxValidator& validator, const wxString& name ) { - m_macIsUserPane = false; - - if ( !wxControl::Create( parent, id, pos, size, style | wxBU_NOTEXT, - validator, name ) ) + DontCreatePeer(); + + if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style, + validator, name) ) return false; if ( style & wxBU_AUTODRAW ) @@ -54,20 +51,13 @@ bool wxBitmapButton::Create( wxWindow *parent, m_bitmaps[State_Normal] = bitmap; - m_peer = wxWidgetImpl::CreateBitmapButton( this, parent, id, bitmap, pos, size, style, GetExtraStyle() ); + SetPeer(wxWidgetImpl::CreateBitmapButton( this, parent, id, bitmap, pos, size, style, GetExtraStyle() )); MacPostControlCreate( pos, size ); return true; } -void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) -{ - InvalidateBestSize(); - - m_peer->SetBitmap( bitmap ); -} - wxSize wxBitmapButton::DoGetBestSize() const { wxSize best(m_marginX, m_marginY);