Move wxGrid::Get{Row,Col}Pos() out of line

Don't define these functions in the header file, this is unnecessary.

No real changes.
This commit is contained in:
Vadim Zeitlin
2022-05-02 21:43:42 +01:00
parent 0e435c1c45
commit bdfa9359ae
2 changed files with 28 additions and 24 deletions

View File

@@ -5539,6 +5539,19 @@ void wxGrid::SetRowPos(int idx, int pos)
RefreshAfterRowPosChange();
}
int wxGrid::GetRowPos(int idx) const
{
wxASSERT_MSG( idx >= 0 && idx < m_numRows, "invalid row index" );
if ( m_rowAt.IsEmpty() )
return idx;
int pos = m_rowAt.Index(idx);
wxASSERT_MSG( pos != wxNOT_FOUND, "invalid row index" );
return pos;
}
void wxGrid::ResetRowPos()
{
m_rowAt.clear();
@@ -5631,6 +5644,19 @@ void wxGrid::SetColPos(int idx, int pos)
RefreshAfterColPosChange();
}
int wxGrid::GetColPos(int idx) const
{
wxASSERT_MSG( idx >= 0 && idx < m_numCols, "invalid column index" );
if ( m_colAt.IsEmpty() )
return idx;
int pos = m_colAt.Index(idx);
wxASSERT_MSG( pos != wxNOT_FOUND, "invalid column index" );
return pos;
}
void wxGrid::ResetColPos()
{
m_colAt.clear();