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