// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/app.h"
-#include "wx/statline.h"
+#include "wx/wxprec.h"
+#if wxUSE_SLIDER
-#import <AppKit/NSView.h>
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/slider.h"
+#endif //WX_PRECOMP
+
+#import <AppKit/NSSlider.h>
IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
{
if(!CreateControl(parent,winid,pos,size,style,validator,name))
return false;
- SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
+ SetNSView([[NSSlider alloc] initWithFrame: MakeDefaultNSRect(size)]);
[m_cocoaNSView release];
if(m_parent)
m_parent->CocoaAddChild(this);
+ SetInitialFrameRect(pos,size);
+
return true;
}
wxSlider::~wxSlider()
{
- CocoaRemoveFromParent();
- SetNSView(NULL);
}
+#endif // wxUSE_SLIDER