]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/slider.cpp
fixed a (harmless) BoundsChecker warning
[wxWidgets.git] / src / univ / slider.cpp
index 3c89f0acb7998a66229e19103e3b5ed634066b1d..8361ab7d543a3b6221fc64805c1a46b66ed995d0 100644 (file)
@@ -43,7 +43,7 @@
 // ----------------------------------------------------------------------------
 
 #ifdef __GNUG__
 // ----------------------------------------------------------------------------
 
 #ifdef __GNUG__
-    #pragma implementation "slider.h"
+    #pragma implementation "univslider.h"
 #endif
 
 #include "wx/wxprec.h"
 #endif
 
 #include "wx/wxprec.h"
@@ -916,7 +916,7 @@ bool wxSlider::OnPageScroll(int pageInc)
 // wxStdSliderButtonInputHandler
 // ----------------------------------------------------------------------------
 
 // wxStdSliderButtonInputHandler
 // ----------------------------------------------------------------------------
 
-bool wxStdSliderButtonInputHandler::HandleKey(wxControl *control,
+bool wxStdSliderButtonInputHandler::HandleKey(wxInputConsumer *consumer,
                                               const wxKeyEvent& event,
                                               bool pressed)
 {
                                               const wxKeyEvent& event,
                                               bool pressed)
 {
@@ -946,29 +946,31 @@ bool wxStdSliderButtonInputHandler::HandleKey(wxControl *control,
                 break;
 
             case WXK_PRIOR:
                 break;
 
             case WXK_PRIOR:
+            case WXK_PAGEUP:
                 action = wxACTION_SLIDER_PAGE_UP;
                 break;
 
             case WXK_NEXT:
                 action = wxACTION_SLIDER_PAGE_UP;
                 break;
 
             case WXK_NEXT:
+            case WXK_PAGEDOWN:
                 action = wxACTION_SLIDER_PAGE_DOWN;
                 break;
         }
 
         if ( !!action )
         {
                 action = wxACTION_SLIDER_PAGE_DOWN;
                 break;
         }
 
         if ( !!action )
         {
-            control->PerformAction(action);
+            consumer->PerformAction(action);
 
             return TRUE;
         }
     }
 
 
             return TRUE;
         }
     }
 
-    return wxStdInputHandler::HandleKey(control, event, pressed);
+    return wxStdInputHandler::HandleKey(consumer, event, pressed);
 }
 
 }
 
-bool wxStdSliderButtonInputHandler::HandleMouse(wxControl *control,
+bool wxStdSliderButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
                                                 const wxMouseEvent& event)
 {
                                                 const wxMouseEvent& event)
 {
-    wxSlider *slider = wxStaticCast(control, wxSlider);
+    wxSlider *slider = wxStaticCast(consumer->GetInputWindow(), wxSlider);
 
     if ( slider->GetThumb().HandleMouse(event) )
     {
 
     if ( slider->GetThumb().HandleMouse(event) )
     {
@@ -976,13 +978,13 @@ bool wxStdSliderButtonInputHandler::HandleMouse(wxControl *control,
         return FALSE;
     }
 
         return FALSE;
     }
 
-    return wxStdInputHandler::HandleMouse(control, event);
+    return wxStdInputHandler::HandleMouse(consumer, event);
 }
 
 }
 
-bool wxStdSliderButtonInputHandler::HandleMouseMove(wxControl *control,
+bool wxStdSliderButtonInputHandler::HandleMouseMove(wxInputConsumer *consumer,
                                                     const wxMouseEvent& event)
 {
                                                     const wxMouseEvent& event)
 {
-    wxSlider *slider = wxStaticCast(control, wxSlider);
+    wxSlider *slider = wxStaticCast(consumer->GetInputWindow(), wxSlider);
 
     if ( slider->GetThumb().HandleMouseMove(event) )
     {
 
     if ( slider->GetThumb().HandleMouseMove(event) )
     {
@@ -990,10 +992,10 @@ bool wxStdSliderButtonInputHandler::HandleMouseMove(wxControl *control,
         return FALSE;
     }
 
         return FALSE;
     }
 
-    return wxStdInputHandler::HandleMouseMove(control, event);
+    return wxStdInputHandler::HandleMouseMove(consumer, event);
 }
 
 }
 
-bool wxStdSliderButtonInputHandler::HandleFocus(wxControl *control,
+bool wxStdSliderButtonInputHandler::HandleFocus(wxInputConsumer *consumer,
                                                 const wxFocusEvent& event)
 {
     // slider's appearance changes when it gets/loses focus
                                                 const wxFocusEvent& event)
 {
     // slider's appearance changes when it gets/loses focus