Add wxListBox::GetTopItem() and GetCountPerPage()

Implement these methods for all the major ports, add them to the widgets
sample and documentation.

Closes #17189.
This commit is contained in:
Andreas Falkenhahn
2016-02-06 18:32:13 +01:00
committed by Vadim Zeitlin
parent 256f644861
commit 6a01623a80
13 changed files with 135 additions and 2 deletions

View File

@@ -72,6 +72,9 @@ public:
// necessary
virtual void EnsureVisible(int n);
virtual int GetTopItem() const { return wxNOT_FOUND; }
virtual int GetCountPerPage() const;
// a combination of Append() and EnsureVisible(): appends the item to the
// listbox and ensures that it is visible i.e. not scrolled out of view
void AppendAndEnsureVisible(const wxString& s);
@@ -133,6 +136,8 @@ protected:
// single selection mode on platforms other than MSW).
void UpdateOldSelections();
wxCoord GetLineHeight() const;
private:
wxDECLARE_NO_COPY_CLASS(wxListBoxBase);
};