class CGXRangeList: public CPtrList

CGXRangeList maintains a list of range objects. For example, ranges of cells selected by the user are stored in a CGXRangeList.

CGXRangeList supports serialization.

Elements

Elements of the list are instances of the CGXRange class. You can iterate through the elements with the GetHeadPosition(), GetNext() and GetAt() methods defined in CPtrList.

Moving, inserting or removing rows or columns

When the grid moves, inserts or removes rows or columns, it is necessary to adapt range lists, such as the list of covered ranges or selected cells. CGXRangeList provides methods for this task.

Note

CGXRangeList assumes that all range objects in the list are allocated on the heap and will try to delete all range objects in its destructor. You should therefore always add objects by calling AddTail(new CGXRange …) or something similar. It is also possible to add range objects that were allocated on the stack but then you should call RemoveAll before the CGXRangeList gets deleted. This will prevent the destructor from trying to deallocate the range objects.

#include <gxall.h>

See Also

 CGXRange  CGXGridParam::GetRangeList  CGXGridParam::GetCoveredCellsList

CGXRangeList

 Class Members