]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/bmpbuttn.mm
Test m_nowpeer pointer before using it.
[wxWidgets.git] / src / osx / cocoa / bmpbuttn.mm
index ab3433bd7fb7134dc7edcc86e088aa5b89cba3ae..bc9a26325d1e6ef3a80317695d066601220dfcf8 100644 (file)
@@ -9,49 +9,4 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/wxprec.h"
-
-#if wxUSE_BMPBUTTON
-
-#include "wx/bmpbuttn.h"
-#include "wx/image.h"
-
-#ifndef WX_PRECOMP
-    #include "wx/dcmemory.h"
-#endif
-
-#include "wx/osx/private.h"
-
-wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, 
-                                    wxWindowMac* parent, 
-                                    wxWindowID id, 
-                                    const wxBitmap& bitmap,
-                                    const wxPoint& pos, 
-                                    const wxSize& size,
-                                    long style, 
-                                    long extraStyle) 
-{
-    NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
-    wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
-
-    // trying to get as close as possible to flags
-    if ( style & wxBORDER_NONE )
-    {
-        [v setBezelStyle:NSShadowlessSquareBezelStyle];
-    }
-    else
-    {
-        if ( style & wxBU_AUTODRAW )
-            [v setBezelStyle:NSShadowlessSquareBezelStyle];
-        else
-            [v setBezelStyle:NSRegularSquareBezelStyle];
-    }
-    
-    [v setImage:bitmap.GetNSImage() ];
-    [v setButtonType:NSMomentaryPushInButton];
-    wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
-    [v setImplementation:c];
-    return c;
-}
-
-#endif
+// everything is done in button.mm now
\ No newline at end of file