Improve wxListBox::GetCountPerPage() in wxGTK and wxOSX

Provide native implementation of this function instead of using the ad hoc one
in common code, which didn't really work -- so remove it completely now.

Closes #17189.
This commit is contained in:
Andreas Falkenhahn
2017-04-07 00:04:20 +02:00
committed by Vadim Zeitlin
parent accf7ab117
commit e77cb6f31f
9 changed files with 55 additions and 37 deletions

View File

@@ -73,7 +73,7 @@ public:
virtual void EnsureVisible(int n);
virtual int GetTopItem() const { return wxNOT_FOUND; }
virtual int GetCountPerPage() const;
virtual int GetCountPerPage() const { return -1; }
// 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
@@ -136,8 +136,6 @@ protected:
// single selection mode on platforms other than MSW).
void UpdateOldSelections();
wxCoord GetLineHeight() const;
private:
wxDECLARE_NO_COPY_CLASS(wxListBoxBase);
};