From: Vadim Zeitlin Date: Sat, 31 Oct 2009 15:58:19 +0000 (+0000) Subject: Make public and document wxDataView{Index,Virtual}ListModel::GetCount(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/74d9b8fbd6e7bae0735fb9e059ba4a54082e693e?ds=inline 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 --- diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 4088372096..66ef3ea532 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -352,7 +352,6 @@ public: // implement base methods virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const; - // internal unsigned int GetCount() const { return m_hash.GetCount(); } private: @@ -398,9 +397,10 @@ public: // implement base methods virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const; + unsigned int GetCount() const { return m_size; } + // internal virtual bool IsVirtualListModel() const { return true; } - unsigned int GetCount() const { return m_size; } private: unsigned int m_size; diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index d2a9202f37..c33bb6d0af 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -366,6 +366,11 @@ public: virtual bool GetAttrByRow(unsigned int row, unsigned int col, 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. */ @@ -458,6 +463,11 @@ public: Constructor. */ wxDataViewVirtualListModel(unsigned int initial_size = 0); + + /** + Returns the number of virtual items (i.e. rows) in the list. + */ + unsigned int GetCount() const; };