move the grid-specific workaround for scrollbar hysteresis to wxScrollHelper itself, the scrollbars now should not only appear but also disappear correctly during resizing

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-14 22:44:08 +00:00
parent 801a964104
commit 69367c566e
4 changed files with 135 additions and 146 deletions

View File

@@ -208,6 +208,17 @@ protected:
// in wxScrollHelperEvtHandler::ProcessEvent()
void ResetDrawnFlag();
// helper of AdjustScrollbars(): does the work for the single scrollbar
//
// notice that the parameters passed by non-const references are modified
// by this function
void AdjustScrollbar(int orient,
int clientSize,
int virtSize,
int& pixelsPerUnit,
int& scrollUnits,
int& scrollPosition);
double m_scaleX;
double m_scaleY;
@@ -237,6 +248,19 @@ protected:
wxScrollHelperEvtHandler *m_handler;
private:
// this function should be overridden to return the size available for
// m_targetWindow inside m_win of the given size
//
// the default implementation is only good for m_targetWindow == m_win
// case, if we're scrolling a subwindow you must override this method
virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size)
{
wxASSERT_MSG( m_targetWindow == m_win, "must be overridden" );
return size;
}
DECLARE_NO_COPY_CLASS(wxScrollHelper)
};