]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/statbox.mm
use the window default colours, not hardcoded ones, in OnSysColourChanged()
[wxWidgets.git] / src / cocoa / statbox.mm
index 00a22bc123ba94846934e6e60ebb6dd79740e91a..202608a7be39548cbd6dc8fa948cd34782474686 100644 (file)
@@ -9,10 +9,14 @@
 // Licence:    wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:    wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/app.h"
-#include "wx/statbox.h"
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/statbox.h"
+#endif //WX_PRECOMP
 
 #include "wx/cocoa/autorelease.h"
 
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/string.h"
 
 #import <AppKit/NSBox.h>
 #import <Foundation/NSString.h>
 
 #import <AppKit/NSBox.h>
 #import <Foundation/NSString.h>
@@ -34,7 +38,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid,
         return false;
     m_cocoaNSView = NULL;
     SetNSBox([[NSBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
         return false;
     m_cocoaNSView = NULL;
     SetNSBox([[NSBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
-    [GetNSBox() setTitle:[NSString stringWithCString:title.c_str()]];
+    [GetNSBox() setTitle:wxNSStringWithWxString(wxStripMenuCodes(title))];
     if(m_parent)
         m_parent->CocoaAddChild(this);
     SetInitialFrameRect(pos,size);
     if(m_parent)
         m_parent->CocoaAddChild(this);
     SetInitialFrameRect(pos,size);
@@ -44,7 +48,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid,
 
 wxStaticBox::~wxStaticBox()
 {
 
 wxStaticBox::~wxStaticBox()
 {
-    DisassociateNSBox(m_cocoaNSView);
+    DisassociateNSBox(GetNSBox());
 }
 
 void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
 }
 
 void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const