Changed wxGridCellCoords from long to int (get rid of most HP warnings?)

Added Shift/Control+Click handling for labels.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2000-03-10 12:27:27 +00:00
parent 2c4ad28347
commit e32352cf66
4 changed files with 71 additions and 33 deletions

View File

@@ -572,6 +572,7 @@ void GridFrame::OnLabelLeftClick( wxGridEvent& ev )
}
if ( ev.ShiftDown() ) logBuf << " (shift down)";
if ( ev.ControlDown() ) logBuf << " (control down)";
wxLogMessage( "%s", logBuf.c_str() );
// you must call event skip if you want default grid processing
@@ -911,12 +912,12 @@ wxString BugsGridTable::GetTypeName(int WXUNUSED(row), int col)
return wxEmptyString;
}
long BugsGridTable::GetNumberRows()
int BugsGridTable::GetNumberRows()
{
return WXSIZEOF(gs_dataBugsGrid);
}
long BugsGridTable::GetNumberCols()
int BugsGridTable::GetNumberCols()
{
return Col_Max;
}

View File

@@ -141,8 +141,8 @@ class BigGridTable : public wxGridTableBase
public:
BigGridTable(long sizeGrid) { m_sizeGrid = sizeGrid; }
long GetNumberRows() { return m_sizeGrid; }
long GetNumberCols() { return m_sizeGrid; }
int GetNumberRows() { return m_sizeGrid; }
int GetNumberCols() { return m_sizeGrid; }
wxString GetValue( int row, int col )
{
return wxString::Format("(%d, %d)", row, col);
@@ -190,8 +190,8 @@ class BugsGridTable : public wxGridTableBase
public:
BugsGridTable();
virtual long GetNumberRows();
virtual long GetNumberCols();
virtual int GetNumberRows();
virtual int GetNumberCols();
virtual bool IsEmptyCell( int row, int col );
virtual wxString GetValue( int row, int col );
virtual void SetValue( int row, int col, const wxString& value );