]> git.saurik.com Git - wxWidgets.git/commitdiff
Make public and document wxDataView{Index,Virtual}ListModel::GetCount().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Oct 2009 15:58:19 +0000 (15:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Oct 2009 15:58:19 +0000 (15:58 +0000)
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

include/wx/dataview.h
interface/wx/dataview.h

index 40883720964383ba911e569702a95416c63fc77f..66ef3ea532366714c359ec2c249b419f268f790d 100644 (file)
@@ -352,7 +352,6 @@ public:
     // implement base methods
     virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
 
     // implement base methods
     virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
 
-    // internal
     unsigned int GetCount() const { return m_hash.GetCount(); }
 
 private:
     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;
 
     // 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; }
     // internal
     virtual bool IsVirtualListModel() const { return true; }
-    unsigned int GetCount() const { return m_size; }
 
 private:
     unsigned int m_size;
 
 private:
     unsigned int m_size;
index d2a9202f3751ee02f2531118d873dd28cbbdfb8d..c33bb6d0af14d59dc2b09affdfef3dc13cb146d0 100644 (file)
@@ -366,6 +366,11 @@ public:
     virtual bool GetAttrByRow(unsigned int row, unsigned int col,
                          wxDataViewItemAttr& attr) const;
 
     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.
     */
     /**
         Returns the wxDataViewItem at the given @e row.
     */
@@ -458,6 +463,11 @@ public:
         Constructor.
     */
     wxDataViewVirtualListModel(unsigned int initial_size = 0);
         Constructor.
     */
     wxDataViewVirtualListModel(unsigned int initial_size = 0);
+
+    /**
+        Returns the number of virtual items (i.e. rows) in the list.
+    */
+    unsigned int GetCount() const;
 };
 
 
 };