cleanup - reformatting (again)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: scrolbar.cpp
|
||||
// Name: src/mac/carbon/scrolbar.cpp
|
||||
// Purpose: wxScrollBar
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
#endif // WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include "wx/scrolbar.h"
|
||||
#include "wx/mac/uma.h"
|
||||
@@ -41,8 +41,12 @@ bool wxScrollBar::Create(wxWindow *parent,
|
||||
Rect bounds = wxMacGetBoundsForControl( this, pos, size );
|
||||
|
||||
m_peer = new wxMacControl( this );
|
||||
verify_noerr( CreateScrollBarControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
|
||||
0 , 0 , 100 , 1 , true /* liveTracking */ , GetwxMacLiveScrollbarActionProc() , m_peer->GetControlRefAddr() ) );
|
||||
OSStatus err = CreateScrollBarControl(
|
||||
MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
|
||||
0, 0, 100, 1, true /* liveTracking */,
|
||||
GetwxMacLiveScrollbarActionProc(),
|
||||
m_peer->GetControlRefAddr() );
|
||||
verify_noerr( err );
|
||||
|
||||
MacPostControlCreate( pos, size );
|
||||
|
||||
@@ -71,8 +75,8 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
|
||||
|
||||
int range1 = wxMax( (m_objectSize - m_viewSize), 0 );
|
||||
|
||||
m_peer->SetMaximum( range1 ) ;
|
||||
m_peer->SetMinimum( 0 );
|
||||
m_peer->SetMaximum( range1 );
|
||||
m_peer->SetValue( position );
|
||||
m_peer->SetViewSize( m_viewSize );
|
||||
}
|
||||
@@ -127,7 +131,7 @@ void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(wxT("illegal scrollbar selector"));
|
||||
wxFAIL_MSG(wxT("unknown scrollbar selector"));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -171,6 +175,8 @@ wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF meven
|
||||
ControlPartCode controlpart = cEvent.GetParameter<ControlPartCode>(kEventParamControlPart, typeControlPartCode);
|
||||
|
||||
// all events have already been reported during mouse down, except for THUMBRELEASE
|
||||
// NB: this may need to be reviewed in light of the fact that scroll wheel events
|
||||
// aren't being handled properly
|
||||
if ( controlpart != kControlIndicatorPart )
|
||||
return eventNotHandledErr;
|
||||
|
||||
@@ -182,7 +188,7 @@ wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF meven
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(wxT("illegal scrollbar selector"));
|
||||
wxFAIL_MSG(wxT("unknown scrollbar selector"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user