]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/bmpbuttn_osx.cpp
Fix history in wxWebViewIE when using a custom file scheme.
[wxWidgets.git] / src / osx / bmpbuttn_osx.cpp
index c79f4fd47c51582e1ffe61d869bb1c59f5539bc4..a2c2eadfeef7bdfdd043d62fb99958804f93cd6f 100644 (file)
@@ -4,7 +4,7 @@
 // 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
 /////////////////////////////////////////////////////////////////////////////
@@ -20,8 +20,6 @@
     #include "wx/dcmemory.h"
 #endif
 
-IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
-
 #include "wx/osx/private.h"
 
 //---------------------------------------------------------------------------
@@ -35,10 +33,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,24 +52,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::DoSetBitmap(const wxBitmap& bitmap, State which)
-{
-    wxBitmapButtonBase::DoSetBitmap(bitmap, which);
-
-    // we don't support any other states currently
-    if ( which == State_Normal )
-    {
-        m_peer->SetBitmap( bitmap );
-    }
-}
-
 wxSize wxBitmapButton::DoGetBestSize() const
 {
     wxSize best(m_marginX, m_marginY);