X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/687706f5e722ac8a39172024f794ae0ffbd190e2..3b9b80c0e25ac0ef0d162b2a8e2d8206105a485b:/src/mac/carbon/scrolbar.cpp diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index 9098a0ad6d..d2422dd7dc 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -9,11 +9,11 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "scrolbar.h" #endif -#include "wx/defs.h" +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/intl.h" @@ -23,16 +23,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 +42,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 +79,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() ; }