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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user