X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df9fac6d214e7c88db5dec3d28e15f4db9eddce0..7d605004a217d4f4ef674d7edf073982d8931995:/include/wx/generic/gridsel.h?ds=sidebyside diff --git a/include/wx/generic/gridsel.h b/include/wx/generic/gridsel.h index 5fc30ab259..ab83260f91 100644 --- a/include/wx/generic/gridsel.h +++ b/include/wx/generic/gridsel.h @@ -21,10 +21,16 @@ class WXDLLIMPEXP_ADV wxGridSelection { public: - wxGridSelection( wxGrid * grid, wxGrid::wxGridSelectionModes sel = - wxGrid::wxGridSelectCells ); + wxGridSelection(wxGrid *grid, + wxGrid::wxGridSelectionModes sel = wxGrid::wxGridSelectCells); + bool IsSelection(); - bool IsInSelection ( int row, int col ); + bool IsInSelection(int row, int col); + bool IsInSelection(const wxGridCellCoords& coords) + { + return IsInSelection(coords.GetRow(), coords.GetCol()); + } + void SetSelectionMode(wxGrid::wxGridSelectionModes selmode); wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; } void SelectRow( int row, @@ -46,6 +52,15 @@ public: bool ControlDown = false, bool ShiftDown = false, bool AltDown = false, bool MetaDown = false ); + void ToggleCellSelection( const wxGridCellCoords& coords, + bool ControlDown = false, + bool ShiftDown = false, + bool AltDown = false, bool MetaDown = false ) + { + ToggleCellSelection(coords.GetRow(), coords.GetCol(), + ControlDown, ShiftDown, AltDown, MetaDown); + } + void ClearSelection(); void UpdateRows( size_t pos, int numRows ); @@ -79,7 +94,7 @@ private: wxGrid *m_grid; wxGrid::wxGridSelectionModes m_selectionMode; - friend class WXDLLIMPEXP_ADV wxGrid; + friend class WXDLLIMPEXP_FWD_ADV wxGrid; DECLARE_NO_COPY_CLASS(wxGridSelection) };