]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/scrolbar.cpp
compilation fixes - wxGTK compiles but not links
[wxWidgets.git] / src / mac / scrolbar.cpp
index a432b3e9b122d7542304fc72e50333712a16c4c8..a022802c0597caa1579428975ccb4024847d409a 100644 (file)
@@ -82,9 +82,10 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
 
     if ( UMAGetAppearanceVersion() >= 0x0110  )
     {
-#if UMA_USE_8_6        
+        if ( SetControlViewSize != (void*) kUnresolvedCFragSymbolAddress )
+        {
                        SetControlViewSize( m_macControl , m_pageSize ) ;
-#endif
+        }
     }
     Refresh() ;
 }
@@ -111,19 +112,19 @@ void wxScrollBar::MacHandleControlClick( ControlHandle control , SInt16 controlp
        switch( controlpart )
        {
                case kControlUpButtonPart :
-        nScrollInc = -1;
+        nScrollInc = -m_pageSize;
         scrollEvent = wxEVT_SCROLL_LINEUP;
                        break ;
                case kControlDownButtonPart :
-        nScrollInc = 1;
+        nScrollInc = m_pageSize;
         scrollEvent = wxEVT_SCROLL_LINEDOWN;
                        break ;
                case kControlPageUpPart :
-        nScrollInc = -m_pageSize;
+        nScrollInc = -m_viewSize;
         scrollEvent = wxEVT_SCROLL_PAGEUP;
                        break ;
                case kControlPageDownPart :
-        nScrollInc = m_pageSize;
+        nScrollInc = m_viewSize;
         scrollEvent = wxEVT_SCROLL_PAGEDOWN;
                        break ;
                case kControlIndicatorPart :
@@ -152,6 +153,13 @@ void wxScrollBar::MacHandleControlClick( ControlHandle control , SInt16 controlp
        }
   event.SetPosition(new_pos);
   event.SetEventObject( this );
-  GetEventHandler()->ProcessEvent(event);
+  wxWindow* window = GetParent() ;
+  if (window && window->MacIsWindowScrollbar(this) )
+  {
+       // this is hardcoded
+       window->MacOnScroll(event);
+  }
+  else
+       GetEventHandler()->ProcessEvent(event);
 }