X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f18eaf2687ab42c97ccf469a2617306cadc0c6ef..55bfbcb92b41ab1c6a0d490f2f3fcadefc069bb7:/include/wx/vscroll.h?ds=sidebyside diff --git a/include/wx/vscroll.h b/include/wx/vscroll.h index 1d15edfb5d..4b18ca6333 100644 --- a/include/wx/vscroll.h +++ b/include/wx/vscroll.h @@ -351,7 +351,7 @@ protected: // forward calls to OnGetRowsHeightHint() virtual void OnGetUnitsSizeHint(size_t unitMin, size_t unitMax) const - { return OnGetRowsHeightHint(unitMin, unitMax); } + { OnGetRowsHeightHint(unitMin, unitMax); } // again, if not overridden, it will fall back on default method virtual wxCoord EstimateTotalHeight() const @@ -434,7 +434,7 @@ protected: // forward calls to OnGetColumnsWidthHint() virtual void OnGetUnitsSizeHint(size_t unitMin, size_t unitMax) const - { return OnGetColumnsWidthHint(unitMin, unitMax); } + { OnGetColumnsWidthHint(unitMin, unitMax); } // again, if not overridden, it will fall back on default method virtual wxCoord EstimateTotalWidth() const { return DoEstimateTotalSize(); } @@ -618,9 +618,15 @@ public: virtual bool ScrollPages(int pages) { return ScrollRowPages(pages); } protected: + // unless the code has been updated to override OnGetRowHeight() instead, // this function must be overridden in the derived class and it should // return the height of the given row in pixels - virtual wxCoord OnGetLineHeight(size_t n) const = 0; + virtual wxCoord OnGetLineHeight(size_t WXUNUSED(n)) const + { + wxFAIL_MSG( _T("must be overridden if OnGetRowHeight() isn't!") ); + + return -1; + } // forwards the calls from base class pure virtual function to pure virtual // OnGetLineHeight instead (backwards compatible name) @@ -648,7 +654,7 @@ protected: // forwards the calls from base class pure virtual function to pure virtual // OnGetLinesHint instead (backwards compatible name) void OnGetRowsHeightHint(size_t rowMin, size_t rowMax) const - { return OnGetLinesHint(rowMin, rowMax); } + { OnGetLinesHint(rowMin, rowMax); } // get the total height of the lines between lineMin (inclusive) and @@ -660,9 +666,9 @@ protected: #else // !WXWIN_COMPATIBILITY_2_8 // shortcut to avoid checking compatibility modes later -// remove this and all references to wxVarVScrollLegacyAdapter once +// remove this and all references to wxVarVScrollLegacyAdaptor once // wxWidgets 2.6 and 2.8 compatibility is removed -typedef wxVarVScrollLegacyAdapter wxVarVScrollHelper; +typedef wxVarVScrollHelper wxVarVScrollLegacyAdaptor; #endif // WXWIN_COMPATIBILITY_2_8/!WXWIN_COMPATIBILITY_2_8