]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/scrolbar.cpp
generate middle click events (patch 1521314)
[wxWidgets.git] / src / univ / scrolbar.cpp
index 4ccf1481c528ec14517945643f7efecbdf9e8e3c..f446c73f340bdb26b8656f0d271e60522253d7e9 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        univ/scrolbar.cpp
+// Name:        src/univ/scrolbar.cpp
 // Purpose:     wxScrollBar implementation
 // Author:      Vadim Zeitlin
 // Modified by:
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "univscrolbar.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 
 #if wxUSE_SCROLLBAR
 
+#include "wx/scrolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/timer.h"
-
     #include "wx/dcclient.h"
-    #include "wx/scrolbar.h"
     #include "wx/validate.h"
+    #include "wx/log.h"
 #endif
 
 #include "wx/univ/scrtimer.h"
@@ -42,7 +39,6 @@
 #include "wx/univ/renderer.h"
 #include "wx/univ/inphand.h"
 #include "wx/univ/theme.h"
-#include "wx/log.h"
 
 #define WXDEBUG_SCROLLBAR
 
@@ -557,7 +553,7 @@ bool wxScrollBar::PerformAction(const wxControlAction& action,
             wxScrollEvent event(scrollType, this->GetId(), m_thumbPos,
                                 IsVertical() ? wxVERTICAL : wxHORIZONTAL);
             event.SetEventObject(this);
-            GetParent()->GetEventHandler()->ProcessEvent(event);
+            GetEventHandler()->ProcessEvent(event);
         }
         else // part of the window
         {
@@ -721,10 +717,8 @@ bool wxStdScrollBarInputHandler::HandleKey(wxInputConsumer *consumer,
             case WXK_LEFT:      action = wxACTION_SCROLL_LINE_UP;   break;
             case WXK_HOME:      action = wxACTION_SCROLL_START;     break;
             case WXK_END:       action = wxACTION_SCROLL_END;       break;
-            case WXK_PAGEUP:
-            case WXK_PRIOR:     action = wxACTION_SCROLL_PAGE_UP;   break;
-            case WXK_PAGEDOWN:
-            case WXK_NEXT:      action = wxACTION_SCROLL_PAGE_DOWN; break;
+            case WXK_PAGEUP:    action = wxACTION_SCROLL_PAGE_UP;   break;
+            case WXK_PAGEDOWN:  action = wxACTION_SCROLL_PAGE_DOWN; break;
         }
 
         if ( !action.IsEmpty() )
@@ -913,6 +907,8 @@ bool wxStdScrollBarInputHandler::HandleMouseMove(wxInputConsumer *consumer,
 
 #endif // wxUSE_SCROLLBAR
 
+#if wxUSE_TIMER
+
 // ----------------------------------------------------------------------------
 // wxScrollTimer
 // ----------------------------------------------------------------------------
@@ -956,3 +952,4 @@ void wxScrollTimer::Notify()
     }
 }
 
+#endif // wxUSE_TIMER