+ // redraw the grid lines, should be called after changing their attributes
+ void RedrawGridLines();
+
+ // common part of Clip{Horz,Vert}GridLines
+ void DoClipGridLines(bool& var, bool clip);
+
+ // update the sorting indicator shown in the specified column (whose index
+ // must be valid)
+ //
+ // this will use GetSortingColumn() and IsSortOrderAscending() to determine
+ // the sorting indicator to effectively show
+ void UpdateColumnSortingIndicator(int col);
+
+ // update the grid after changing the columns order (common part of
+ // SetColPos() and ResetColPos())
+ void RefreshAfterColPosChange();
+
+
+ // return the position (not index) of the column at the given logical pixel
+ // position
+ //
+ // this always returns a valid position, even if the coordinate is out of
+ // bounds (in which case first/last column is returned)
+ int XToPos(int x) const;
+
+
+ // event handlers and their helpers
+ // --------------------------------
+
+ // process mouse drag event in WXGRID_CURSOR_SELECT_CELL mode
+ void DoGridCellDrag(wxMouseEvent& event,
+ const wxGridCellCoords& coords,
+ bool isFirstDrag);
+
+ // 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 different clicks on grid cells
+ void DoGridCellLeftDown(wxMouseEvent& event,
+ const wxGridCellCoords& coords,
+ const wxPoint& pos);
+ void DoGridCellLeftDClick(wxMouseEvent& event,
+ const wxGridCellCoords& coords,
+ const wxPoint& pos);
+ void DoGridCellLeftUp(wxMouseEvent& event, const wxGridCellCoords& coords);
+
+ // process movement (but not dragging) event in the grid cell area
+ void DoGridMouseMoveEvent(wxMouseEvent& event,
+ const wxGridCellCoords& coords,
+ const wxPoint& pos);
+
+ // process mouse events in the grid window
+ void ProcessGridCellMouseEvent(wxMouseEvent& event);
+
+ // process mouse events in the row/column labels/corner windows
+ void ProcessRowLabelMouseEvent(wxMouseEvent& event);
+ void ProcessColLabelMouseEvent(wxMouseEvent& event);
+ void ProcessCornerLabelMouseEvent(wxMouseEvent& event);
+
+ void DoColHeaderClick(int col);
+
+ void DoStartResizeCol(int col);
+ void DoUpdateResizeCol(int x);
+ void DoUpdateResizeColWidth(int w);
+ void DoStartMoveCol(int col);
+
+ void DoEndDragResizeRow(const wxMouseEvent& event);
+ void DoEndDragResizeCol(const wxMouseEvent& event);
+ void DoEndMoveCol(int pos);
+