-IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
-
-BEGIN_EVENT_TABLE(wxScrollBar, wxControl)
-END_EVENT_TABLE()
-
-
-bool wxScrollBar::Create( wxWindow *parent,
- wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& validator,
- const wxString& name )
-{
- m_macIsUserPane = false;
-
- if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
- return false;
-
- Rect bounds = wxMacGetBoundsForControl( this, pos, size );
-
- m_peer = new wxMacControl( this );
- OSStatus err = CreateScrollBarControl(
- MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
- 0, 0, 100, 1, true /* liveTracking */,
- GetwxMacLiveScrollbarActionProc(),
- m_peer->GetControlRefAddr() );
- verify_noerr( err );
-
- MacPostControlCreate( pos, size );
-
- return true;
-}
-
-wxScrollBar::~wxScrollBar()
-{
-}
-
-void wxScrollBar::SetThumbPosition( int viewStart )
-{
- m_peer->SetValue( viewStart );
-}
-
-int wxScrollBar::GetThumbPosition() const
-{
- return m_peer->GetValue();
-}
-
-void wxScrollBar::SetScrollbar( int position,
- int thumbSize,
- int range,
- int pageSize,
- bool WXUNUSED(refresh) )
-{
- m_pageSize = pageSize;
- m_viewSize = thumbSize;
- m_objectSize = range;
-
- int range1 = wxMax( (m_objectSize - m_viewSize), 0 );
-
- m_peer->SetMinimum( 0 );
- m_peer->SetMaximum( range1 );
- m_peer->SetValue( position );
- m_peer->SetViewSize( m_viewSize );
-}
-
-void wxScrollBar::Command( wxCommandEvent& event )