Merge branch 'grid-event-delete'

Handle deleting grid rows/columns in event handlers gracefully.

See https://github.com/wxWidgets/wxWidgets/pull/1834
This commit is contained in:
Vadim Zeitlin
2020-05-06 18:45:16 +02:00
2 changed files with 34 additions and 22 deletions

View File

@@ -97,6 +97,7 @@ class WXDLLIMPEXP_FWD_CORE wxGridCellAttr;
class WXDLLIMPEXP_FWD_CORE wxGridCellAttrProviderData;
class WXDLLIMPEXP_FWD_CORE wxGridColLabelWindow;
class WXDLLIMPEXP_FWD_CORE wxGridCornerLabelWindow;
class WXDLLIMPEXP_FWD_CORE wxGridEvent;
class WXDLLIMPEXP_FWD_CORE wxGridRowLabelWindow;
class WXDLLIMPEXP_FWD_CORE wxGridWindow;
class WXDLLIMPEXP_FWD_CORE wxGridTypeRegistry;
@@ -2554,8 +2555,13 @@ protected:
bool Redimension( wxGridTableMessage& );
// generate the appropriate grid event and return -1 if it was vetoed, 1 if
// it was processed (but not vetoed) and 0 if it wasn't processed
// Send the given grid event and return -1 if it was vetoed or, as a
// special exception, if an event for a particular cell resulted in this
// cell being deleted, 1 if it was processed (but not vetoed) and 0 if it
// wasn't processed.
int DoSendEvent(wxGridEvent& gridEvt);
// Generate an event of the given type and call DoSendEvent().
int SendEvent(wxEventType evtType,
int row, int col,
const wxMouseEvent& e);