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