// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/setup.h"
+#include "wx/wxprec.h"
#if wxUSE_SPINBTN
-#include "wx/app.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+#endif //WX_PRECOMP
#include "wx/spinbutt.h"
#import <AppKit/NSStepper.h>
+IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
+
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
BEGIN_EVENT_TABLE(wxSpinButton, wxSpinButtonBase)
END_EVENT_TABLE()
{
if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
return false;
- SetNSControl([[NSStepper alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
+ SetNSControl([[NSStepper alloc] initWithFrame: MakeDefaultNSRect(size)]);
[m_cocoaNSView release];
if(m_parent)
m_parent->CocoaAddChild(this);
+ SetInitialFrameRect(pos,size);
+
return true;
}