Merge branch 'grid-mouse'

Improve mouse event handling in wxGrid during drag operations.

See https://github.com/wxWidgets/wxWidgets/pull/891

Closes #18186.
This commit is contained in:
Vadim Zeitlin
2018-08-21 13:03:09 +02:00
2 changed files with 95 additions and 72 deletions

View File

@@ -2218,6 +2218,14 @@ private:
// SetColPos() and ResetColPos())
void RefreshAfterColPosChange();
// reset the variables used during dragging operations after it ended,
// either because we called EndDraggingIfNecessary() ourselves or because
// we lost mouse capture
void DoAfterDraggingEnd();
// release the mouse capture if it's currently captured
void EndDraggingIfNecessary();
// return the position (not index) of the column at the given logical pixel
// position
@@ -2238,8 +2246,12 @@ private:
// process row/column resizing drag event
void DoGridLineDrag(wxMouseEvent& event, const wxGridOperations& oper);
// process mouse drag event in the grid window
void DoGridDragEvent(wxMouseEvent& event, const wxGridCellCoords& coords);
// process mouse drag event in the grid window, return false if starting
// dragging was vetoed by the user-defined wxEVT_GRID_CELL_BEGIN_DRAG
// handler
bool DoGridDragEvent(wxMouseEvent& event,
const wxGridCellCoords& coords,
bool isFirstDrag);
// process different clicks on grid cells
void DoGridCellLeftDown(wxMouseEvent& event,