]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/spinbutt.cpp
'[1219035] cleanup: miscellaneous' and minor source cleaning.
[wxWidgets.git] / src / mac / carbon / spinbutt.cpp
index b3fd3830b1a102f3c160f5b8ca488ecd61d38f1b..a4645d88f3f2553bc08d4c8677caa9f03cc991d8 100644 (file)
@@ -9,12 +9,12 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "spinbutt.h"
 #pragma implementation "spinbuttbase.h"
 #endif
 
-#include "wx/defs.h"
+#include "wx/wxprec.h"
 
 #if wxUSE_SPINBTN
 
 // wxWin macros
 // ----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
-    IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-    IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
-#endif
-
-extern ControlActionUPP wxMacLiveScrollbarActionUPP ;
+IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
 
 wxSpinButton::wxSpinButton()
    : wxSpinButtonBase()
@@ -58,11 +54,11 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
 
     Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
 
-    m_peer = new wxMacControl() ;
+    m_peer = new wxMacControl(this) ;
     verify_noerr ( CreateLittleArrowsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , 0 , m_min , m_max , 1 ,
      m_peer->GetControlRefAddr() ) );
 
-    m_peer->SetActionProc( wxMacLiveScrollbarActionUPP ) ;
+    m_peer->SetActionProc( GetwxMacLiveScrollbarActionProc() ) ;
     MacPostControlCreate(pos,size) ;
 
     return true;