wxDEFINE_EVENT( wxEVT_GRID_EDITOR_HIDDEN, wxGridEvent );
wxDEFINE_EVENT( wxEVT_GRID_EDITOR_CREATED, wxGridEditorCreatedEvent );
+// ----------------------------------------------------------------------------
+// private helpers
+// ----------------------------------------------------------------------------
+
+namespace
+{
+
+ // ensure that first is less or equal to second, swapping the values if
+ // necessary
+ void EnsureFirstLessThanSecond(int& first, int& second)
+ {
+ if ( first > second )
+ wxSwap(first, second);
+ }
+
+} // anonymous namespace
+
// ============================================================================
// implementation
// ============================================================================
ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, GetColLabelWindow());
m_dragLastPos = -1;
}
- else // not on row separator or it's not resizeable
+ else // not on row separator or it's not resizable
{
row = YToRow(y);
if ( row >=0 &&
m_cellHighlightPenWidth = width;
// Just redrawing the cell highlight is not enough since that won't
- // make any visible change if the the thickness is getting smaller.
+ // make any visible change if the thickness is getting smaller.
int row = m_currentCellCoords.GetRow();
int col = m_currentCellCoords.GetCol();
if ( row == -1 || col == -1 || GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
m_cellHighlightROPenWidth = width;
// Just redrawing the cell highlight is not enough since that won't
- // make any visible change if the the thickness is getting smaller.
+ // make any visible change if the thickness is getting smaller.
int row = m_currentCellCoords.GetRow();
int col = m_currentCellCoords.GetCol();
if ( row == -1 || col == -1 ||