]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/dataview.h
Add some basic tests for wxDataViewCtrl selection handling.
[wxWidgets.git] / interface / wx / dataview.h
index dd6e0495341f336f60dca4e2f4ae6c7cb14d2092..9c24be7d765cc04f8e2536464466c7b9f302baa7 100644 (file)
@@ -421,7 +421,7 @@ public:
                                 unsigned int col) const;
 
     /**
-        Returns the number of items (i.e. rows) in the list.
+        Returns the number of items (or rows) in the list.
     */
     unsigned int GetCount() const;
 
@@ -614,8 +614,9 @@ public:
     /**
         Constructor.
     */
-    wxDataViewItem(void* id = NULL);
+    wxDataViewItem();
     wxDataViewItem(const wxDataViewItem& item);
+    explicit wxDataViewItem(void* id);
     //@}
 
     /**
@@ -2715,6 +2716,26 @@ public:
     */
     const wxVariant& GetValue() const;
 
+    /**
+        Can be used to determine whether the new value is going to be accepted
+        in wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE handler.
+
+        Returns @true if editing the item was cancelled or if the user tried to
+        enter an invalid value (refused by wxDataViewRenderer::Validate()). If
+        this method returns @false, it means that the value in the model is
+        about to be changed to the new one.
+
+        Notice that wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event handler can
+        call wxNotifyEvent::Veto() to prevent this from happening.
+
+        Currently support for setting this field and for vetoing the change is
+        only available in the generic version of wxDataViewCtrl, i.e. under MSW
+        but not GTK nor OS X.
+
+        @since 2.9.3
+     */
+    bool IsEditCancelled() const;
+
     /**
         Sets the column index associated with this event.
     */