Changed Shift+Arrow handling
Fixed Ctrl/Shift/Alt/Meta handling in generated events. Added display of Ctrl/Shift/Alt/Meta status to griddemo. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1523,6 +1523,7 @@ protected:
|
||||
|
||||
wxGridCellCoords m_selectingTopLeft;
|
||||
wxGridCellCoords m_selectingBottomRight;
|
||||
wxGridCellCoords m_selectingKeyboard;
|
||||
wxGridSelection *m_selection;
|
||||
wxColour m_selectionBackground;
|
||||
wxColour m_selectionForeground;
|
||||
|
@@ -29,13 +29,25 @@ public:
|
||||
bool IsSelection();
|
||||
bool IsInSelection ( int row, int col );
|
||||
void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
|
||||
void SelectRow( int row, bool addToSelected = FALSE );
|
||||
void SelectCol( int col, bool addToSelected = FALSE );
|
||||
void SelectRow( int row, bool addToSelected = FALSE,
|
||||
bool ControlDown = FALSE, bool ShiftDown = FALSE,
|
||||
bool AltDown = FALSE, bool MetaDown = FALSE );
|
||||
void SelectCol( int col, bool addToSelected = FALSE,
|
||||
bool ControlDown = FALSE, bool ShiftDown = FALSE,
|
||||
bool AltDown = FALSE, bool MetaDown = FALSE );
|
||||
void SelectBlock( int topRow, int leftCol,
|
||||
int bottomRow, int rightCol,
|
||||
wxMouseEvent* event = 0, bool sendEvent = TRUE );
|
||||
void SelectCell( int row, int col, bool sendEvent = TRUE );
|
||||
void ToggleCellSelection( 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,
|
||||
bool ControlDown = FALSE, bool ShiftDown = FALSE,
|
||||
bool AltDown = FALSE, bool MetaDown = FALSE,
|
||||
bool sendEvent = TRUE );
|
||||
void ToggleCellSelection( int row, int col,
|
||||
bool ControlDown = FALSE,
|
||||
bool ShiftDown = FALSE,
|
||||
bool AltDown = FALSE, bool MetaDown = FALSE );
|
||||
void ClearSelection();
|
||||
|
||||
void UpdateRows( size_t pos, int numRows );
|
||||
|
@@ -622,7 +622,11 @@ void GridFrame::OnSelectCell( wxGridEvent& ev )
|
||||
else
|
||||
logBuf << "Deselected ";
|
||||
logBuf << "cell at row " << ev.GetRow()
|
||||
<< " col " << ev.GetCol();
|
||||
<< " col " << ev.GetCol()
|
||||
<< " ( ControlDown: "<<ev.ControlDown()
|
||||
<< ", ShiftDown: "<<ev.ShiftDown()
|
||||
<< ", AltDown: "<<ev.AltDown()
|
||||
<< ", MetaDown: "<<ev.MetaDown()<< " )";
|
||||
wxLogMessage( "%s", logBuf.c_str() );
|
||||
|
||||
// you must call Skip() if you want the default processing
|
||||
@@ -640,8 +644,11 @@ void GridFrame::OnRangeSelected( wxGridRangeSelectEvent& ev )
|
||||
logBuf << "cells from row " << ev.GetTopRow()
|
||||
<< " col " << ev.GetLeftCol()
|
||||
<< " to row " << ev.GetBottomRow()
|
||||
<< " col " << ev.GetRightCol();
|
||||
|
||||
<< " col " << ev.GetRightCol()
|
||||
<< " ( ControlDown: "<<ev.ControlDown()
|
||||
<< ", ShiftDown: "<<ev.ShiftDown()
|
||||
<< ", AltDown: "<<ev.AltDown()
|
||||
<< ", MetaDown: "<<ev.MetaDown()<< " )";
|
||||
wxLogMessage( "%s", logBuf.c_str() );
|
||||
|
||||
ev.Skip();
|
||||
|
@@ -3190,7 +3190,7 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership,
|
||||
// View at runtime. Is there anything in the implmentation that would
|
||||
// prevent this?
|
||||
|
||||
// At least, you now have to copy with m_selection
|
||||
// At least, you now have to cope with m_selection
|
||||
wxFAIL_MSG( wxT("wxGrid::CreateGrid or wxGrid::SetTable called more than once") );
|
||||
return FALSE;
|
||||
}
|
||||
@@ -4326,7 +4326,11 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
|
||||
m_selection->SelectBlock( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol(),
|
||||
coords.GetRow(),
|
||||
coords.GetCol() );
|
||||
coords.GetCol(),
|
||||
event.ControlDown(),
|
||||
event.ShiftDown(),
|
||||
event.AltDown(),
|
||||
event.MetaDown() );
|
||||
}
|
||||
else if ( XToEdgeOfCol(x) < 0 &&
|
||||
YToEdgeOfRow(y) < 0 )
|
||||
@@ -4360,7 +4364,11 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
|
||||
else
|
||||
{
|
||||
m_selection->ToggleCellSelection( coords.GetRow(),
|
||||
coords.GetCol() );
|
||||
coords.GetCol(),
|
||||
event.ControlDown(),
|
||||
event.ShiftDown(),
|
||||
event.AltDown(),
|
||||
event.MetaDown() );
|
||||
m_selectingTopLeft = wxGridNoCellCoords;
|
||||
m_selectingBottomRight = wxGridNoCellCoords;
|
||||
SetCurrentCell( coords );
|
||||
@@ -4405,7 +4413,10 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
|
||||
m_selectingTopLeft.GetCol(),
|
||||
m_selectingBottomRight.GetRow(),
|
||||
m_selectingBottomRight.GetCol(),
|
||||
& event );
|
||||
event.ControlDown(),
|
||||
event.ShiftDown(),
|
||||
event.AltDown(),
|
||||
event.MetaDown() );
|
||||
m_selectingTopLeft = wxGridNoCellCoords;
|
||||
m_selectingBottomRight = wxGridNoCellCoords;
|
||||
}
|
||||
@@ -4921,7 +4932,7 @@ bool wxGrid::SendEvent( const wxEventType type,
|
||||
type,
|
||||
this,
|
||||
row, col,
|
||||
TRUE,
|
||||
FALSE,
|
||||
mouseEv.GetX(), mouseEv.GetY(),
|
||||
mouseEv.ControlDown(),
|
||||
mouseEv.ShiftDown(),
|
||||
@@ -5001,6 +5012,22 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
|
||||
// try local handlers
|
||||
//
|
||||
if ( !event.ShiftDown() &&
|
||||
m_selectingKeyboard != wxGridNoCellCoords )
|
||||
{
|
||||
m_selection->SelectBlock( m_selectingTopLeft.GetRow(),
|
||||
m_selectingTopLeft.GetCol(),
|
||||
m_selectingBottomRight.GetRow(),
|
||||
m_selectingBottomRight.GetCol(),
|
||||
event.ControlDown(),
|
||||
event.ShiftDown(),
|
||||
event.AltDown(),
|
||||
event.MetaDown() );
|
||||
m_selectingTopLeft = wxGridNoCellCoords;
|
||||
m_selectingBottomRight = wxGridNoCellCoords;
|
||||
m_selectingKeyboard = wxGridNoCellCoords;
|
||||
}
|
||||
|
||||
switch ( event.KeyCode() )
|
||||
{
|
||||
case WXK_UP:
|
||||
@@ -5101,7 +5128,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
MovePageDown();
|
||||
break;
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
case WXK_SPACE:
|
||||
if ( !IsEditable() )
|
||||
{
|
||||
@@ -5112,7 +5139,11 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
#else
|
||||
case WXK_SPACE:
|
||||
m_selection->ToggleCellSelection( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
m_currentCellCoords.GetCol(),
|
||||
event.ControlDown(),
|
||||
event.ShiftDown(),
|
||||
event.AltDown(),
|
||||
event.MetaDown() );
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -5153,7 +5184,6 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
m_inOnKeyDown = FALSE;
|
||||
}
|
||||
|
||||
|
||||
void wxGrid::OnEraseBackground(wxEraseEvent&)
|
||||
{
|
||||
}
|
||||
@@ -6131,18 +6161,17 @@ bool wxGrid::MoveCursorUp( bool expandSelection )
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetRow() > 0 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow() - 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
SetCurrentCell( m_currentCellCoords.GetRow() - 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
{
|
||||
if ( m_selectingKeyboard == wxGridNoCellCoords )
|
||||
m_selectingKeyboard = m_currentCellCoords;
|
||||
m_selectingKeyboard.SetRow( m_selectingKeyboard.GetRow() - 1 );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( m_currentCellCoords.GetRow() - 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
return TRUE;
|
||||
}
|
||||
@@ -6156,18 +6185,17 @@ bool wxGrid::MoveCursorDown( bool expandSelection )
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetRow() < m_numRows-1 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow() + 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
SetCurrentCell( m_currentCellCoords.GetRow() + 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
{
|
||||
if ( m_selectingKeyboard == wxGridNoCellCoords )
|
||||
m_selectingKeyboard = m_currentCellCoords;
|
||||
m_selectingKeyboard.SetRow( m_selectingKeyboard.GetRow() + 1 );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( m_currentCellCoords.GetRow() + 1,
|
||||
m_currentCellCoords.GetCol() );
|
||||
return TRUE;
|
||||
}
|
||||
@@ -6181,19 +6209,18 @@ bool wxGrid::MoveCursorLeft( bool expandSelection )
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetCol() > 0 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() - 1 );
|
||||
|
||||
if ( expandSelection )
|
||||
{
|
||||
if ( m_selectingKeyboard == wxGridNoCellCoords )
|
||||
m_selectingKeyboard = m_currentCellCoords;
|
||||
m_selectingKeyboard.SetCol( m_selectingKeyboard.GetCol() - 1 );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() - 1 );
|
||||
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -6206,19 +6233,19 @@ bool wxGrid::MoveCursorRight( bool expandSelection )
|
||||
if ( m_currentCellCoords != wxGridNoCellCoords &&
|
||||
m_currentCellCoords.GetCol() < m_numCols - 1 )
|
||||
{
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
|
||||
MakeCellVisible( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() + 1 );
|
||||
|
||||
if ( expandSelection )
|
||||
{
|
||||
if ( m_selectingKeyboard == wxGridNoCellCoords )
|
||||
m_selectingKeyboard = m_currentCellCoords;
|
||||
m_selectingKeyboard.SetCol( m_selectingKeyboard.GetCol() + 1 );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() + 1 );
|
||||
|
||||
if ( expandSelection )
|
||||
m_selection->SelectCell( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol() );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -6334,9 +6361,11 @@ bool wxGrid::MoveCursorUpBlock( bool expandSelection )
|
||||
|
||||
MakeCellVisible( row, col );
|
||||
if ( expandSelection )
|
||||
m_selection->SelectBlock( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol(),
|
||||
row, col );
|
||||
{
|
||||
m_selectingKeyboard = wxGridCellCoords( row, col );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( row, col );
|
||||
|
||||
return TRUE;
|
||||
@@ -6393,9 +6422,11 @@ bool wxGrid::MoveCursorDownBlock( bool expandSelection )
|
||||
|
||||
MakeCellVisible( row, col );
|
||||
if ( expandSelection )
|
||||
m_selection->SelectBlock( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol(),
|
||||
row, col );
|
||||
{
|
||||
m_selectingKeyboard = wxGridCellCoords( row, col );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( row, col );
|
||||
|
||||
return TRUE;
|
||||
@@ -6452,9 +6483,11 @@ bool wxGrid::MoveCursorLeftBlock( bool expandSelection )
|
||||
|
||||
MakeCellVisible( row, col );
|
||||
if ( expandSelection )
|
||||
m_selection->SelectBlock( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol(),
|
||||
row, col );
|
||||
{
|
||||
m_selectingKeyboard = wxGridCellCoords( row, col );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( row, col );
|
||||
|
||||
return TRUE;
|
||||
@@ -6511,9 +6544,11 @@ bool wxGrid::MoveCursorRightBlock( bool expandSelection )
|
||||
|
||||
MakeCellVisible( row, col );
|
||||
if ( expandSelection )
|
||||
m_selection->SelectBlock( m_currentCellCoords.GetRow(),
|
||||
m_currentCellCoords.GetCol(),
|
||||
row, col );
|
||||
{
|
||||
m_selectingKeyboard = wxGridCellCoords( row, col );
|
||||
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
|
||||
}
|
||||
else
|
||||
SetCurrentCell( row, col );
|
||||
|
||||
return TRUE;
|
||||
|
@@ -184,7 +184,9 @@ void wxGridSelection::SetSelectionMode(wxGrid::wxGridSelectionModes selmode)
|
||||
}
|
||||
}
|
||||
|
||||
void wxGridSelection::SelectRow( int row, bool addToSelected )
|
||||
void wxGridSelection::SelectRow( int row, bool addToSelected,
|
||||
bool ControlDown, bool ShiftDown,
|
||||
bool AltDown, bool MetaDown )
|
||||
{
|
||||
if ( m_selectionMode == wxGrid::wxGridSelectColumns )
|
||||
return;
|
||||
@@ -267,12 +269,17 @@ void wxGridSelection::SelectRow( int row, bool addToSelected )
|
||||
wxEVT_GRID_RANGE_SELECT,
|
||||
m_grid,
|
||||
wxGridCellCoords( row, 0 ),
|
||||
wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) );
|
||||
wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ),
|
||||
TRUE,
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
}
|
||||
|
||||
void wxGridSelection::SelectCol( int col, bool addToSelected )
|
||||
void wxGridSelection::SelectCol( int col, bool addToSelected,
|
||||
bool ControlDown, bool ShiftDown,
|
||||
bool AltDown, bool MetaDown )
|
||||
{
|
||||
if ( m_selectionMode == wxGrid::wxGridSelectRows )
|
||||
return;
|
||||
@@ -355,14 +362,19 @@ void wxGridSelection::SelectCol( int col, bool addToSelected )
|
||||
wxEVT_GRID_RANGE_SELECT,
|
||||
m_grid,
|
||||
wxGridCellCoords( 0, col ),
|
||||
wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) );
|
||||
wxGridCellCoords( m_grid->GetNumberRows() - 1, col ),
|
||||
TRUE,
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
}
|
||||
|
||||
void wxGridSelection::SelectBlock( int topRow, int leftCol,
|
||||
int bottomRow, int rightCol,
|
||||
wxMouseEvent* mouseEv, bool sendEvent )
|
||||
bool ControlDown, bool ShiftDown,
|
||||
bool AltDown, bool MetaDown,
|
||||
bool sendEvent )
|
||||
{
|
||||
// Fix the coordinates of the block if needed.
|
||||
if ( m_selectionMode == wxGrid::wxGridSelectRows )
|
||||
@@ -391,7 +403,8 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol,
|
||||
|
||||
// Handle single cell selection in SelectCell.
|
||||
if ( topRow == bottomRow && leftCol == rightCol )
|
||||
SelectCell( topRow, leftCol, sendEvent );
|
||||
SelectCell( topRow, leftCol, ControlDown, ShiftDown,
|
||||
AltDown, MetaDown, sendEvent );
|
||||
|
||||
size_t count, n;
|
||||
// Remove single cells contained in newly selected block.
|
||||
@@ -484,17 +497,6 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol,
|
||||
|
||||
// Send Event, if not disabled.
|
||||
if ( sendEvent )
|
||||
{
|
||||
if ( mouseEv == 0)
|
||||
{
|
||||
wxGridRangeSelectEvent gridEvt( m_grid->GetId(),
|
||||
wxEVT_GRID_RANGE_SELECT,
|
||||
m_grid,
|
||||
wxGridCellCoords( topRow, leftCol ),
|
||||
wxGridCellCoords( bottomRow, rightCol ) );
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxGridRangeSelectEvent gridEvt( m_grid->GetId(),
|
||||
wxEVT_GRID_RANGE_SELECT,
|
||||
@@ -502,16 +504,16 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol,
|
||||
wxGridCellCoords( topRow, leftCol ),
|
||||
wxGridCellCoords( bottomRow, rightCol ),
|
||||
TRUE,
|
||||
mouseEv->ControlDown(),
|
||||
mouseEv->ShiftDown(),
|
||||
mouseEv->AltDown(),
|
||||
mouseEv->MetaDown() );
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxGridSelection::SelectCell( int row, int col, bool sendEvent )
|
||||
void wxGridSelection::SelectCell( int row, int col,
|
||||
bool ControlDown, bool ShiftDown,
|
||||
bool AltDown, bool MetaDown,
|
||||
bool sendEvent )
|
||||
{
|
||||
if ( m_selectionMode == wxGrid::wxGridSelectRows )
|
||||
{
|
||||
@@ -534,19 +536,29 @@ void wxGridSelection::SelectCell( int row, int col, bool sendEvent )
|
||||
((wxWindow *)m_grid->m_gridWin)->Refresh( FALSE, &r );
|
||||
|
||||
// Send event
|
||||
if (sendEvent)
|
||||
{
|
||||
wxGridEvent gridEvt( m_grid->GetId(),
|
||||
wxEVT_GRID_SELECT_CELL,
|
||||
m_grid,
|
||||
row, col );
|
||||
row, col,
|
||||
-1, -1,
|
||||
TRUE,
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown);
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
}
|
||||
}
|
||||
|
||||
void wxGridSelection::ToggleCellSelection( int row, int col)
|
||||
void wxGridSelection::ToggleCellSelection( int row, int col,
|
||||
bool ControlDown, bool ShiftDown,
|
||||
bool AltDown, bool MetaDown )
|
||||
{
|
||||
// if the cell is not selected, select it
|
||||
if ( !IsInSelection ( row, col ) )
|
||||
{
|
||||
SelectCell( row, col );
|
||||
SelectCell( row, col, ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -580,7 +592,9 @@ void wxGridSelection::ToggleCellSelection( int row, int col)
|
||||
wxGridEvent gridEvt( m_grid->GetId(),
|
||||
wxEVT_GRID_SELECT_CELL,
|
||||
m_grid,
|
||||
row, col, -1, -1, FALSE );
|
||||
row, col, -1, -1, FALSE,
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
}
|
||||
}
|
||||
@@ -701,7 +715,9 @@ void wxGridSelection::ToggleCellSelection( int row, int col)
|
||||
wxGridEvent gridEvt( m_grid->GetId(),
|
||||
wxEVT_GRID_SELECT_CELL,
|
||||
m_grid,
|
||||
row, col, -1, -1, FALSE );
|
||||
row, col, -1, -1, FALSE,
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
break;
|
||||
}
|
||||
@@ -716,7 +732,9 @@ void wxGridSelection::ToggleCellSelection( int row, int col)
|
||||
m_grid,
|
||||
wxGridCellCoords( row, 0 ),
|
||||
wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ),
|
||||
FALSE );
|
||||
FALSE,
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
break;
|
||||
}
|
||||
@@ -731,7 +749,9 @@ void wxGridSelection::ToggleCellSelection( int row, int col)
|
||||
m_grid,
|
||||
wxGridCellCoords( 0, col ),
|
||||
wxGridCellCoords( m_grid->GetNumberRows() - 1, col ),
|
||||
FALSE );
|
||||
FALSE,
|
||||
ControlDown, ShiftDown,
|
||||
AltDown, MetaDown );
|
||||
m_grid->GetEventHandler()->ProcessEvent(gridEvt);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user