Add wxMouseEvent::GetColumnsPerAction().

This is similar to the existing GetLinesPerAction() but is for, surprise,
columns.

Also change the documentation to say that the value returned by both of these
methods is 3 under "most platforms" as some wxOSX currently uses 1 and not 3.

Closes #15239.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-06-10 15:53:29 +00:00
parent 4775836d37
commit 5833988cb7
11 changed files with 47 additions and 2 deletions

View File

@@ -5607,7 +5607,20 @@ wxWindowMSW::HandleMouseWheel(wxMouseWheelAxis axis,
}
}
static int s_columnsPerRotation = -1;
if ( s_columnsPerRotation == -1 )
{
if ( !::SystemParametersInfo(SPI_GETWHEELSCROLLCHARS, 0,
&s_columnsPerRotation, 0))
{
// this setting is not supported on Windows 2000/XP, so use the value of 1
// http://msdn.microsoft.com/en-us/library/ms997498.aspx
s_columnsPerRotation = 1;
}
}
event.m_linesPerAction = s_linesPerRotation;
event.m_columnsPerAction = s_columnsPerRotation;
return HandleWindowEvent(event);
#else // !wxUSE_MOUSEWHEEL