]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/spinbutt.mm
Clear --> ClearBackground
[wxWidgets.git] / src / cocoa / spinbutt.mm
CommitLineData
768d9ec8
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/spinbutt.mm
3// Purpose: wxSpinButton
4// Author: David Elliott
5// Modified by:
6// Created: 2003/07/14
7// RCS-ID: $Id$
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/setup.h"
13#if wxUSE_SPINBTN
14
15#include "wx/app.h"
16#include "wx/spinbutt.h"
17
18#import <AppKit/NSStepper.h>
19
7cc28452
DE
20IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
21
768d9ec8
DE
22IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
23BEGIN_EVENT_TABLE(wxSpinButton, wxSpinButtonBase)
24END_EVENT_TABLE()
25// WX_IMPLEMENT_COCOA_OWNER(wxSpinButton,NSStepper,NSControl,NSView)
26
27bool wxSpinButton::Create(wxWindow *parent, wxWindowID winid,
28 const wxPoint& pos, const wxSize& size, long style,
29 const wxString& name)
30{
31 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
32 return false;
33 SetNSControl([[NSStepper alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
34 [m_cocoaNSView release];
35 if(m_parent)
36 m_parent->CocoaAddChild(this);
37 return true;
38}
39
40wxSpinButton::~wxSpinButton()
41{
42}
43
44#endif // wxUSE_SPINBTN