X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/524c47aa3adf2af11a3069fd5da035a604f08f66..55410bb4f67febe1ca20654f078ea4fb9a6223ae:/src/osx/carbon/scrolbar.cpp

diff --git a/src/osx/carbon/scrolbar.cpp b/src/osx/carbon/scrolbar.cpp
index 7fc53b8ae5..6b9f0fc37c 100644
--- a/src/osx/carbon/scrolbar.cpp
+++ b/src/osx/carbon/scrolbar.cpp
@@ -55,81 +55,3 @@ wxWidgetImplType* wxWidgetImpl::CreateScrollBar( wxWindowMac* wxpeer,
     verify_noerr( err );
     return peer;
 }
-
-void wxScrollBar::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 controlpart, bool mouseStillDown )
-{
-#if wxOSX_USE_CARBON
-
-    int position = m_peer->GetValue();
-    int minPos = 0 ;
-    int maxPos = m_peer->GetMaximum();
-
-    wxEventType scrollEvent = wxEVT_NULL;
-    int nScrollInc = 0;
-
-    // all events have already been reported during mouse down, except for THUMBRELEASE
-    if ( !mouseStillDown && controlpart != kControlIndicatorPart )
-        return;
-
-    switch ( controlpart )
-    {
-    case kControlUpButtonPart:
-        nScrollInc = -1;
-        scrollEvent = wxEVT_SCROLL_LINEUP;
-        break;
-
-    case kControlDownButtonPart:
-        nScrollInc = 1;
-        scrollEvent = wxEVT_SCROLL_LINEDOWN;
-        break;
-
-    case kControlPageUpPart:
-        nScrollInc = -m_pageSize;
-        scrollEvent = wxEVT_SCROLL_PAGEUP;
-        break;
-
-    case kControlPageDownPart:
-        nScrollInc = m_pageSize;
-        scrollEvent = wxEVT_SCROLL_PAGEDOWN;
-        break;
-
-    case kControlIndicatorPart:
-        nScrollInc = 0;
-        if ( mouseStillDown )
-            scrollEvent = wxEVT_SCROLL_THUMBTRACK;
-        else
-            scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
-        break;
-
-    default:
-        wxFAIL_MSG(wxT("unknown scrollbar selector"));
-        break;
-    }
-
-    int new_pos = position + nScrollInc;
-
-    if (new_pos < minPos)
-        new_pos = minPos;
-    else if (new_pos > maxPos)
-        new_pos = maxPos;
-
-    if ( nScrollInc )
-        SetThumbPosition( new_pos );
-
-    wxScrollEvent event( scrollEvent, m_windowId );
-    if ( m_windowStyle & wxHORIZONTAL )
-        event.SetOrientation( wxHORIZONTAL );
-    else
-        event.SetOrientation( wxVERTICAL );
-
-    event.SetPosition( new_pos );
-    event.SetEventObject( this );
-
-    wxWindow* window = GetParent();
-    if (window && window->MacIsWindowScrollbar( this ))
-        // this is hardcoded
-        window->MacOnScroll( event );
-    else
-        HandleWindowEvent( event );
-#endif
-}
\ No newline at end of file