/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/bmpbuttn.cpp
+// Name: src/osx/carbon/bmpbuttn.cpp
// Purpose: wxBitmapButton
// Author: Stefan Csomor
// Modified by:
long style,
long extraStyle)
{
- NSView* sv = (wxpeer->GetParent()->GetHandle() );
+ NSView* sv = static_cast<NSView*>(wxpeer->GetParent()->GetHandle() );
- NSRect r = wxToNSRect( sv, wxRect( pos, size) );
- // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ;
+ NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
[v setBezelStyle:NSRegularSquareBezelStyle];
-
+ [v setImage:bitmap.GetNSImage() ];
[v setButtonType:NSMomentaryPushInButton];
[sv addSubview:v];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );