with refreshing and edit control placement.
Added calls to wxFAIL_MSG.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5941
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-// FIXME VZ: these should be wxFAIL_MSG(), not wxLogWarning, they're for the
-// programmer, not the user!
-
bool wxGridTableBase::InsertRows( size_t pos, size_t numRows )
{
bool wxGridTableBase::InsertRows( size_t pos, size_t numRows )
{
- wxLogWarning( wxT("Called grid table class function InsertRows(pos=%d, N=%d)\n"
- "but your derived table class does not override this function"),
- pos, numRows );
+ wxFAIL_MSG( wxT("Called grid table class function InsertRows\n"
+ "but your derived table class does not override this function") );
return FALSE;
}
bool wxGridTableBase::AppendRows( size_t numRows )
{
return FALSE;
}
bool wxGridTableBase::AppendRows( size_t numRows )
{
- wxLogWarning( wxT("Called grid table class function AppendRows(N=%d)\n"
- "but your derived table class does not override this function"),
- numRows );
+ wxFAIL_MSG( wxT("Called grid table class function AppendRows\n"
+ "but your derived table class does not override this function"));
return FALSE;
}
bool wxGridTableBase::DeleteRows( size_t pos, size_t numRows )
{
return FALSE;
}
bool wxGridTableBase::DeleteRows( size_t pos, size_t numRows )
{
- wxLogWarning( wxT("Called grid table class function DeleteRows(pos=%d, N=%d)\n"
- "but your derived table class does not override this function"),
- pos, numRows );
+ wxFAIL_MSG( wxT("Called grid table class function DeleteRows\n"
+ "but your derived table class does not override this function"));
return FALSE;
}
bool wxGridTableBase::InsertCols( size_t pos, size_t numCols )
{
return FALSE;
}
bool wxGridTableBase::InsertCols( size_t pos, size_t numCols )
{
- wxLogWarning( wxT("Called grid table class function InsertCols(pos=%d, N=%d)\n"
- "but your derived table class does not override this function"),
- pos, numCols );
+ wxFAIL_MSG( wxT("Called grid table class function InsertCols\n"
+ "but your derived table class does not override this function"));
return FALSE;
}
bool wxGridTableBase::AppendCols( size_t numCols )
{
return FALSE;
}
bool wxGridTableBase::AppendCols( size_t numCols )
{
- wxLogWarning( wxT("Called grid table class function AppendCols(N=%d)\n"
- "but your derived table class does not override this function"),
- numCols );
+ wxFAIL_MSG(wxT("Called grid table class function AppendCols\n"
+ "but your derived table class does not override this function"));
return FALSE;
}
bool wxGridTableBase::DeleteCols( size_t pos, size_t numCols )
{
return FALSE;
}
bool wxGridTableBase::DeleteCols( size_t pos, size_t numCols )
{
- wxLogWarning( wxT("Called grid table class function DeleteCols(pos=%d, N=%d)\n"
- "but your derived table class does not override this function"),
- pos, numCols );
+ wxFAIL_MSG( wxT("Called grid table class function DeleteCols\n"
+ "but your derived table class does not override this function"));
if ( pos >= curNumRows )
{
if ( pos >= curNumRows )
{
- wxLogError( wxT("Called wxGridStringTable::DeleteRows(pos=%d, N=%d)...\n"
- "Pos value is invalid for present table with %d rows"),
- pos, numRows, curNumRows );
+ wxString errmsg;
+ errmsg.Printf("Called wxGridStringTable::DeleteRows(pos=%d, N=%d)\n"
+ "Pos value is invalid for present table with %d rows",
+ pos, numRows, curNumRows );
+ wxFAIL_MSG( wxT(errmsg) );
{
// TODO: something better than this ?
//
{
// TODO: something better than this ?
//
- wxLogError( wxT("Unable to append cols to a grid table with no rows.\n"
- "Call AppendRows() first") );
+ wxFAIL_MSG( wxT("Unable to append cols to a grid table with no rows.\n"
+ "Call AppendRows() first") );
if ( pos >= curNumCols )
{
if ( pos >= curNumCols )
{
- wxLogError( wxT("Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\n"
- "Pos value is invalid for present table with %d cols"),
- pos, numCols, curNumCols );
+ wxString errmsg;
+ errmsg.Printf( "Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\n"
+ "Pos value is invalid for present table with %d cols",
+ pos, numCols, curNumCols );
+ wxFAIL_MSG( wxT( errmsg ) );
- wxLogError( wxT("wxGrid::CreateGrid(numRows, numCols) called more than once") );
+ wxFAIL_MSG( wxT("wxGrid::CreateGrid called more than once") );
CalcUnscrolledPosition( r.GetLeft(), r.GetTop(), &left, &top );
CalcUnscrolledPosition( r.GetRight(), r.GetBottom(), &right, &bottom );
CalcUnscrolledPosition( r.GetLeft(), r.GetTop(), &left, &top );
CalcUnscrolledPosition( r.GetRight(), r.GetBottom(), &right, &bottom );
// find the cells within these bounds
//
int row, col;
// find the cells within these bounds
//
int row, col;
- wxLogError( wxT("Called wxGrid::InsertRows() before calling CreateGrid()") );
+ wxFAIL_MSG( wxT("Called wxGrid::InsertRows() before calling CreateGrid()") );
- wxLogError( wxT("Called wxGrid::AppendRows() before calling CreateGrid()") );
+ wxFAIL_MSG( wxT("Called wxGrid::AppendRows() before calling CreateGrid()") );
- wxLogError( wxT("Called wxGrid::DeleteRows() before calling CreateGrid()") );
+ wxFAIL_MSG( wxT("Called wxGrid::DeleteRows() before calling CreateGrid()") );
- wxLogError( wxT("Called wxGrid::InsertCols() before calling CreateGrid()") );
+ wxFAIL_MSG( wxT("Called wxGrid::InsertCols() before calling CreateGrid()") );
- wxLogError( wxT("Called wxGrid::AppendCols() before calling CreateGrid()") );
+ wxFAIL_MSG( wxT("Called wxGrid::AppendCols() before calling CreateGrid()") );
- wxLogError( wxT("Called wxGrid::DeleteCols() before calling CreateGrid()") );
+ wxFAIL_MSG( wxT("Called wxGrid::DeleteCols() before calling CreateGrid()") );
{
// shouldn't be here - we are going round in circles...
//
{
// shouldn't be here - we are going round in circles...
//
- wxLogFatalError( wxT("wxGrid::OnKeyDown called while alread active") );
+ wxFAIL_MSG( wxT("wxGrid::OnKeyDown called while alread active") );
- dc.DrawLine( m_colRights[col]-1, m_rowBottoms[row] - m_rowHeights[row],
- m_colRights[col]-1, m_rowBottoms[row]-1 );
+ dc.DrawLine( m_colRights[col], m_rowBottoms[row] - m_rowHeights[row],
+ m_colRights[col], m_rowBottoms[row] );
- dc.DrawLine( m_colRights[col] - m_colWidths[col], m_rowBottoms[row]-1,
- m_colRights[col]-1, m_rowBottoms[row]-1 );
+ dc.DrawLine( m_colRights[col] - m_colWidths[col], m_rowBottoms[row],
+ m_colRights[col], m_rowBottoms[row] );
int i;
for ( i = 0; i < m_numRows; i++ )
{
int i;
for ( i = 0; i < m_numRows; i++ )
{
- if ( m_rowBottoms[i]-1 > bottom )
+ if ( m_rowBottoms[i] > bottom )
- else if ( m_rowBottoms[i]-1 >= top )
+ else if ( m_rowBottoms[i] >= top )
- dc.DrawLine( left, m_rowBottoms[i]-1, right, m_rowBottoms[i]-1 );
+ dc.DrawLine( left, m_rowBottoms[i], right, m_rowBottoms[i] );
//
for ( i = 0; i < m_numCols; i++ )
{
//
for ( i = 0; i < m_numCols; i++ )
{
- if ( m_colRights[i]-1 > right )
+ if ( m_colRights[i] > right )
- else if ( m_colRights[i]-1 >= left )
+ else if ( m_colRights[i] >= left )
- dc.DrawLine( m_colRights[i]-1, top, m_colRights[i]-1, bottom );
+ dc.DrawLine( m_colRights[i], top, m_colRights[i], bottom );