]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/statbox.mm
fix wxGTK1 compilation after wxTextEntry DoGetValue() change
[wxWidgets.git] / src / osx / cocoa / statbox.mm
index f1e60f923c9ba3922cdf4ce72a2eec128990ae04..6c5bff4a67d7c01434a4accc8ad0fac41157f236 100644 (file)
 
 @implementation wxNSBox
 
 
 @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
 }
 
 @end
@@ -44,13 +39,10 @@ wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStyle)
 {
                                     long style, 
                                     long extraStyle)
 {
-    NSView* sv = (wxpeer->GetParent()->GetHandle() );
-    
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSBox* v = [[wxNSBox alloc] initWithFrame:r];
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSBox* v = [[wxNSBox alloc] initWithFrame:r];
-    [sv addSubview:v];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
-    [v setImplementation:c];
+    c->SetFlipped(false);
     return c;
 }
 
     return c;
 }