// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __WXGRIDSEL_H__
-#define __WXGRIDSEL_H__
+#ifndef _WX_GENERIC_GRIDSEL_H_
+#define _WX_GENERIC_GRIDSEL_H_
#include "wx/defs.h"
#include "wx/grid.h"
-class WXDLLIMPEXP_ADV wxGridSelection{
+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,
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 );
wxGrid *m_grid;
wxGrid::wxGridSelectionModes m_selectionMode;
- friend class WXDLLIMPEXP_ADV wxGrid;
+ friend class WXDLLIMPEXP_FWD_ADV wxGrid;
DECLARE_NO_COPY_CLASS(wxGridSelection)
};
-#endif // #ifndef wxUSE_GRID
-#endif // #ifdef __WXGRIDSEL_H__
-
+#endif // wxUSE_GRID
+#endif // _WX_GENERIC_GRIDSEL_H_