NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
A class to simplify the access to different types of grid cell coords. Especially useful in the context of selected cells (which may come in different flavors). More...
#include <gridcellcoordscontainer.hpp>
Public Member Functions | |
wxGridCellCoordsContainer ()=default | |
Construct an empty wxGridCellCoordsContainer. More... | |
wxGridCellCoordsContainer (const wxGridCellCoords &topleft, const wxGridCellCoords &bottomright) | |
Construct a wxGridCellCoordsContainer from an upperleft and a lowerright coordinate pair. More... | |
wxGridCellCoordsContainer (const wxGridCellCoordsArray &selected) | |
Construct a wxGridCellCoordsContainer from a list of selected grid coordinates. More... | |
wxGridCellCoordsContainer (const wxArrayInt &selectedRowsOrCols, int otherDim, bool rowsSelected=true) | |
Construct a wxGridCellCoordsContainer from a set of indices for complete rows or columns. More... | |
const wxGridCellsExtent & | getExtent () const |
Get the maximal needed enclosing box in terms of wxGridCellCoordinates. More... | |
size_t | getRows () const |
Get the number of enclosed rows. More... | |
size_t | getCols () const |
Get the number of enclosed columns. More... | |
bool | contains (const wxGridCellCoords &cell) const |
Does this wxGridCellCoordsContainer contain the passed coordinates? More... | |
bool | contains (int row, int col) const |
Does this wxGridCellCoordsContainer contain the passed coordinates? More... | |
bool | isBlock () const |
Returns true, if the contained coordinates actually form a contigious block. More... | |
bool | columnsSelected () const |
Returns true, if the contained coordinates originated from complete columns. More... | |
bool | isSparse () const |
Returns true, if the contained coordinates form a sparse matrix. More... | |
const wxGridCellCoordsArray & | getArray () const |
Get a reference to the internal wxGridCellCoordsArray (only available, if the contained coordinates form a sparse matrix). More... | |
Private Attributes | |
wxGridCellsExtent | m_extent |
wxGridCellCoordsArray | m_array |
wxArrayInt | m_rowsOrCols |
bool | m_rowsSelected |
A class to simplify the access to different types of grid cell coords. Especially useful in the context of selected cells (which may come in different flavors).
Definition at line 40 of file gridcellcoordscontainer.hpp.
|
default |
Construct an empty wxGridCellCoordsContainer.
|
inline |
Construct a wxGridCellCoordsContainer from an upperleft and a lowerright coordinate pair.
topleft | const wxGridCellCoords& |
bottomright | const wxGridCellCoords& |
Definition at line 65 of file gridcellcoordscontainer.hpp.
References wxGridCellsExtent::m_bottomright, m_extent, and wxGridCellsExtent::m_topleft.
|
inline |
Construct a wxGridCellCoordsContainer from a list of selected grid coordinates.
selected | const wxGridCellCoordsArray& |
Definition at line 78 of file gridcellcoordscontainer.hpp.
References m_array, wxGridCellsExtent::m_bottomright, m_extent, wxGridCellsExtent::m_topleft, max, and min.
|
inline |
Construct a wxGridCellCoordsContainer from a set of indices for complete rows or columns.
selectedRowsOrCols | const wxArrayInt& |
otherDim | int |
true | bool rowsSelected= |
Definition at line 103 of file gridcellcoordscontainer.hpp.
References wxGridCellsExtent::m_bottomright, m_extent, m_rowsOrCols, m_rowsSelected, wxGridCellsExtent::m_topleft, max, and min.
|
inline |
Returns true, if the contained coordinates originated from complete columns.
Definition at line 238 of file gridcellcoordscontainer.hpp.
References m_rowsOrCols, and m_rowsSelected.
Referenced by TableViewer::applyConditionalCellColourScheme().
|
inline |
Does this wxGridCellCoordsContainer contain the passed coordinates?
cell | const wxGridCellCoords& |
Definition at line 166 of file gridcellcoordscontainer.hpp.
References isSparse(), m_array, wxGridCellsExtent::m_bottomright, m_extent, m_rowsOrCols, m_rowsSelected, and wxGridCellsExtent::m_topleft.
Referenced by TableViewer::applyConditionalCellColourScheme(), GridNumeReTable::avg(), TableViewer::calculateAvg(), TableViewer::calculateMax(), TableViewer::calculateMin(), TableViewer::calculateSum(), TableViewer::changeColType(), contains(), TableViewer::deleteSelection(), GridNumeReTable::max(), GridNumeReTable::min(), and GridNumeReTable::sum().
|
inline |
Does this wxGridCellCoordsContainer contain the passed coordinates?
Same as before but with different argument types for convenience.
row | int |
col | int |
Definition at line 202 of file gridcellcoordscontainer.hpp.
References contains().
|
inline |
Get a reference to the internal wxGridCellCoordsArray (only available, if the contained coordinates form a sparse matrix).
Definition at line 263 of file gridcellcoordscontainer.hpp.
References m_array.
|
inline |
Get the number of enclosed columns.
Definition at line 153 of file gridcellcoordscontainer.hpp.
References wxGridCellsExtent::m_bottomright, m_extent, and wxGridCellsExtent::m_topleft.
Referenced by isBlock().
|
inline |
Get the maximal needed enclosing box in terms of wxGridCellCoordinates.
Definition at line 131 of file gridcellcoordscontainer.hpp.
References m_extent.
Referenced by TableViewer::applyConditionalCellColourScheme(), GridNumeReTable::avg(), TableViewer::calculateAvg(), TableViewer::calculateMax(), TableViewer::calculateMin(), TableViewer::calculateSum(), TableViewer::changeColType(), TableViewer::deleteSelection(), GridNumeReTable::max(), GridNumeReTable::min(), and GridNumeReTable::sum().
|
inline |
Get the number of enclosed rows.
Definition at line 142 of file gridcellcoordscontainer.hpp.
References wxGridCellsExtent::m_bottomright, m_extent, and wxGridCellsExtent::m_topleft.
Referenced by isBlock().
|
inline |
Returns true, if the contained coordinates actually form a contigious block.
Definition at line 214 of file gridcellcoordscontainer.hpp.
References getCols(), getRows(), isSparse(), m_rowsOrCols, and m_rowsSelected.
Referenced by TableViewer::applyConditionalCellColourScheme().
|
inline |
Returns true, if the contained coordinates form a sparse matrix.
Definition at line 250 of file gridcellcoordscontainer.hpp.
References m_array.
Referenced by contains(), and isBlock().
|
private |
Definition at line 44 of file gridcellcoordscontainer.hpp.
Referenced by contains(), getArray(), isSparse(), and wxGridCellCoordsContainer().
|
private |
Definition at line 43 of file gridcellcoordscontainer.hpp.
Referenced by contains(), getCols(), getExtent(), getRows(), and wxGridCellCoordsContainer().
|
private |
Definition at line 45 of file gridcellcoordscontainer.hpp.
Referenced by columnsSelected(), contains(), isBlock(), and wxGridCellCoordsContainer().
|
private |
Definition at line 46 of file gridcellcoordscontainer.hpp.
Referenced by columnsSelected(), contains(), isBlock(), and wxGridCellCoordsContainer().