]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/radiobox.mm
removed mark #pragmas
[wxWidgets.git] / src / cocoa / radiobox.mm
index 71b8994bad8f880546692d5e7db85a258442664d..ff0626e5c50b8907e3709fc8d51e38c2c3982b52 100644 (file)
@@ -9,8 +9,13 @@
 // Licence:    wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/app.h"
-#include "wx/radiobox.h"
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/radiobox.h"
+#endif //WX_PRECOMP
+
+#import <AppKit/NSView.h>
 
 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
 BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
@@ -28,15 +33,17 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
 {
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    m_cocoaNSView = NULL;
+    SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
+    [m_cocoaNSView release];
     if(m_parent)
         m_parent->CocoaAddChild(this);
+    SetInitialFrameRect(pos,size);
+
     return true;
 }
 
 wxRadioBox::~wxRadioBox()
 {
-    CocoaRemoveFromParent();
 }
 
     // selection