X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/707d9f404764f83f1e0f5101fc4855b65b74d7e7..70405f7e3d3a1274d54c05ca8124d8bfb0bc3bb1:/include/wx/scrolwin.h diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h index 6f36cc93f9..0ba4976501 100644 --- a/include/wx/scrolwin.h +++ b/include/wx/scrolwin.h @@ -208,6 +208,33 @@ 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); + + // 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) + { + // returning just size from here is wrong but it was decided that it is + // not wrong enough to break the existing code (which doesn't override + // this recently added function at all) by adding this assert + // + // wxASSERT_MSG( m_targetWindow == m_win, "must be overridden" ); + + return size; + } + double m_scaleX; double m_scaleY; @@ -237,6 +264,7 @@ protected: wxScrollHelperEvtHandler *m_handler; + DECLARE_NO_COPY_CLASS(wxScrollHelper) };