Add simple wxGrid::GetGridCursorCoords() method
This is sometimes more convenient than using GetGridCursor{Row,Col}() separately.
This commit is contained in:
@@ -1179,6 +1179,9 @@ public:
|
|||||||
wxRect CellToRect( const wxGridCellCoords& coords ) const
|
wxRect CellToRect( const wxGridCellCoords& coords ) const
|
||||||
{ return CellToRect( coords.GetRow(), coords.GetCol() ); }
|
{ return CellToRect( coords.GetRow(), coords.GetCol() ); }
|
||||||
|
|
||||||
|
const wxGridCellCoords& GetGridCursorCoords() const
|
||||||
|
{ return m_currentCellCoords; }
|
||||||
|
|
||||||
int GetGridCursorRow() const { return m_currentCellCoords.GetRow(); }
|
int GetGridCursorRow() const { return m_currentCellCoords.GetRow(); }
|
||||||
int GetGridCursorCol() const { return m_currentCellCoords.GetCol(); }
|
int GetGridCursorCol() const { return m_currentCellCoords.GetCol(); }
|
||||||
|
|
||||||
|
@@ -3827,13 +3827,28 @@ public:
|
|||||||
*/
|
*/
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the current grid cursor position.
|
||||||
|
|
||||||
|
If grid cursor doesn't have any valid position (e.g. if the grid is
|
||||||
|
completely empty and doesn't have any rows or columns), returns
|
||||||
|
@c wxGridNoCellCoords which has both row and columns set to @c -1.
|
||||||
|
|
||||||
|
@since 3.1.3
|
||||||
|
*/
|
||||||
|
const wxGridCellCoords& GetGridCursorCoords() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the current grid cell column position.
|
Returns the current grid cell column position.
|
||||||
|
|
||||||
|
@see GetGridCursorCoords()
|
||||||
*/
|
*/
|
||||||
int GetGridCursorCol() const;
|
int GetGridCursorCol() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the current grid cell row position.
|
Returns the current grid cell row position.
|
||||||
|
|
||||||
|
@see GetGridCursorCoords()
|
||||||
*/
|
*/
|
||||||
int GetGridCursorRow() const;
|
int GetGridCursorRow() const;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user