X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6e6b35578d9be94739e1f9ebadcb57d9a483db6a..68204d23c26d9fb8c813009dc2b24f5d1c8a279b:/wxPython/src/_vscroll.i diff --git a/wxPython/src/_vscroll.i b/wxPython/src/_vscroll.i index ff24d30bd3..00f7f71217 100644 --- a/wxPython/src/_vscroll.i +++ b/wxPython/src/_vscroll.i @@ -35,7 +35,7 @@ %{ class wxPyVScrolledWindow : public wxVScrolledWindow { - DECLARE_ABSTRACT_CLASS(wxPyVScrolledWindow); + DECLARE_ABSTRACT_CLASS(wxPyVScrolledWindow) public: wxPyVScrolledWindow() : wxVScrolledWindow() {} @@ -189,14 +189,25 @@ public: size_t GetLineCount() const; // get the first currently visible line - size_t GetFirstVisibleLine() const; + size_t GetVisibleBegin() const; // get the last currently visible line - size_t GetLastVisibleLine() const; + size_t GetVisibleEnd() const; // is this line currently visible? bool IsVisible(size_t line) const; + // this is the same as GetVisibleBegin(), exists to match + // GetLastVisibleLine() and for backwards compatibility only + 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 GetVisibleEnd() instead, this one + // is kept for backwards compatibility + size_t GetLastVisibleLine() const; + }; //--------------------------------------------------------------------------- @@ -213,7 +224,7 @@ MAKE_CONST_WXSTRING(VListBoxNameStr); %{ class wxPyVListBox : public wxVListBox { - DECLARE_ABSTRACT_CLASS(wxPyVListBox); + DECLARE_ABSTRACT_CLASS(wxPyVListBox) public: wxPyVListBox() : wxVListBox() {} @@ -452,7 +463,7 @@ public: %{ class wxPyHtmlListBox : public wxHtmlListBox { - DECLARE_ABSTRACT_CLASS(wxPyHtmlListBox); + DECLARE_ABSTRACT_CLASS(wxPyHtmlListBox) public: wxPyHtmlListBox() : wxHtmlListBox() {}