]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/slider.mm
more Unicode fixes
[wxWidgets.git] / src / cocoa / slider.mm
index 9b0cea9a5c333c2792b14da491d7f2399ff513df..f2fdeb9a83cb5e15e9261b6e6612f34e38e19379 100644 (file)
@@ -9,8 +9,11 @@
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+#include "wx/setup.h"
+#if wxUSE_SLIDER
+
 #include "wx/app.h"
 #include "wx/app.h"
-#include "wx/statline.h"
+#include "wx/slider.h"
 
 #import <AppKit/NSView.h>
 
 
 #import <AppKit/NSView.h>
 
@@ -26,16 +29,17 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
 {
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
 {
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
+    SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
     if(m_parent)
         m_parent->CocoaAddChild(this);
     [m_cocoaNSView release];
     if(m_parent)
         m_parent->CocoaAddChild(this);
+    SetInitialFrameRect(pos,size);
+
     return true;
 }
 
 wxSlider::~wxSlider()
 {
     return true;
 }
 
 wxSlider::~wxSlider()
 {
-    CocoaRemoveFromParent();
-    SetNSView(NULL);
 }
 
 }
 
+#endif // wxUSE_SLIDER