1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/slider.mm
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWidgets licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
17 #include "wx/slider.h"
20 #import <AppKit/NSSlider.h>
22 IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
23 BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
25 // WX_IMPLEMENT_COCOA_OWNER(wxSlider,NSSlider,NSControl,NSView)
27 bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
28 int value, int minValue, int maxValue,
29 const wxPoint& pos, const wxSize& size, long style,
30 const wxValidator& validator, const wxString& name)
32 if(!CreateControl(parent,winid,pos,size,style,validator,name))
34 SetNSView([[NSSlider alloc] initWithFrame: MakeDefaultNSRect(size)]);
35 [m_cocoaNSView release];
37 m_parent->CocoaAddChild(this);
38 SetInitialFrameRect(pos,size);
47 #endif // wxUSE_SLIDER