]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/dataview.h
Fix deleting and clearing wxTreeListCtrl columns.
[wxWidgets.git] / interface / wx / dataview.h
index f4d4fcd8f1f67b62c5c510c671cbf3a39c1cfa60..0c06dae862881751c1d3e7a4d41cf8c1277b34ff 100644 (file)
@@ -614,8 +614,9 @@ public:
     /**
         Constructor.
     */
-    wxDataViewItem(void* id = NULL);
+    wxDataViewItem();
     wxDataViewItem(const wxDataViewItem& item);
+    explicit wxDataViewItem(void* id);
     //@}
 
     /**
@@ -1015,13 +1016,35 @@ public:
     */
     wxDataViewModel* GetModel();
 
+    /**
+        Returns the number of currently selected items.
+
+        This method may be called for both the controls with single and
+        multiple selections and returns the number of selected item, possibly
+        0, in any case.
+
+        @since 2.9.3
+     */
+    virtual int GetSelectedItemsCount() const;
+
     /**
         Returns first selected item or an invalid item if none is selected.
+
+        This method may be called for both the controls with single and
+        multiple selections but returns an invalid item if more than one item
+        is selected in the latter case, use HasSelection() to determine if
+        there are any selected items when using multiple selection.
     */
     virtual wxDataViewItem GetSelection() const;
 
     /**
         Fills @a sel with currently selected items and returns their number.
+
+        This method may be called for both the controls with single and
+        multiple selections. In the single selection case it returns the array
+        with at most one element in it.
+
+        @see GetSelectedItemsCount()
     */
     virtual int GetSelections(wxDataViewItemArray& sel) const;
 
@@ -1031,6 +1054,20 @@ public:
     */
     virtual wxDataViewColumn* GetSortingColumn() const;
 
+    /**
+        Returns true if any items are currently selected.
+
+        This method may be called for both the controls with single and
+        multiple selections.
+
+        Calling this method is equivalent to calling GetSelectedItemsCount()
+        and comparing its result with 0 but is more clear and might also be
+        implemented more efficiently in the future.
+
+        @since 2.9.3
+     */
+    bool HasSelection() const;
+
     /**
         Hittest.
     */