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:
@@ -66,9 +66,19 @@ class WXDLLIMPEXP_CORE wxAnyScrollHelperBase
|
||||
public:
|
||||
wxEXPLICIT wxAnyScrollHelperBase(wxWindow* win);
|
||||
|
||||
// Override this function to draw the graphic (or just process EVT_PAINT)
|
||||
virtual void OnDraw(wxDC& WXUNUSED(dc)) { }
|
||||
|
||||
// change the DC origin according to the scroll position.
|
||||
virtual void DoPrepareDC(wxDC& dc) = 0;
|
||||
|
||||
// Simple accessor for the window that is really being scrolled.
|
||||
wxWindow *GetTargetWindow() const { return m_targetWindow; }
|
||||
|
||||
|
||||
// The methods called from the window event handlers.
|
||||
void HandleOnPaint(wxPaintEvent& event);
|
||||
|
||||
protected:
|
||||
// the window that receives the scroll events and the window to actually
|
||||
// scroll, respectively
|
||||
@@ -199,10 +209,6 @@ public:
|
||||
void SetTargetRect(const wxRect& rect) { m_rectToScroll = rect; }
|
||||
wxRect GetTargetRect() const { return m_rectToScroll; }
|
||||
|
||||
// Override this function to draw the graphic (or just process EVT_PAINT)
|
||||
virtual void OnDraw(wxDC& WXUNUSED(dc)) { }
|
||||
|
||||
// change the DC origin according to the scroll position.
|
||||
virtual void DoPrepareDC(wxDC& dc);
|
||||
|
||||
// are we generating the autoscroll events?
|
||||
@@ -222,7 +228,6 @@ public:
|
||||
// the methods to be called from the window event handlers
|
||||
void HandleOnScroll(wxScrollWinEvent& event);
|
||||
void HandleOnSize(wxSizeEvent& event);
|
||||
void HandleOnPaint(wxPaintEvent& event);
|
||||
void HandleOnChar(wxKeyEvent& event);
|
||||
void HandleOnMouseEnter(wxMouseEvent& event);
|
||||
void HandleOnMouseLeave(wxMouseEvent& event);
|
||||
|
Reference in New Issue
Block a user