X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b8c7ba607a15a2ff8a04448138df9ffff7df6c5..46ae103b9f08fc4e447d16a6a92b03cf55ee3189:/wxPython/src/_vscroll.i diff --git a/wxPython/src/_vscroll.i b/wxPython/src/_vscroll.i index db0f28cee9..e833ef77b6 100644 --- a/wxPython/src/_vscroll.i +++ b/wxPython/src/_vscroll.i @@ -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; + }; //--------------------------------------------------------------------------- @@ -346,7 +357,7 @@ public: PyObject* GetFirstSelected() { unsigned long cookie = 0; int selected = self->GetFirstSelected(cookie); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(selected)); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie)); @@ -363,7 +374,7 @@ public: // int GetNextSelected(unsigned long& cookie) const; PyObject* GetNextSelected(unsigned long cookie) { int selected = self->GetNextSelected(cookie); - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(selected)); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));