X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5a0ed193cdad8f68b5c0db37329bb60c8e238847..b7e9f8b136c02826c7e5b3bf9b339d2013ac05f6:/include/wx/vscroll.h?ds=sidebyside diff --git a/include/wx/vscroll.h b/include/wx/vscroll.h index 84f7694df4..fdaf961e5f 100644 --- a/include/wx/vscroll.h +++ b/include/wx/vscroll.h @@ -15,7 +15,7 @@ #include "wx/panel.h" #include "wx/position.h" -class WXDLLEXPORT wxVarScrollHelperEvtHandler; +class WXDLLIMPEXP_FWD_CORE wxVarScrollHelperEvtHandler; // Using the same techniques as the wxScrolledWindow class | @@ -576,68 +576,54 @@ public: // this is the same as GetVisibleRowsBegin(), exists to match // GetLastVisibleLine() and for backwards compatibility only - wxDEPRECATED( size_t GetFirstVisibleLine() const ) - { return GetVisibleRowsBegin(); } + wxDEPRECATED( size_t GetFirstVisibleLine() const ); // get the last currently visible line // // this function is unsafe as it returns (size_t)-1 (i.e. a huge positive // number) if the control is empty, use GetVisibleRowsEnd() instead, this // one is kept for backwards compatibility - wxDEPRECATED( size_t GetLastVisibleLine() const ) - { return GetVisibleRowsEnd() - 1; } + wxDEPRECATED( size_t GetLastVisibleLine() const ); // "line" to "unit" compatibility functions // ---------------------------------------- // get the number of lines this window contains (set by SetLineCount()) - wxDEPRECATED( size_t GetLineCount() const ) - { return GetRowCount(); } + wxDEPRECATED( size_t GetLineCount() const ); // set the number of lines the helper contains: the derived class must // provide the sizes for all lines with indices up to the one given here // in its OnGetLineHeight() - wxDEPRECATED( void SetLineCount(size_t count) ) - { SetRowCount(count); } + wxDEPRECATED( void SetLineCount(size_t count) ); // redraw the specified line - wxDEPRECATED( virtual void RefreshLine(size_t line) ) - { RefreshRow(line); } + wxDEPRECATED( virtual void RefreshLine(size_t line) ); // redraw all lines in the specified range (inclusive) - wxDEPRECATED( virtual void RefreshLines(size_t from, size_t to) ) - { RefreshRows(from, to); } + wxDEPRECATED( virtual void RefreshLines(size_t from, size_t to) ); // scroll to the specified line: it will become the first visible line in // the window // // return true if we scrolled the window, false if nothing was done - wxDEPRECATED( bool ScrollToLine(size_t line) ) - { return ScrollToRow(line); } + wxDEPRECATED( bool ScrollToLine(size_t line) ); // scroll by the specified number of lines/pages - wxDEPRECATED( virtual bool ScrollLines(int lines) ) - { return ScrollRows(lines); } - wxDEPRECATED( virtual bool ScrollPages(int pages) ) - { return ScrollRowPages(pages); } + wxDEPRECATED( virtual bool ScrollLines(int lines) ); + wxDEPRECATED( virtual bool ScrollPages(int 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 wxDEPRECATED_BUT_USED_INTERNALLY( - virtual wxCoord OnGetLineHeight(size_t WXUNUSED(n)) const ) - { - wxFAIL_MSG( _T("OnGetLineHeight() must be overridden if OnGetRowHeight() isn't!") ); - return -1; - } + virtual wxCoord OnGetLineHeight(size_t n) const ); // forwards the calls from base class pure virtual function to pure virtual // OnGetLineHeight instead (backwards compatible name) // note that we don't need to forward OnGetUnitSize() as it is already // forwarded to OnGetRowHeight() in wxVarVScrollHelper - virtual wxCoord OnGetRowHeight(size_t n) const - { return OnGetLineHeight(n); } + virtual wxCoord OnGetRowHeight(size_t n) const; // this function doesn't have to be overridden but it may be useful to do // it if calculating the lines heights is a relatively expensive operation @@ -653,12 +639,11 @@ protected: // finally note that lineMin is inclusive, while lineMax is exclusive, as // usual wxDEPRECATED_BUT_USED_INTERNALLY( virtual void OnGetLinesHint( - size_t WXUNUSED(lineMin), size_t WXUNUSED(lineMax)) const ) { } + size_t lineMin, size_t lineMax) const ); // 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 - { OnGetLinesHint(rowMin, rowMax); } + void OnGetRowsHeightHint(size_t rowMin, size_t rowMax) const; }; #else // !WXWIN_COMPATIBILITY_2_8