#include "wx/osx/private.h"
-wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
- wxWindowMac* parent,
- wxWindowID id,
+wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
+ wxWindowMac* WXUNUSED(parent),
+ wxWindowID WXUNUSED(id),
const wxBitmap& bitmap,
- const wxPoint& pos,
+ const wxPoint& pos,
const wxSize& size,
- long style,
- long extraStyle)
+ long style,
+ long WXUNUSED(extraStyle))
{
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
else
[v setBezelStyle:NSRegularSquareBezelStyle];
}
-
- [v setImage:bitmap.GetNSImage() ];
+
+ if (bitmap.Ok())
+ [v setImage:bitmap.GetNSImage() ];
+
[v setButtonType:NSMomentaryPushInButton];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
- [v setImplementation:c];
return c;
}