X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e02c72fa45b840601743e11bc6550481a36fa437..55bfbcb92b41ab1c6a0d490f2f3fcadefc069bb7:/include/wx/vscroll.h diff --git a/include/wx/vscroll.h b/include/wx/vscroll.h index 06437b0a14..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