]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/bmpbuttn.cpp
Unified flags for orienting wxBookCtrls (with backward compatibility). Centralised...
[wxWidgets.git] / src / mac / carbon / bmpbuttn.cpp
index 9d944f40b56fee5104dba5897d1825921ff05ba3..ce68f575b629e315b82de817d3eae6b68c9d54cf 100644 (file)
@@ -9,18 +9,14 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "bmpbuttn.h"
-#endif
-
 #include "wx/wxprec.h"
 
+#if wxUSE_BMPBUTTON
+
 #include "wx/window.h"
 #include "wx/bmpbuttn.h"
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
-#endif
 
 #include "wx/mac/uma.h"
 #include "wx/bitmap.h"
@@ -70,7 +66,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
     wxMacCreateBitmapButton( &info , m_bmpNormal ) ;
 
     Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
-    m_peer = new wxMacControl() ;
+    m_peer = new wxMacControl( this ) ;
     verify_noerr ( CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , 
         (( style & wxBU_AUTODRAW ) ? kControlBevelButtonSmallBevel : kControlBevelButtonNormalBevel )  , 
         kControlBehaviorOffsetContents , &info , 0 , 0 , 0 , m_peer->GetControlRefAddr() ) );
@@ -108,3 +104,5 @@ wxSize wxBitmapButton::DoGetBestSize() const
     }
     return best;
 }
+
+#endif