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;
+
};
//---------------------------------------------------------------------------
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));
// 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));