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