|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #if !defined(__GRDCELLS_H__) |
|
17 #define __GRDCELLS_H__ |
|
18 |
|
19 #if !defined(__E32STD_H__) |
|
20 #include <e32std.h> |
|
21 #endif |
|
22 #if !defined(__E32BASE_H__) |
|
23 #include <e32base.h> |
|
24 #endif |
|
25 #if !defined(__BACELL_H__) |
|
26 #include <bacell.h> |
|
27 #endif |
|
28 |
|
29 |
|
30 |
|
31 class CGridCellRegion : public CBase |
|
32 /** Defines a selected region. |
|
33 |
|
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 |
|
36 as a cell range. |
|
37 |
|
38 Cell ranges map cell selections, and the class provides the behaviour to manage |
|
39 these selections. |
|
40 |
|
41 @publishedAll |
|
42 @released */ |
|
43 { |
|
44 public: |
|
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; |
|
70 private: |
|
71 CGridCellRegion(const TRangeRef& aBounds); |
|
72 void ConstructL(); |
|
73 private: |
|
74 TRangeRef iBounds; |
|
75 CArrayFix<TRangeRef>* iRangeList; |
|
76 }; |
|
77 #endif |