]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/bmpbuttn.mm
set default resolutions in case of errors
[wxWidgets.git] / src / osx / cocoa / bmpbuttn.mm
index ccfc8c98819a0031979b04bea38a157a493b84eb..bc9a26325d1e6ef3a80317695d066601220dfcf8 100644 (file)
@@ -9,69 +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"
-
-class wxBitmapButtonCocoaImpl : public wxWidgetCocoaImpl, public wxBitmapButtonImpl
-{
-    public :
-    wxBitmapButtonCocoaImpl( wxWindowMac* peer , WXWidget w) : wxWidgetCocoaImpl(peer,w)
-    {
-    }
-    
-    void SetPressedBitmap( const wxBitmap& bitmap )
-    {
-        wxNSButton* button = (wxNSButton*) m_osxView;
-        [button setAlternateImage: bitmap.GetNSImage()];
-        [button setButtonType:NSMomentaryChangeButton];
-    }
-} ;
-
-wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
-                                    wxWindowMac* WXUNUSED(parent),
-                                    wxWindowID WXUNUSED(id),
-                                    const wxBitmap& bitmap,
-                                    const wxPoint& pos,
-                                    const wxSize& size,
-                                    long style,
-                                    long WXUNUSED(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];
-        [v setBordered:NO]; 
-    }
-    else
-    {
-        // see trac #11128 for a thorough discussion
-        if ( (style & wxBORDER_MASK) == wxBORDER_RAISED )
-            [v setBezelStyle:NSRegularSquareBezelStyle];
-        else if ( (style & wxBORDER_MASK) == wxBORDER_SUNKEN )
-            [v setBezelStyle:NSSmallSquareBezelStyle];
-        else
-            [v setBezelStyle:NSShadowlessSquareBezelStyle];
-    }
-
-    if (bitmap.Ok())
-        [v setImage:bitmap.GetNSImage() ];
-
-    [v setButtonType:NSMomentaryPushInButton];
-    wxWidgetCocoaImpl* c = new wxBitmapButtonCocoaImpl( wxpeer, v );
-    return c;
-}
-
-#endif
+// everything is done in button.mm now
\ No newline at end of file