|
||
class CGridCellRegion : public CBase;
Defines a selected region.
A selected region consists of one or more cell ranges, represented by TRangeRef
objects, that exist within a defined boundary. The boundary is itself defined as a cell range.
Cell ranges map cell selections, and the class provides the behaviour to manage these selections.
CBase
-
Base class for all classes to be instantiated on the heap.
CGridCellRegion
- Defines a selected region.
Defined in CGridCellRegion
:
AddCellRangeL(const TRangeRef &)
Adds the specified range to the region.AddColL(TInt)
Defines a new cell range one column in width, and adds it to the region.AddRowL(TInt)
Defines a new cell range one row in height, and adds it to the region.Count()const
Gets the number of ranges in the region.IsAnyColSelected()const
Tests whether any column is selected.IsAnyRowSelected()const
Tests whether any row is selected.IsCellSelected(const TCellRef &)const
Tests whether the specified cell is selected.IsCellSelected(const TCellRef &,TInt)const
Tests whether the specified cell is selected in the range identified by the spec...IsCellSelectedLastIndex(const TCellRef &)const
Tests whether the specified cell is selected in the last range of the region.IsColSelected(TInt)const
Tests whether the specified column is selected.IsColSelected(TInt,TInt)const
Tests whether the specified column is selected in the range identified by the sp...IsColSelectedLastIndex(TInt)const
Tests whether the specified column is selected in the last range in the region.IsRangeSelected(const TRangeRef &)const
Tests whether the specified range is selected.IsRangeSelected(const TRangeRef &,TInt)const
Tests whether the specified range is the same as the range identified by the spe...IsRangeSelectedLastIndex(const TRangeRef &)const
Tests whether the specified range is the same as the last range in the region.IsRowSelected(TInt)const
Tests whether the specified row is selected.IsRowSelected(TInt,TInt)const
Tests whether the specified row is selected in the range identified by the speci...IsRowSelectedLastIndex(TInt)const
Tests whether the specified row is selected in the last range in the region.NewL(const TRangeRef &)
Creates a new selected region.RangeList()const
Gets a pointer to the internal array of ranges that constitutes the region.Reset()
Deletes all ranges from the region. ResizeBounds(const TCellRef &)
Defines a new region boundary by replacing the end cell with the specified cell.SetLastCellRange(const TRangeRef &)
Replaces the last range in the region with the specified range.operator[](TInt)const
Gets the range within the region that is identified by the specified index.~CGridCellRegion()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C static CGridCellRegion* NewL(const TRangeRef &aBounds);
Creates a new selected region.
|
|
IMPORT_C virtual ~CGridCellRegion();
Destructor.
Frees all resources owned by the object prior to its destruction.
IMPORT_C void AddColL(TInt aCol);
Defines a new cell range one column in width, and adds it to the region.
The row number of the start cell of the new range is the row number defining the start of the region boundary.
The row number of the end cell of the new range is the row number defining the end of the region boundary.
|
IMPORT_C void AddRowL(TInt aRow);
Defines a new cell range one row in height, and adds it to the region.
The column number of the start cell of the new range is the column number defining the start of the region boundary.
The column number of the end cell of the new range is the column number defining the end of the region boundary.
|
IMPORT_C void AddCellRangeL(const TRangeRef &aCellRange);
Adds the specified range to the region.
|
IMPORT_C void SetLastCellRange(const TRangeRef &aCellRange);
Replaces the last range in the region with the specified range.
Note that a region is implemented as an array of ranges, and the last range is the last one in the array.
|
|
IMPORT_C void ResizeBounds(const TCellRef &aNewToBounds);
Defines a new region boundary by replacing the end cell with the specified cell.
Any existing ranges that are now wholly outside the new region boundary are deleted.
Any existing ranges whose boundaries were the same as the old region boundary, are stretched or shrunk so that their boundaries are now on the new region boundary.
Any existing ranges that now intersect the new region boundary are truncated back to the new region boundary.
Any existing ranges that remain wholly within the new region boundary remain unchanged.
|
IMPORT_C TInt Count() const;
Gets the number of ranges in the region.
|
IMPORT_C TBool IsCellSelected(const TCellRef &aCell) const;
Tests whether the specified cell is selected.
A cell is selected if it is in the region.
|
|
IMPORT_C TBool IsCellSelected(const TCellRef &aCell, TInt aIndex) const;
Tests whether the specified cell is selected in the range identified by the specified index.
A cell is selected if it lies in the range.
Note that a region is implemented as an array of ranges, and the index identifies a specific range within that array.
|
|
|
IMPORT_C TBool IsCellSelectedLastIndex(const TCellRef &aCell) const;
Tests whether the specified cell is selected in the last range of the region.
A cell is selected if it lies in the range.
Note that a region is implemented as an array of ranges, and the last range is the last one in the array.
|
|
IMPORT_C TBool IsRowSelected(TInt aRow) const;
Tests whether the specified row is selected.
A row is selected if the row lies within one of the region's ranges, and the range spans all of the columns defined by the region boundary (i.e. extends from one side of the region boundary to the other).
|
|
IMPORT_C TBool IsRowSelected(TInt aRow, TInt aIndex) const;
Tests whether the specified row is selected in the range identified by the specified index.
A row is selected in a range only if it lies in the range, and the range spans all of the columns defined by region boundary (i.e. extends from one side of the region boundary to the other).
Note that a region is implemented as an array of ranges, and the index identifies a specific range within that array.
|
|
|
IMPORT_C TBool IsRowSelectedLastIndex(TInt aRow) const;
Tests whether the specified row is selected in the last range in the region.
A row is selected in a range only if it lies in the range, and the range spans all of the columns defined by region boundary (i.e. extends from one side of the region boundary to the other).
Note that a region is implemented as an array of ranges, and the last range is the last one in the array.
|
|
IMPORT_C TBool IsAnyRowSelected() const;
Tests whether any row is selected.
A row is selected if any range spans all of the columns defined by region boundary (i.e. extends from one side of the region boundary to the other).
|
IMPORT_C TBool IsColSelected(TInt aCol) const;
Tests whether the specified column is selected.
A column is selected if the column lies within one of the region's ranges, and the range spans all of the rows defined by the region boundary (i.e. extends from the top of the region boundary to the bottom).
|
|
IMPORT_C TBool IsColSelected(TInt aCol, TInt aIndex) const;
Tests whether the specified column is selected in the range identified by the specified index.
A column is selected in a range only if it lies in the range, and the range spans all of the rows defined by the region boundary (i.e. extends from the top of the region boundary to the bottom).
Note that a region is implemented as an array of ranges, and the index identifies a specific range within that array.
|
|
|
IMPORT_C TBool IsColSelectedLastIndex(TInt aCol) const;
Tests whether the specified column is selected in the last range in the region.
A column is selected in a range only if it lies in the range, and the range spans all of the rows defined by the region boundary (i.e. extends from the top of the region boundary to the bottom).
Note that a region is implemented as an array of ranges, and the last range is the last one in the array.
|
|
IMPORT_C TBool IsAnyColSelected() const;
Tests whether any column is selected.
A column is selected if any range spans all of the rows defined by region boundary (i.e. extends from the top of the region boundary to the bottom).
|
IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange) const;
Tests whether the specified range is selected.
A range is selected if it is one of the ranges making up the region.
|
|
IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange, TInt aIndex) const;
Tests whether the specified range is the same as the range identified by the specified index.
Note that a region is implemented as an array of ranges, and the index identifies a specific range within that array.
|
|
|
IMPORT_C TBool IsRangeSelectedLastIndex(const TRangeRef &aRange) const;
Tests whether the specified range is the same as the last range in the region.
Note that a region is implemented as an array of ranges, and the last range is the last one in the array.
|
|