Add wxAnyScrollHelperBase to reduce code duplication in wxVarScrollHelperBase.

This is just a small refactoring to move some trivially common parts of
wxScrollHelperBase and wxVarScrollHelperBase in a new common base class.
This will make it possible to apply other corrections to wxVarScrollHelperBase
without having to physically duplicate the code from wxScrollHelperBase in it.

See #15357.

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

View File

@@ -139,9 +139,8 @@ bool wxVarScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
// ----------------------------------------------------------------------------
wxVarScrollHelperBase::wxVarScrollHelperBase(wxWindow *win)
: wxAnyScrollHelperBase(win)
{
wxASSERT_MSG( win, wxT("associated window can't be NULL in wxVarScrollHelperBase") );
#if wxUSE_MOUSEWHEEL
m_sumWheelRotation = 0;
#endif
@@ -150,17 +149,11 @@ wxVarScrollHelperBase::wxVarScrollHelperBase(wxWindow *win)
m_sizeTotal = 0;
m_unitFirst = 0;
m_win =
m_targetWindow = NULL;
m_physicalScrolling = true;
m_handler = NULL;
m_win = win;
// by default, the associated window is also the target window
DoSetTargetWindow(win);
}
wxVarScrollHelperBase::~wxVarScrollHelperBase()