]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_vscroll.i
Use the wx.ART_NORMAL_FILE icon
[wxWidgets.git] / wxPython / src / _vscroll.i
index db0f28cee9baf3b3084294d2a6d3d88eaf5b0444..e833ef77b6ec79e1676e9f7f03f68631c1a48a83 100644 (file)
@@ -189,14 +189,25 @@ public:
     size_t GetLineCount() const;
 
     // get the first currently visible line
     size_t GetLineCount() const;
 
     // get the first currently visible line
-    size_t GetFirstVisibleLine() const;
+    size_t GetVisibleBegin() const;
 
     // get the last currently visible line
 
     // 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;
 
 
     // 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);
         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));
             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);
         // 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));
             PyObject* tup = PyTuple_New(2);
             PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(selected));
             PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));