1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/spinbutt.mm
3 // Purpose: wxSpinButton
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #include "wx/spinbutt.h"
18 #import <AppKit/NSStepper.h>
20 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
22 IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
23 BEGIN_EVENT_TABLE(wxSpinButton, wxSpinButtonBase)
25 // WX_IMPLEMENT_COCOA_OWNER(wxSpinButton,NSStepper,NSControl,NSView)
27 bool wxSpinButton::Create(wxWindow *parent, wxWindowID winid,
28 const wxPoint& pos, const wxSize& size, long style,
31 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
33 SetNSControl([[NSStepper alloc] initWithFrame: MakeDefaultNSRect(size)]);
34 [m_cocoaNSView release];
36 m_parent->CocoaAddChild(this);
37 SetInitialFrameRect(pos,size);
42 wxSpinButton::~wxSpinButton()
46 #endif // wxUSE_SPINBTN