diff options
Diffstat (limited to 'WebCore/platform/wx')
-rw-r--r-- | WebCore/platform/wx/MouseWheelEventWx.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/wx/ScrollViewWx.cpp | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/WebCore/platform/wx/MouseWheelEventWx.cpp b/WebCore/platform/wx/MouseWheelEventWx.cpp index 0bfbd4a..6064176 100644 --- a/WebCore/platform/wx/MouseWheelEventWx.cpp +++ b/WebCore/platform/wx/MouseWheelEventWx.cpp @@ -40,6 +40,10 @@ PlatformWheelEvent::PlatformWheelEvent(const wxMouseEvent& event, const wxPoint& , m_metaKey(event.MetaDown()) // FIXME: We'll have to test other browsers , m_deltaX(0) // wx doesn't support horizontal mouse wheel scrolling , m_deltaY(event.GetWheelRotation() / event.GetWheelDelta()) + , m_isAccepted(false) + , m_isContinuous(false) + , m_continuousDeltaX(0) + , m_continuousDeltaY(0) { } diff --git a/WebCore/platform/wx/ScrollViewWx.cpp b/WebCore/platform/wx/ScrollViewWx.cpp index b6c5ae4..8726fc3 100644 --- a/WebCore/platform/wx/ScrollViewWx.cpp +++ b/WebCore/platform/wx/ScrollViewWx.cpp @@ -68,7 +68,6 @@ public: win->Connect(wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEventHandler(ScrollViewPrivate::OnScrollWinEvents), NULL, this); win->Connect(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(ScrollViewPrivate::OnScrollWinEvents), NULL, this); win->Connect(wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEventHandler(ScrollViewPrivate::OnScrollWinEvents), NULL, this); - win->Connect(wxEVT_SCROLLWIN_TOP, wxScrollWinEventHandler(ScrollViewPrivate::OnScrollWinEvents), NULL, this); } void OnScrollWinEvents(wxScrollWinEvent& e) @@ -84,18 +83,30 @@ public: else pos.y = e.GetPosition(); } - else if ( scrollType == wxEVT_SCROLLWIN_LINEDOWN ) { + else if (scrollType == wxEVT_SCROLLWIN_LINEDOWN) { if (horiz) pos.x += LINE_STEP; else pos.y += LINE_STEP; } - else if ( scrollType == wxEVT_SCROLLWIN_LINEUP ) { + else if (scrollType == wxEVT_SCROLLWIN_LINEUP) { if (horiz) pos.x -= LINE_STEP; else pos.y -= LINE_STEP; } + else if (scrollType == wxEVT_SCROLLWIN_PAGEUP) { + if (horiz) + pos.x -= m_scrollView->visibleWidth() - PAGE_KEEP; + else + pos.y -= m_scrollView->visibleHeight() - PAGE_KEEP; + } + else if (scrollType == wxEVT_SCROLLWIN_PAGEDOWN) { + if (horiz) + pos.x += m_scrollView->visibleWidth() - PAGE_KEEP; + else + pos.y += m_scrollView->visibleHeight() - PAGE_KEEP; + } else return e.Skip(); |