X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69367c566e7b86f7387f730cd3b4b947a44017df..11393d2900fdd267f22d653721c6be745d0c4649:/include/wx/scrolwin.h diff --git a/include/wx/scrolwin.h b/include/wx/scrolwin.h index 860c65d559..0ba4976501 100644 --- a/include/wx/scrolwin.h +++ b/include/wx/scrolwin.h @@ -219,6 +219,22 @@ protected: 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; @@ -248,18 +264,6 @@ 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) };