#include "wx/statbox.h"
#include "wx/osx/private.h"
+@implementation wxNSBox
+
++ (void)initialize
+{
+ static BOOL initialized = NO;
+ if (!initialized)
+ {
+ initialized = YES;
+ wxOSXCocoaClassAddWXMethods( self );
+ }
+}
+
+@end
+
wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer,
wxWindowMac* parent,
wxWindowID id,
long style,
long extraStyle)
{
- NSView* sv = (wxpeer->GetParent()->GetHandle() );
-
- NSRect r = wxToNSRect( sv, wxRect( pos, size) );
- // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ;
+ NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSBox* v = [[wxNSBox alloc] initWithFrame:r];
- [sv addSubview:v];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
- [v setImplementation:c];
+ c->SetFlipped(false);
return c;
}