X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8207702d1cf580a7200114abd52f186b4b9a4f3..d4d799e9ea2ff317ac8405cf07eca5dd2c756530:/src/osx/cocoa/bmpbuttn.mm?ds=inline diff --git a/src/osx/cocoa/bmpbuttn.mm b/src/osx/cocoa/bmpbuttn.mm index 516b5fe857..bc9a26325d 100644 --- a/src/osx/cocoa/bmpbuttn.mm +++ b/src/osx/cocoa/bmpbuttn.mm @@ -9,50 +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* 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]; - } - else - { - if ( style & wxBU_AUTODRAW ) - [v setBezelStyle:NSShadowlessSquareBezelStyle]; - else - [v setBezelStyle:NSRegularSquareBezelStyle]; - } - - if (bitmap.Ok()) - [v setImage:bitmap.GetNSImage() ]; - - [v setButtonType:NSMomentaryPushInButton]; - wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); - return c; -} - -#endif +// everything is done in button.mm now \ No newline at end of file