Add wxDataViewEvent::IsEditCancelled() and support for vetoing edit events.

Currently this is only implemented in the generic wxDataViewCtrl, the native
GTK/OSX ports should be modified to support this later.

Closes #13323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-19 22:35:53 +00:00
parent d32fb5f9f4
commit 2a648479df
4 changed files with 41 additions and 7 deletions

View File

@@ -2715,6 +2715,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.
*/