X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eca62298b9c92fd9ff1789807685dd32f8ce470d..f960e9e7e5a964e2336936c9d508e0d5ec7df346:/src/osx/cocoa/bmpbuttn.mm?ds=sidebyside diff --git a/src/osx/cocoa/bmpbuttn.mm b/src/osx/cocoa/bmpbuttn.mm index d3c0092ba0..bc9a26325d 100644 --- a/src/osx/cocoa/bmpbuttn.mm +++ b/src/osx/cocoa/bmpbuttn.mm @@ -9,54 +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]; - [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 wxWidgetCocoaImpl( wxpeer, v ); - return c; -} - -#endif +// everything is done in button.mm now \ No newline at end of file