X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbeddfb93d3479d03d8ec4c0121dfbe3bbcc422b..55410bb4f67febe1ca20654f078ea4fb9a6223ae:/src/osx/cocoa/statbox.mm?ds=sidebyside diff --git a/src/osx/cocoa/statbox.mm b/src/osx/cocoa/statbox.mm index f1e60f923c..6c5bff4a67 100644 --- a/src/osx/cocoa/statbox.mm +++ b/src/osx/cocoa/statbox.mm @@ -18,19 +18,14 @@ @implementation wxNSBox -- (void)setImplementation: (wxWidgetImpl *) theImplementation ++ (void)initialize { - impl = theImplementation; -} - -- (wxWidgetImpl*) implementation -{ - return impl; -} - -- (BOOL) isFlipped -{ - return NO; + static BOOL initialized = NO; + if (!initialized) + { + initialized = YES; + wxOSXCocoaClassAddWXMethods( self ); + } } @end @@ -44,13 +39,10 @@ wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, long style, long extraStyle) { - NSView* sv = (wxpeer->GetParent()->GetHandle() ); - 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; }