1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined(__GRDCELLS_H__)
17 #define __GRDCELLS_H__
19 #if !defined(__E32STD_H__)
22 #if !defined(__E32BASE_H__)
25 #if !defined(__BACELL_H__)
31 class CGridCellRegion : public CBase
32 /** Defines a selected region.
34 A selected region consists of one or more cell ranges, represented by TRangeRef
35 objects, that exist within a defined boundary. The boundary is itself defined
38 Cell ranges map cell selections, and the class provides the behaviour to manage
45 IMPORT_C static CGridCellRegion* NewL(const TRangeRef& aBounds);
46 IMPORT_C virtual ~CGridCellRegion();
47 IMPORT_C void AddColL(TInt aCol);
48 IMPORT_C void AddRowL(TInt aRow);
49 IMPORT_C void AddCellRangeL(const TRangeRef& aCellRange);
50 IMPORT_C void SetLastCellRange(const TRangeRef& aCellRange);
51 IMPORT_C void ResizeBounds(const TCellRef& aNewToBounds);
52 IMPORT_C void Reset();
53 IMPORT_C TInt Count() const;
54 IMPORT_C TBool IsCellSelected(const TCellRef &aCell) const;
55 IMPORT_C TBool IsCellSelected(const TCellRef &aCell,TInt aIndex) const;
56 IMPORT_C TBool IsCellSelectedLastIndex(const TCellRef &aCell) const;
57 IMPORT_C TBool IsRowSelected(TInt aRow) const;
58 IMPORT_C TBool IsRowSelected(TInt aRow,TInt aIndex) const;
59 IMPORT_C TBool IsRowSelectedLastIndex(TInt aRow) const;
60 IMPORT_C TBool IsAnyRowSelected() const;
61 IMPORT_C TBool IsColSelected(TInt aCol) const;
62 IMPORT_C TBool IsColSelected(TInt aCol,TInt aIndex) const;
63 IMPORT_C TBool IsColSelectedLastIndex(TInt aCol) const;
64 IMPORT_C TBool IsAnyColSelected() const;
65 IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange) const;
66 IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange,TInt aIndex) const;
67 IMPORT_C TBool IsRangeSelectedLastIndex(const TRangeRef &aRange) const;
68 IMPORT_C TRangeRef operator[](TInt aIndex) const;
69 IMPORT_C const CArrayFix<TRangeRef>* RangeList() const;
71 CGridCellRegion(const TRangeRef& aBounds);
75 CArrayFix<TRangeRef>* iRangeList;