X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d1a4878f36ba4b5f66c2ccfd2cb27a9dc528b6f..53a410d1b242fce6ef061c7e6d24f54f8e38664d:/src/mac/carbon/scrolbar.cpp?ds=sidebyside diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index 4dd6127cfb..7a240b834c 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "scrolbar.h" -#endif - #include "wx/wxprec.h" #ifndef WX_PRECOMP @@ -23,16 +19,11 @@ #include "wx/scrolbar.h" #include "wx/mac/uma.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) BEGIN_EVENT_TABLE(wxScrollBar, wxControl) END_EVENT_TABLE() -#endif - -extern ControlActionUPP wxMacLiveScrollbarActionUPP ; - // Scrollbar bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -47,9 +38,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ; - m_peer = new wxMacControl() ; + m_peer = new wxMacControl(this) ; verify_noerr ( CreateScrollBarControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , - 0 , 0 , 100 , 1 , true /* liveTracking */ , wxMacLiveScrollbarActionUPP , m_peer->GetControlRefAddr() ) ); + 0 , 0 , 100 , 1 , true /* liveTracking */ , GetwxMacLiveScrollbarActionProc() , m_peer->GetControlRefAddr() ) ); MacPostControlCreate(pos,size) ; @@ -84,9 +75,6 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS m_peer->SetMinimum( 0 ) ; m_peer->SetValue( position ) ; m_peer->SetViewSize( m_viewSize ) ; - - if ( refresh ) - MacRedrawControl() ; }