]> git.saurik.com Git - wxWidgets.git/commitdiff
Document wxDataViewListModel as common abstract base class for
authorRobert Roebling <robert@roebling.de>
Mon, 13 Sep 2010 20:12:57 +0000 (20:12 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 13 Sep 2010 20:12:57 +0000 (20:12 +0000)
wxDataViewIndexListModel and wxDataViewVirtualListModel.

Add wxDataViewListModel::GetCount() as both have it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 0daadfc7ed90a9518979d99bc44bcb126c5e7efc..173039c072290d05413a07afc7c70383add64d9a 100644 (file)
@@ -305,6 +305,8 @@ public:
     // helper methods provided by list models only
     virtual unsigned GetRow( const wxDataViewItem &item ) const = 0;
 
     // helper methods provided by list models only
     virtual unsigned GetRow( const wxDataViewItem &item ) const = 0;
 
+    // returns the number of rows 
+    virtual unsigned int GetCount() const = 0;
 
     // implement some base class pure virtual directly
     virtual wxDataViewItem
 
     // implement some base class pure virtual directly
     virtual wxDataViewItem
@@ -339,6 +341,7 @@ public:
         return GetAttrByRow( GetRow(item), col, attr );
     }
 
         return GetAttrByRow( GetRow(item), col, attr );
     }
 
+
     virtual bool IsListModel() const { return true; }
 };
 
     virtual bool IsListModel() const { return true; }
 };
 
index 4947ed44ede781bb71ba7add6a72f31b057def62..bfbf14018c8bed1e8f82b3ae37c2c481362ace86 100644 (file)
@@ -327,28 +327,17 @@ protected:
 
 
 /**
 
 
 /**
-    @class wxDataViewIndexListModel
+    @class wxDataViewListModel
 
 
-    wxDataViewIndexListModel is a specialized data model which lets you address
-    an item by its position (row) rather than its wxDataViewItem (which you can
-    obtain from this class).
-    This model also provides its own wxDataViewIndexListModel::Compare
-    method which sorts the model's data by the index.
-
-    This model is not a virtual model since the control stores each wxDataViewItem.
-    Use wxDataViewVirtualListModel if you need to display millions of items or
-    have other reason to use a virtual control.
+    Base class with abstract API for wxDataViewIndexListModel and
+    wxDataViewVirtualListModel.
 
     @library{wxadv}
     @category{dvc}
 */
 
     @library{wxadv}
     @category{dvc}
 */
-class wxDataViewIndexListModel : public wxDataViewModel
+class wxDataViewListModel : public wxDataViewModel
 {
 public:
 {
 public:
-    /**
-        Constructor.
-    */
-    wxDataViewIndexListModel(unsigned int initial_size = 0);
 
     /**
         Destructor.
 
     /**
         Destructor.
@@ -455,6 +444,34 @@ public:
 };
 
 
 };
 
 
+/**
+    @class wxDataViewIndexListModel
+
+    wxDataViewIndexListModel is a specialized data model which lets you address
+    an item by its position (row) rather than its wxDataViewItem (which you can
+    obtain from this class).
+    This model also provides its own wxDataViewIndexListModel::Compare
+    method which sorts the model's data by the index.
+
+    This model is not a virtual model since the control stores each wxDataViewItem.
+    Use wxDataViewVirtualListModel if you need to display millions of items or
+    have other reason to use a virtual control.
+
+    @see wxDataViewListModel for the API.
+    
+    @library{wxadv}
+    @category{dvc}
+*/
+
+class wxDataViewIndexListModel : public wxDataViewListModel
+{
+public:
+    /**
+        Constructor.
+    */
+    wxDataViewIndexListModel(unsigned int initial_size = 0);
+
+};
 
 /**
     @class wxDataViewVirtualListModel
 
 /**
     @class wxDataViewVirtualListModel
@@ -464,15 +481,15 @@ public:
     the exact same interface as wxDataViewIndexListModel.
     The important difference is that under platforms other than OS X, using this
     model will result in a truly virtual control able to handle millions of items
     the exact same interface as wxDataViewIndexListModel.
     The important difference is that under platforms other than OS X, using this
     model will result in a truly virtual control able to handle millions of items
-    as the control doesn't store any item (a feature not supported by the
-    Carbon API under OS X).
+    as the control doesn't store any item (a feature not supported by OS X).
 
 
-    @see wxDataViewIndexListModel for the API.
+    @see wxDataViewListModel for the API.
 
     @library{wxadv}
     @category{dvc}
 */
 
     @library{wxadv}
     @category{dvc}
 */
-class wxDataViewVirtualListModel : public wxDataViewModel
+
+class wxDataViewVirtualListModel : public wxDataViewListModel
 {
 public:
     /**
 {
 public:
     /**
@@ -480,10 +497,6 @@ public:
     */
     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;
 };
 
 
 };