X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27f35b6674b796e61986681261ec7a96bef93502..58071ea0089e929db5899d27072b10d79ed57f10:/include/wx/generic/grid.h diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 85417f5bbc..7468fca53a 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -1029,6 +1029,7 @@ public: wxGrid::wxGridSelectCells ); void SetSelectionMode(wxGrid::wxGridSelectionModes selmode); + wxGrid::wxGridSelectionModes GetSelectionMode() const; // ------ grid dimensions // @@ -1117,7 +1118,8 @@ public: int GetBatchCount() { return m_batchCount; } - virtual void Refresh(bool eraseb=true, wxRect* rect= NULL); + virtual void Refresh(bool eraseb = true, + const wxRect* rect = (const wxRect *) NULL); // Use this, rather than wxWindow::Refresh(), to force an // immediate repainting of the grid. Has no effect if you are @@ -1131,7 +1133,7 @@ public: // ------ edit control functions // - bool IsEditable() { return m_editable; } + bool IsEditable() const { return m_editable; } void EnableEditing( bool edit ); void EnableCellEditControl( bool enable = TRUE ); @@ -1355,7 +1357,7 @@ public: // make the cell editable/readonly void SetReadOnly(int row, int col, bool isReadOnly = TRUE); - // ------ selections of blocks of cells + // ------ select blocks of cells // void SelectRow( int row, bool addToSelected = FALSE ); void SelectCol( int col, bool addToSelected = FALSE ); @@ -1374,7 +1376,7 @@ public: bool IsSelection(); - // ------ deselection + // ------ deselect blocks or cells // void DeselectRow( int row ); void DeselectCol( int col ); @@ -1382,11 +1384,16 @@ public: void ClearSelection(); - bool IsInSelection( int row, int col ); + bool IsInSelection( int row, int col ) const; - bool IsInSelection( const wxGridCellCoords& coords ) + bool IsInSelection( const wxGridCellCoords& coords ) const { return IsInSelection( coords.GetRow(), coords.GetCol() ); } + wxGridCellCoordsArray GetSelectedCells() const; + wxGridCellCoordsArray GetSelectionBlockTopLeft() const; + wxGridCellCoordsArray GetSelectionBlockBottomRight() const; + wxArrayInt GetSelectedRows() const; + wxArrayInt GetSelectedCols() const; // This function returns the rectangle that encloses the block of cells // limited by TopLeft and BottomRight cell in device coords and clipped