X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ca0d8122ab2ecbce178aa9f21f13270c4ffaca0..c92ad09968b09fe6e4cf17d9e962b51b7caaee91:/src/mac/carbon/scrolbar.cpp diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index d6454cf768..7a240b834c 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -9,11 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "scrolbar.h" -#endif - -#include "wx/defs.h" +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/intl.h" @@ -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,15 +75,12 @@ 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() ; } void wxScrollBar::Command(wxCommandEvent& event) { - SetThumbPosition(event.m_commandInt); + SetThumbPosition(event.GetInt()); ProcessCommand(event); }