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:
committed by
Vadim Zeitlin
parent
256f644861
commit
6a01623a80
@@ -74,6 +74,8 @@ public:
|
||||
|
||||
virtual void EnsureVisible(int n) wxOVERRIDE;
|
||||
|
||||
virtual int GetTopItem() const wxOVERRIDE;
|
||||
|
||||
virtual void Update() wxOVERRIDE;
|
||||
|
||||
static wxVisualAttributes
|
||||
|
@@ -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);
|
||||
};
|
||||
|
@@ -95,6 +95,9 @@ public:
|
||||
|
||||
virtual void EnsureVisible(int n);
|
||||
|
||||
virtual int GetTopItem() const;
|
||||
virtual int GetCountPerPage() const;
|
||||
|
||||
// ownerdrawn wxListBox and wxCheckListBox support
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
// override base class virtuals
|
||||
|
@@ -609,6 +609,7 @@ public:
|
||||
// display
|
||||
|
||||
virtual void ListScrollTo( unsigned int n ) = 0;
|
||||
virtual int ListGetTopItem() const = 0;
|
||||
virtual void UpdateLine( unsigned int n, wxListWidgetColumn* col = NULL ) = 0;
|
||||
virtual void UpdateLineToEnd( unsigned int n) = 0;
|
||||
|
||||
|
@@ -108,6 +108,8 @@ public:
|
||||
|
||||
virtual void EnsureVisible(int n) wxOVERRIDE;
|
||||
|
||||
virtual int GetTopItem() const wxOVERRIDE;
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const wxOVERRIDE
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
|
Reference in New Issue
Block a user