// Grid event class and event types
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_ADV wxGridEvent : public wxNotifyEvent
+class WXDLLIMPEXP_ADV wxGridEvent : public wxNotifyEvent,
+ public wxKeyboardState
{
public:
wxGridEvent()
- : wxNotifyEvent(), m_row(-1), m_col(-1), m_x(-1), m_y(-1),
- m_selecting(0), m_control(0), m_meta(0), m_shift(0), m_alt(0)
- {
- }
+ : wxNotifyEvent()
+ {
+ Init(-1, -1, -1, -1, false);
+ }
- wxGridEvent(int id, wxEventType type, wxObject* obj,
- int row=-1, int col=-1, int x=-1, int y=-1, bool sel = true,
- bool control = false, bool shift = false, bool alt = false, bool meta = false);
+ wxGridEvent(int id,
+ wxEventType type,
+ wxObject* obj,
+ int row = -1, int col = -1,
+ int x = -1, int y = -1,
+ bool sel = true,
+ const wxKeyboardState& kbd = wxKeyboardState())
+ : wxNotifyEvent(type, id),
+ wxKeyboardState(kbd)
+ {
+ Init(row, col, x, y, sel);
+ SetEventObject(obj);
+ }
+
+ wxDEPRECATED(
+ wxGridEvent(int id,
+ wxEventType type,
+ wxObject* obj,
+ int row, int col,
+ int x, int y,
+ bool sel,
+ bool control,
+ bool shift = false, bool alt = false, bool meta = false));
virtual int GetRow() { return m_row; }
virtual int GetCol() { return m_col; }
wxPoint GetPosition() { return wxPoint( m_x, m_y ); }
bool Selecting() { return m_selecting; }
- bool ControlDown() { return m_control; }
- bool MetaDown() { return m_meta; }
- bool ShiftDown() { return m_shift; }
- bool AltDown() { return m_alt; }
- bool CmdDown()
- {
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- return MetaDown();
-#else
- return ControlDown();
-#endif
- }
virtual wxEvent *Clone() const { return new wxGridEvent(*this); }
int m_x;
int m_y;
bool m_selecting;
- bool m_control;
- bool m_meta;
- bool m_shift;
- bool m_alt;
+
+private:
+ void Init(int row, int col, int x, int y, bool sel)
+ {
+ m_row = row;
+ m_col = col;
+ m_x = x;
+ m_y = y;
+ m_selecting = sel;
+ }
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridEvent)
};
-class WXDLLIMPEXP_ADV wxGridSizeEvent : public wxNotifyEvent
+class WXDLLIMPEXP_ADV wxGridSizeEvent : public wxNotifyEvent,
+ public wxKeyboardState
{
public:
wxGridSizeEvent()
- : wxNotifyEvent(), m_rowOrCol(-1), m_x(-1), m_y(-1),
- m_control(0), m_meta(0), m_shift(0), m_alt(0)
- {
- }
+ : wxNotifyEvent()
+ {
+ Init(-1, -1, -1);
+ }
+
+ wxGridSizeEvent(int id,
+ wxEventType type,
+ wxObject* obj,
+ int rowOrCol = -1,
+ int x = -1, int y = -1,
+ const wxKeyboardState& kbd = wxKeyboardState())
+ : wxNotifyEvent(type, id),
+ wxKeyboardState(kbd)
+ {
+ Init(rowOrCol, x, y);
- wxGridSizeEvent(int id, wxEventType type, wxObject* obj,
- int rowOrCol=-1, int x=-1, int y=-1,
- bool control = false, bool shift = false, bool alt = false, bool meta = false);
+ SetEventObject(obj);
+ }
+
+ wxDEPRECATED(
+ wxGridSizeEvent(int id,
+ wxEventType type,
+ wxObject* obj,
+ int rowOrCol,
+ int x, int y,
+ bool control,
+ bool shift = false,
+ bool alt = false,
+ bool meta = false) );
int GetRowOrCol() { return m_rowOrCol; }
wxPoint GetPosition() { return wxPoint( m_x, m_y ); }
- bool ControlDown() { return m_control; }
- bool MetaDown() { return m_meta; }
- bool ShiftDown() { return m_shift; }
- bool AltDown() { return m_alt; }
- bool CmdDown()
- {
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- return MetaDown();
-#else
- return ControlDown();
-#endif
- }
virtual wxEvent *Clone() const { return new wxGridSizeEvent(*this); }
int m_rowOrCol;
int m_x;
int m_y;
- bool m_control;
- bool m_meta;
- bool m_shift;
- bool m_alt;
+
+private:
+ void Init(int rowOrCol, int x, int y)
+ {
+ m_rowOrCol = rowOrCol;
+ m_x = x;
+ m_y = y;
+ }
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridSizeEvent)
};
-class WXDLLIMPEXP_ADV wxGridRangeSelectEvent : public wxNotifyEvent
+class WXDLLIMPEXP_ADV wxGridRangeSelectEvent : public wxNotifyEvent,
+ public wxKeyboardState
{
public:
wxGridRangeSelectEvent()
: wxNotifyEvent()
- {
- m_topLeft = wxGridNoCellCoords;
- m_bottomRight = wxGridNoCellCoords;
- m_selecting = false;
- m_control = false;
- m_meta = false;
- m_shift = false;
- m_alt = false;
- }
+ {
+ Init(wxGridNoCellCoords, wxGridNoCellCoords, false);
+ }
- wxGridRangeSelectEvent(int id, wxEventType type, wxObject* obj,
+ wxGridRangeSelectEvent(int id,
+ wxEventType type,
+ wxObject* obj,
const wxGridCellCoords& topLeft,
const wxGridCellCoords& bottomRight,
bool sel = true,
- bool control = false, bool shift = false,
- bool alt = false, bool meta = false);
+ const wxKeyboardState& kbd = wxKeyboardState())
+ : wxNotifyEvent(type, id),
+ wxKeyboardState(kbd)
+ {
+ Init(topLeft, bottomRight, sel);
+
+ SetEventObject(obj);
+ }
+
+ wxDEPRECATED(
+ wxGridRangeSelectEvent(int id,
+ wxEventType type,
+ wxObject* obj,
+ const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight,
+ bool sel,
+ bool control,
+ bool shift = false,
+ bool alt = false,
+ bool meta = false) );
wxGridCellCoords GetTopLeftCoords() { return m_topLeft; }
wxGridCellCoords GetBottomRightCoords() { return m_bottomRight; }
int GetLeftCol() { return m_topLeft.GetCol(); }
int GetRightCol() { return m_bottomRight.GetCol(); }
bool Selecting() { return m_selecting; }
- bool ControlDown() { return m_control; }
- bool MetaDown() { return m_meta; }
- bool ShiftDown() { return m_shift; }
- bool AltDown() { return m_alt; }
- bool CmdDown()
- {
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- return MetaDown();
-#else
- return ControlDown();
-#endif
- }
virtual wxEvent *Clone() const { return new wxGridRangeSelectEvent(*this); }
protected:
+ void Init(const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight,
+ bool selecting)
+ {
+ m_topLeft = topLeft;
+ m_bottomRight = bottomRight;
+ m_selecting = selecting;
+ }
+
wxGridCellCoords m_topLeft;
wxGridCellCoords m_bottomRight;
bool m_selecting;
- bool m_control;
- bool m_meta;
- bool m_shift;
- bool m_alt;
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridRangeSelectEvent)
};
-class WXDLLIMPEXP_ADV wxGridEditorCreatedEvent : public wxCommandEvent {
+class WXDLLIMPEXP_ADV wxGridEditorCreatedEvent : public wxCommandEvent
+{
public:
wxGridEditorCreatedEvent()
: wxCommandEvent()
void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; }
- void SelectRow( int row,
- bool ControlDown = false, bool ShiftDown = false,
- bool AltDown = false, bool MetaDown = false );
- void SelectCol( int col,
- bool ControlDown = false, bool ShiftDown = false,
- bool AltDown = false, bool MetaDown = false );
- void SelectBlock( int topRow, int leftCol,
- int bottomRow, int rightCol,
- bool ControlDown = false, bool ShiftDown = false,
- bool AltDown = false, bool MetaDown = false,
- bool sendEvent = true );
- void SelectBlock( const wxGridCellCoords& topLeft,
- const wxGridCellCoords& bottomRight,
- bool ControlDown = false, bool ShiftDown = false,
- bool AltDown = false, bool MetaDown = false,
- bool sendEvent = true )
+ void SelectRow(int row, const wxKeyboardState& kbd = wxKeyboardState());
+ void SelectCol(int col, const wxKeyboardState& kbd = wxKeyboardState());
+ void SelectBlock(int topRow, int leftCol,
+ int bottomRow, int rightCol,
+ const wxKeyboardState& kbd = wxKeyboardState(),
+ bool sendEvent = true );
+ void SelectBlock(const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight,
+ const wxKeyboardState& kbd = wxKeyboardState(),
+ bool sendEvent = true )
{
SelectBlock(topLeft.GetRow(), topLeft.GetCol(),
bottomRight.GetRow(), bottomRight.GetCol(),
- ControlDown, ShiftDown, AltDown, MetaDown,
- sendEvent);
+ kbd, sendEvent);
}
- void SelectCell( int row, int col,
- bool ControlDown = false, bool ShiftDown = false,
- bool AltDown = false, bool MetaDown = false,
- bool sendEvent = true );
+ void SelectCell(int row, int col,
+ const wxKeyboardState& kbd = wxKeyboardState(),
+ bool sendEvent = true);
+ void SelectCell(const wxGridCellCoords& coords,
+ const wxKeyboardState& kbd = wxKeyboardState(),
+ bool sendEvent = true)
+ {
+ SelectCell(coords.GetRow(), coords.GetCol(), kbd, sendEvent);
+ }
- void ToggleCellSelection( int row, int col,
- bool ControlDown = false,
- bool ShiftDown = false,
- bool AltDown = false, bool MetaDown = false );
- void ToggleCellSelection( const wxGridCellCoords& coords,
- bool ControlDown = false,
- bool ShiftDown = false,
- bool AltDown = false, bool MetaDown = false )
+ void ToggleCellSelection(int row, int col,
+ const wxKeyboardState& kbd = wxKeyboardState());
+ void ToggleCellSelection(const wxGridCellCoords& coords,
+ const wxKeyboardState& kbd = wxKeyboardState())
{
- ToggleCellSelection(coords.GetRow(), coords.GetCol(),
- ControlDown, ShiftDown, AltDown, MetaDown);
+ ToggleCellSelection(coords.GetRow(), coords.GetCol(), kbd);
}
void ClearSelection();
leftCol <= col && col <= rightCol );
}
+ void SelectBlockNoEvent(int topRow, int leftCol,
+ int bottomRow, int rightCol)
+ {
+ SelectBlock(topRow, leftCol, bottomRow, rightCol,
+ wxKeyboardState(), false);
+ }
+
wxGridCellCoordsArray m_cellSelection;
wxGridCellCoordsArray m_blockSelectionTopLeft;
wxGridCellCoordsArray m_blockSelectionBottomRight;
if ( (row = YToRow( y )) >= 0 )
{
if ( m_selection )
- {
- m_selection->SelectRow( row,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
- }
+ m_selection->SelectRow(row, event);
}
}
break;
{
if ( event.ShiftDown() )
{
- m_selection->SelectBlock( m_currentCellCoords.GetRow(),
- 0,
- row,
- GetNumberCols() - 1,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ m_selection->SelectBlock
+ (
+ m_currentCellCoords.GetRow(), 0,
+ row, GetNumberCols() - 1,
+ event
+ );
}
else
{
- m_selection->SelectRow( row,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ m_selection->SelectRow(row, event);
}
}
if ( (col = XToCol( x )) >= 0 )
{
if ( m_selection )
- {
- m_selection->SelectCol( col,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
- }
+ m_selection->SelectCol(col, event);
}
}
break;
{
if ( event.ShiftDown() )
{
- m_selection->SelectBlock( 0,
- m_currentCellCoords.GetCol(),
- GetNumberRows() - 1, col,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ m_selection->SelectBlock
+ (
+ 0, m_currentCellCoords.GetCol(),
+ GetNumberRows() - 1, col,
+ event
+ );
}
else
{
- m_selection->SelectCol( col,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ m_selection->SelectCol(col, event);
}
}
{
if ( m_selection )
{
- m_selection->SelectBlock( m_currentCellCoords,
- coords,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ m_selection->SelectBlock(m_currentCellCoords, coords, event);
m_selectedBlockCorner = coords;
}
}
{
if ( m_selection )
{
- m_selection->ToggleCellSelection( coords,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ m_selection->ToggleCellSelection(coords, event);
}
+
m_selectedBlockTopLeft = wxGridNoCellCoords;
m_selectedBlockBottomRight = wxGridNoCellCoords;
m_selectedBlockCorner = coords;
{
m_selection->SelectBlock( m_selectedBlockTopLeft,
m_selectedBlockBottomRight,
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ event );
}
m_selectedBlockTopLeft = wxGridNoCellCoords;
rowOrCol,
mouseEv.GetX() + GetRowLabelSize(),
mouseEv.GetY() + GetColLabelSize(),
- mouseEv.ControlDown(),
- mouseEv.ShiftDown(),
- mouseEv.AltDown(),
- mouseEv.MetaDown() );
+ mouseEv);
claimed = GetEventHandler()->ProcessEvent(gridEvt);
vetoed = !gridEvt.IsAllowed();
m_selectedBlockTopLeft,
m_selectedBlockBottomRight,
true,
- mouseEv.ControlDown(),
- mouseEv.ShiftDown(),
- mouseEv.AltDown(),
- mouseEv.MetaDown() );
+ mouseEv);
claimed = GetEventHandler()->ProcessEvent(gridEvt);
vetoed = !gridEvt.IsAllowed();
pos.x,
pos.y,
false,
- mouseEv.ControlDown(),
- mouseEv.ShiftDown(),
- mouseEv.AltDown(),
- mouseEv.MetaDown() );
+ mouseEv);
claimed = GetEventHandler()->ProcessEvent(gridEvt);
vetoed = !gridEvt.IsAllowed();
}
mouseEv.GetX() + GetRowLabelSize(),
mouseEv.GetY() + GetColLabelSize(),
false,
- mouseEv.ControlDown(),
- mouseEv.ShiftDown(),
- mouseEv.AltDown(),
- mouseEv.MetaDown() );
+ mouseEv);
claimed = GetEventHandler()->ProcessEvent(gridEvt);
vetoed = !gridEvt.IsAllowed();
}
m_selection->SelectBlock(
m_selectedBlockTopLeft,
m_selectedBlockBottomRight,
- event.ControlDown(),
- true,
- event.AltDown(),
- event.MetaDown() );
+ event);
}
}
void wxGrid::SelectRow( int row, bool addToSelected )
{
- if ( IsSelection() && !addToSelected )
+ if ( !m_selection )
+ return;
+
+ if ( !addToSelected )
ClearSelection();
- if ( m_selection )
- m_selection->SelectRow( row, false, addToSelected );
+ m_selection->SelectRow(row);
}
void wxGrid::SelectCol( int col, bool addToSelected )
{
- if ( IsSelection() && !addToSelected )
+ if ( !m_selection )
+ return;
+
+ if ( !addToSelected )
ClearSelection();
- if ( m_selection )
- m_selection->SelectCol( col, false, addToSelected );
+ m_selection->SelectCol(col);
}
-void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol,
- bool addToSelected )
+void wxGrid::SelectBlock(int topRow, int leftCol, int bottomRow, int rightCol,
+ bool addToSelected)
{
- if ( IsSelection() && !addToSelected )
+ if ( !m_selection )
+ return;
+
+ if ( !addToSelected )
ClearSelection();
- if ( m_selection )
- m_selection->SelectBlock( topRow, leftCol, bottomRow, rightCol,
- false, addToSelected );
+ m_selection->SelectBlock(topRow, leftCol, bottomRow, rightCol);
}
void wxGrid::SelectAll()
wxGridEvent::wxGridEvent( int id, wxEventType type, wxObject* obj,
int row, int col, int x, int y, bool sel,
bool control, bool shift, bool alt, bool meta )
- : wxNotifyEvent( type, id )
+ : wxNotifyEvent( type, id ),
+ wxKeyboardState(control, shift, alt, meta)
{
- m_row = row;
- m_col = col;
- m_x = x;
- m_y = y;
- m_selecting = sel;
- m_control = control;
- m_shift = shift;
- m_alt = alt;
- m_meta = meta;
+ Init(row, col, x, y, sel);
SetEventObject(obj);
}
-
IMPLEMENT_DYNAMIC_CLASS( wxGridSizeEvent, wxNotifyEvent )
wxGridSizeEvent::wxGridSizeEvent( int id, wxEventType type, wxObject* obj,
int rowOrCol, int x, int y,
bool control, bool shift, bool alt, bool meta )
- : wxNotifyEvent( type, id )
+ : wxNotifyEvent( type, id ),
+ wxKeyboardState(control, shift, alt, meta)
{
- m_rowOrCol = rowOrCol;
- m_x = x;
- m_y = y;
- m_control = control;
- m_shift = shift;
- m_alt = alt;
- m_meta = meta;
+ Init(rowOrCol, x, y);
SetEventObject(obj);
}
const wxGridCellCoords& bottomRight,
bool sel, bool control,
bool shift, bool alt, bool meta )
- : wxNotifyEvent( type, id )
-{
- m_topLeft = topLeft;
- m_bottomRight = bottomRight;
- m_selecting = sel;
- m_control = control;
- m_shift = shift;
- m_alt = alt;
- m_meta = meta;
+ : wxNotifyEvent( type, id ),
+ wxKeyboardState(control, shift, alt, meta)
+{
+ Init(topLeft, bottomRight, sel);
SetEventObject(obj);
}
{
m_blockSelectionTopLeft.RemoveAt(n);
m_blockSelectionBottomRight.RemoveAt(n);
- SelectBlock( topRow, 0,
- bottomRow, m_grid->GetNumberCols() - 1,
- false, false, false, false, false );
+ SelectBlockNoEvent( topRow, 0,
+ bottomRow, m_grid->GetNumberCols() - 1);
}
}
else // selmode == wxGridSelectColumns)
{
m_blockSelectionTopLeft.RemoveAt(n);
m_blockSelectionBottomRight.RemoveAt(n);
- SelectBlock( 0, leftCol,
- m_grid->GetNumberRows() - 1, rightCol,
- false, false, false, false, false );
+ SelectBlockNoEvent(0, leftCol,
+ m_grid->GetNumberRows() - 1, rightCol);
}
}
}
}
}
-void wxGridSelection::SelectRow( int row,
- bool ControlDown, bool ShiftDown,
- bool AltDown, bool MetaDown )
+void wxGridSelection::SelectRow(int row, const wxKeyboardState& kbd)
{
if ( m_selectionMode == wxGrid::wxGridSelectColumns )
return;
wxGridCellCoords( row, 0 ),
wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ),
true,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd);
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
}
-void wxGridSelection::SelectCol( int col,
- bool ControlDown, bool ShiftDown,
- bool AltDown, bool MetaDown )
+void wxGridSelection::SelectCol(int col, const wxKeyboardState& kbd)
{
if ( m_selectionMode == wxGrid::wxGridSelectRows )
return;
wxGridCellCoords( 0, col ),
wxGridCellCoords( m_grid->GetNumberRows() - 1, col ),
true,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd );
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
}
void wxGridSelection::SelectBlock( int topRow, int leftCol,
int bottomRow, int rightCol,
- bool ControlDown, bool ShiftDown,
- bool AltDown, bool MetaDown,
+ const wxKeyboardState& kbd,
bool sendEvent )
{
// Fix the coordinates of the block if needed.
if ( m_selectionMode == wxGrid::wxGridSelectCells &&
topRow == bottomRow && leftCol == rightCol )
{
- SelectCell( topRow, leftCol, ControlDown, ShiftDown,
- AltDown, MetaDown, sendEvent );
+ SelectCell( topRow, leftCol, kbd, sendEvent );
}
size_t count, n;
wxGridCellCoords( topRow, leftCol ),
wxGridCellCoords( bottomRow, rightCol ),
true,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd);
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
}
}
void wxGridSelection::SelectCell( int row, int col,
- bool ControlDown, bool ShiftDown,
- bool AltDown, bool MetaDown,
+ const wxKeyboardState& kbd,
bool sendEvent )
{
if ( m_selectionMode == wxGrid::wxGridSelectRows )
{
- SelectBlock(row, 0, row, m_grid->GetNumberCols() - 1,
- ControlDown, ShiftDown, AltDown, MetaDown, sendEvent);
+ SelectBlock(row, 0, row, m_grid->GetNumberCols() - 1, kbd, sendEvent);
return;
}
else if ( m_selectionMode == wxGrid::wxGridSelectColumns )
{
- SelectBlock(0, col, m_grid->GetNumberRows() - 1, col,
- ControlDown, ShiftDown, AltDown, MetaDown, sendEvent);
+ SelectBlock(0, col, m_grid->GetNumberRows() - 1, col, kbd, sendEvent);
return;
}
wxGridCellCoords( row, col ),
wxGridCellCoords( row, col ),
true,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd);
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
}
}
-void wxGridSelection::ToggleCellSelection( int row, int col,
- bool ControlDown, bool ShiftDown,
- bool AltDown, bool MetaDown )
+void
+wxGridSelection::ToggleCellSelection(int row, int col,
+ const wxKeyboardState& kbd)
{
// if the cell is not selected, select it
if ( !IsInSelection ( row, col ) )
{
- SelectCell( row, col, ControlDown, ShiftDown, AltDown, MetaDown );
+ SelectCell(row, col, kbd);
return;
}
wxGridCellCoords( row, col ),
wxGridCellCoords( row, col ),
false,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd );
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
return;
if ( m_selectionMode != wxGrid::wxGridSelectColumns )
{
if ( topRow < row )
- SelectBlock( topRow, leftCol, row - 1, rightCol,
- false, false, false, false, false );
+ SelectBlockNoEvent(topRow, leftCol, row - 1, rightCol);
if ( bottomRow > row )
- SelectBlock( row + 1, leftCol, bottomRow, rightCol,
- false, false, false, false, false );
+ SelectBlockNoEvent(row + 1, leftCol, bottomRow, rightCol);
}
if ( m_selectionMode != wxGrid::wxGridSelectRows )
{
if ( leftCol < col )
- SelectBlock( row, leftCol, row, col - 1,
- false, false, false, false, false );
+ SelectBlockNoEvent(row, leftCol, row, col - 1);
if ( rightCol > col )
- SelectBlock( row, col + 1, row, rightCol,
- false, false, false, false, false );
+ SelectBlockNoEvent(row, col + 1, row, rightCol);
}
}
}
if (m_selectionMode == wxGrid::wxGridSelectCells)
{
if ( col > 0 )
- SelectBlock( row, 0, row, col - 1,
- false, false, false, false, false );
+ SelectBlockNoEvent(row, 0, row, col - 1);
if ( col < m_grid->GetNumberCols() - 1 )
- SelectBlock( row, col + 1,
- row, m_grid->GetNumberCols() - 1,
- false, false, false, false, false );
+ SelectBlockNoEvent( row, col + 1,
+ row, m_grid->GetNumberCols() - 1);
}
}
}
if (m_selectionMode == wxGrid::wxGridSelectCells)
{
if ( row > 0 )
- SelectBlock( 0, col, row - 1, col,
- false, false, false, false, false );
+ SelectBlockNoEvent(0, col, row - 1, col);
if ( row < m_grid->GetNumberRows() - 1 )
- SelectBlock( row + 1, col,
- m_grid->GetNumberRows() - 1, col,
- false, false, false, false, false );
+ SelectBlockNoEvent(row + 1, col,
+ m_grid->GetNumberRows() - 1, col);
}
}
}
wxGridCellCoords( row, col ),
wxGridCellCoords( row, col ),
false,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd );
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
}
break;
wxGridCellCoords( row, 0 ),
wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ),
false,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd );
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
}
break;
wxGridCellCoords( 0, col ),
wxGridCellCoords( m_grid->GetNumberRows() - 1, col ),
false,
- ControlDown, ShiftDown,
- AltDown, MetaDown );
+ kbd );
m_grid->GetEventHandler()->ProcessEvent( gridEvt );
}
break;