Make public and document wxDataView{Index,Virtual}ListModel::GetCount().
This method is useful for getting the number of items in the control and should be part of the public API instead of being marked as internal. Closes #11380. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -352,7 +352,6 @@ public:
|
|||||||
// implement base methods
|
// implement base methods
|
||||||
virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
|
virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
|
||||||
|
|
||||||
// internal
|
|
||||||
unsigned int GetCount() const { return m_hash.GetCount(); }
|
unsigned int GetCount() const { return m_hash.GetCount(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -398,9 +397,10 @@ public:
|
|||||||
// implement base methods
|
// implement base methods
|
||||||
virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
|
virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
|
||||||
|
|
||||||
|
unsigned int GetCount() const { return m_size; }
|
||||||
|
|
||||||
// internal
|
// internal
|
||||||
virtual bool IsVirtualListModel() const { return true; }
|
virtual bool IsVirtualListModel() const { return true; }
|
||||||
unsigned int GetCount() const { return m_size; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int m_size;
|
unsigned int m_size;
|
||||||
|
@@ -366,6 +366,11 @@ public:
|
|||||||
virtual bool GetAttrByRow(unsigned int row, unsigned int col,
|
virtual bool GetAttrByRow(unsigned int row, unsigned int col,
|
||||||
wxDataViewItemAttr& attr) const;
|
wxDataViewItemAttr& attr) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the number of items (i.e. rows) in the list.
|
||||||
|
*/
|
||||||
|
unsigned int GetCount() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the wxDataViewItem at the given @e row.
|
Returns the wxDataViewItem at the given @e row.
|
||||||
*/
|
*/
|
||||||
@@ -458,6 +463,11 @@ public:
|
|||||||
Constructor.
|
Constructor.
|
||||||
*/
|
*/
|
||||||
wxDataViewVirtualListModel(unsigned int initial_size = 0);
|
wxDataViewVirtualListModel(unsigned int initial_size = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the number of virtual items (i.e. rows) in the list.
|
||||||
|
*/
|
||||||
|
unsigned int GetCount() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user