Missed a few substitutions the first time around
[wxWidgets.git] / src / cocoa / slider.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        cocoa/slider.mm
3 // Purpose:     wxSlider
4 // Author:      David Elliott
5 // Modified by:
6 // Created:     2003/06/19
7 // RCS-ID:      $Id$
8 // Copyright:   (c) 2003 David Elliott
9 // Licence:     wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/app.h"
13 #include "wx/slider.h"
14
15 #import <AppKit/NSView.h>
16
17 IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
18 BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
19 END_EVENT_TABLE()
20 // WX_IMPLEMENT_COCOA_OWNER(wxSlider,NSSlider,NSControl,NSView)
21
22 bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
23             int value, int minValue, int maxValue,
24             const wxPoint& pos, const wxSize& size, long style,
25             const wxValidator& validator, const wxString& name)
26 {
27     if(!CreateControl(parent,winid,pos,size,style,validator,name))
28         return false;
29     SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
30     [m_cocoaNSView release];
31     if(m_parent)
32         m_parent->CocoaAddChild(this);
33     return true;
34 }
35
36 wxSlider::~wxSlider()
37 {
38     CocoaRemoveFromParent();
39     SetNSView(NULL);
40 }
41