]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/statbox.mm
Use the app name, not display name, as debug report name,
[wxWidgets.git] / src / osx / cocoa / statbox.mm
index 4ec49e32fa9fc2b7328b6cfec37bd8ac3cf5fcb1..c9dcb0cf584ecb287ed6f73bd7aab67a90524099 100644 (file)
 #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
-                                    const wxString& label,
+                                    wxWindowMac* WXUNUSED(parent)
+                                    wxWindowID WXUNUSED(id)
+                                    const wxString& WXUNUSED(label),
                                     const wxPoint& pos, 
                                     const wxSize& size,
-                                    long style
-                                    long extraStyle)
+                                    long WXUNUSED(style)
+                                    long WXUNUSED(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;
 }