Moved the check for page scrolling with the wheel into wxMouseEvent so

it wouldn't have to be duplicated everywhere.

Also fixed wxSTC so it can handle wheel page scrolling too.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-19 21:11:31 +00:00
parent a536e41102
commit 9b9337da0c
11 changed files with 41 additions and 23 deletions

View File

@@ -1084,10 +1084,6 @@ void wxScrollHelper::HandleOnMouseLeave(wxMouseEvent& event)
#if wxUSE_MOUSEWHEEL
#ifndef WHEEL_PAGESCROLL
#define WHEEL_PAGESCROLL (UINT_MAX) // signifies to scroll a page
#endif
void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event)
{
m_wheelRotation += event.GetWheelRotation();
@@ -1103,7 +1099,7 @@ void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event)
newEvent.SetOrientation(wxVERTICAL);
newEvent.m_eventObject = m_win;
if (event.GetLinesPerAction() == WHEEL_PAGESCROLL)
if (event.IsPageScroll())
{
if (lines > 0)
newEvent.m_eventType = wxEVT_SCROLLWIN_PAGEUP;