// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
-// RCS-ID: $Id: bmpbuttn.cpp 54820 2008-07-29 20:04:11Z SC $
+// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/dcmemory.h"
#endif
-IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
-
#include "wx/osx/private.h"
//---------------------------------------------------------------------------
const wxValidator& validator,
const wxString& name )
{
- m_macIsUserPane = false;
-
- if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
+ DontCreatePeer();
+
+ if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
+ validator, name) )
return false;
if ( style & wxBU_AUTODRAW )
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);