Merge branch 'grid-selected'

Split the wxGrid RANGE_SELECT event into separate SELECTING and SELECTED
events.

See https://github.com/wxWidgets/wxWidgets/pull/2028
This commit is contained in:
Vadim Zeitlin
2020-08-31 14:55:56 +02:00
9 changed files with 178 additions and 57 deletions

View File

@@ -6345,13 +6345,41 @@ public:
/**
@class wxGridRangeSelectEvent
Events of this class notify about a range of cells being selected.
When the user uses the mouse for selection, one or more @c SELECTING events
are generated first, with @c SELECTED event generated at the end, when
selection is final. This allows the application to handle either the @c
SELECTING events if it needs to update its state in real-time, as the
selection changes, or just the final @c SELECTED event, if updating its
state on every selection change would be too time-consuming.
Note that if the user performs the selection from keyboard, @c SELECTING
events are not generated at all, so @c SELECTED event still must be
handled.
Finally, contrary to most of the other events with the name ending in
"ing", @c SELECTING event can @e not be vetoed.
@beginEventTable{wxGridRangeSelectEvent}
@event{EVT_GRID_RANGE_SELECT(func)}
@event{EVT_GRID_RANGE_SELECTING(func)}
The user is selecting a group of contiguous cells. Processes a
@c wxEVT_GRID_RANGE_SELECTING event type.
This event is available in wxWidgets 3.1.5 and later only.
@event{EVT_GRID_CMD_RANGE_SELECTING(id, func)}
The user is selecting a group of contiguous cells; variant taking a window
identifier. Processes a @c wxEVT_GRID_RANGE_SELECTING event type.
This event is available in wxWidgets 3.1.5 and later only.
@event{EVT_GRID_RANGE_SELECTED(func)}
The user selected a group of contiguous cells. Processes a
@c wxEVT_GRID_RANGE_SELECT event type.
@event{EVT_GRID_CMD_RANGE_SELECT(id, func)}
@c wxEVT_GRID_RANGE_SELECTED event type.
This event is available in wxWidgets 3.1.5 and later only and was
called @c wxEVT_GRID_RANGE_SELECT in the previous versions.
@event{EVT_GRID_CMD_RANGE_SELECTED(id, func)}
The user selected a group of contiguous cells; variant taking a window
identifier. Processes a @c wxEVT_GRID_RANGE_SELECT event type.
identifier. Processes a @c wxEVT_GRID_RANGE_SELECTED event type.
This event is available in wxWidgets 3.1.5 and later only and was
called @c wxEVT_GRID_RANGE_SELECT in the previous versions.
@endEventTable
@library{wxcore}
@@ -6526,7 +6554,8 @@ wxEventType wxEVT_GRID_LABEL_RIGHT_DCLICK;
wxEventType wxEVT_GRID_ROW_SIZE;
wxEventType wxEVT_GRID_COL_SIZE;
wxEventType wxEVT_GRID_COL_AUTO_SIZE;
wxEventType wxEVT_GRID_RANGE_SELECT;
wxEventType wxEVT_GRID_RANGE_SELECTING;
wxEventType wxEVT_GRID_RANGE_SELECTED;
wxEventType wxEVT_GRID_CELL_CHANGING;
wxEventType wxEVT_GRID_CELL_CHANGED;
wxEventType wxEVT_GRID_SELECT_CELL;
@@ -6537,4 +6566,3 @@ wxEventType wxEVT_GRID_CELL_BEGIN_DRAG;
wxEventType wxEVT_GRID_COL_MOVE;
wxEventType wxEVT_GRID_COL_SORT;
wxEventType wxEVT_GRID_TABBING;

View File

@@ -30,6 +30,7 @@ public:
By default, no modifiers are active.
*/
explicit
wxKeyboardState(bool controlDown = false,
bool shiftDown = false,
bool altDown = false,