]> 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 37404e1d1f188f0b546cddfcabbb8e535c4b1924..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);
     //@}
 
     /**
@@ -1120,9 +1121,13 @@ public:
         This function can only be used when all rows have the same height, i.e.
         when wxDV_VARIABLE_LINE_HEIGHT flag is not used.
 
-        Currently this is implemented in the generic version only and nothing
-        is done (and @false returned) when using the native GTK or OS X
-        versions.
+        Currently this is implemented in the generic and native GTK versions
+        only and nothing is done (and @false returned) when using OS X port.
+
+        Also notice that this method can only be used to increase the row
+        height compared with the default one (as determined by the return value
+        of wxDataViewRenderer::GetSize()), if it is set to a too small value
+        then the minimum required by the renderers will be used.
 
         @return @true if the line height was changed or @false otherwise.
 
@@ -2711,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.
     */