Propagate the event handling fixes to wxVarScrollHelperBase.

Merge the fixes to wxScrollHelperBase::ProcessEvent() of r64358, r64370,
r64464, r72939 and possibly a few more in wxVarScrollHelperBase to fix its
behaviour too, as it wasn't generating the correct events any longer.

Unfortunately the fix right now is to physically copy the code from one class
to the other. This should be avoided, of course, and a more in depth
refactoring should be done to move the code common to both classes into
wxAnyScrollHelperBase after 3.0 release. But for now continuing to duplicate
code is better than not having a working wxVarScrollHelperBase.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-09-15 00:15:12 +00:00
parent 010d821b31
commit dc2513650d
4 changed files with 56 additions and 21 deletions

View File

@@ -186,6 +186,9 @@ void wxAutoScrollTimer::Notify()
// wxScrollHelperEvtHandler
// ----------------------------------------------------------------------------
// Notice that this method is currently duplicated in the method with the same
// name in wxVarScrollHelperEvtHandler class, until this is fixed, the other
// copy of the method needs to be modified every time this version is.
bool wxScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
{
wxEventType evType = event.GetEventType();
@@ -817,7 +820,7 @@ void wxScrollHelperBase::HandleOnSize(wxSizeEvent& WXUNUSED(event))
// This calls OnDraw, having adjusted the origin according to the current
// scroll position
void wxScrollHelperBase::HandleOnPaint(wxPaintEvent& WXUNUSED(event))
void wxAnyScrollHelperBase::HandleOnPaint(wxPaintEvent& WXUNUSED(event))
{
// don't use m_targetWindow here, this is always called for ourselves
wxPaintDC dc(m_win);