author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 3 | e1b950c65cb4 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@4 | 4 |
// under the terms of "Eclipse Public License v1.0" |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@4 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
#if !defined(__GRDCELLS_H__) |
williamr@2 | 17 |
#define __GRDCELLS_H__ |
williamr@2 | 18 |
|
williamr@2 | 19 |
#if !defined(__E32STD_H__) |
williamr@2 | 20 |
#include <e32std.h> |
williamr@2 | 21 |
#endif |
williamr@2 | 22 |
#if !defined(__E32BASE_H__) |
williamr@2 | 23 |
#include <e32base.h> |
williamr@2 | 24 |
#endif |
williamr@2 | 25 |
#if !defined(__BACELL_H__) |
williamr@2 | 26 |
#include <bacell.h> |
williamr@2 | 27 |
#endif |
williamr@2 | 28 |
|
williamr@2 | 29 |
|
williamr@2 | 30 |
|
williamr@2 | 31 |
class CGridCellRegion : public CBase |
williamr@2 | 32 |
/** Defines a selected region. |
williamr@2 | 33 |
|
williamr@2 | 34 |
A selected region consists of one or more cell ranges, represented by TRangeRef |
williamr@2 | 35 |
objects, that exist within a defined boundary. The boundary is itself defined |
williamr@2 | 36 |
as a cell range. |
williamr@2 | 37 |
|
williamr@2 | 38 |
Cell ranges map cell selections, and the class provides the behaviour to manage |
williamr@2 | 39 |
these selections. |
williamr@2 | 40 |
|
williamr@2 | 41 |
@publishedAll |
williamr@2 | 42 |
@released */ |
williamr@2 | 43 |
{ |
williamr@2 | 44 |
public: |
williamr@2 | 45 |
IMPORT_C static CGridCellRegion* NewL(const TRangeRef& aBounds); |
williamr@2 | 46 |
IMPORT_C virtual ~CGridCellRegion(); |
williamr@2 | 47 |
IMPORT_C void AddColL(TInt aCol); |
williamr@2 | 48 |
IMPORT_C void AddRowL(TInt aRow); |
williamr@2 | 49 |
IMPORT_C void AddCellRangeL(const TRangeRef& aCellRange); |
williamr@2 | 50 |
IMPORT_C void SetLastCellRange(const TRangeRef& aCellRange); |
williamr@2 | 51 |
IMPORT_C void ResizeBounds(const TCellRef& aNewToBounds); |
williamr@2 | 52 |
IMPORT_C void Reset(); |
williamr@2 | 53 |
IMPORT_C TInt Count() const; |
williamr@2 | 54 |
IMPORT_C TBool IsCellSelected(const TCellRef &aCell) const; |
williamr@2 | 55 |
IMPORT_C TBool IsCellSelected(const TCellRef &aCell,TInt aIndex) const; |
williamr@2 | 56 |
IMPORT_C TBool IsCellSelectedLastIndex(const TCellRef &aCell) const; |
williamr@2 | 57 |
IMPORT_C TBool IsRowSelected(TInt aRow) const; |
williamr@2 | 58 |
IMPORT_C TBool IsRowSelected(TInt aRow,TInt aIndex) const; |
williamr@2 | 59 |
IMPORT_C TBool IsRowSelectedLastIndex(TInt aRow) const; |
williamr@2 | 60 |
IMPORT_C TBool IsAnyRowSelected() const; |
williamr@2 | 61 |
IMPORT_C TBool IsColSelected(TInt aCol) const; |
williamr@2 | 62 |
IMPORT_C TBool IsColSelected(TInt aCol,TInt aIndex) const; |
williamr@2 | 63 |
IMPORT_C TBool IsColSelectedLastIndex(TInt aCol) const; |
williamr@2 | 64 |
IMPORT_C TBool IsAnyColSelected() const; |
williamr@2 | 65 |
IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange) const; |
williamr@2 | 66 |
IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange,TInt aIndex) const; |
williamr@2 | 67 |
IMPORT_C TBool IsRangeSelectedLastIndex(const TRangeRef &aRange) const; |
williamr@2 | 68 |
IMPORT_C TRangeRef operator[](TInt aIndex) const; |
williamr@2 | 69 |
IMPORT_C const CArrayFix<TRangeRef>* RangeList() const; |
williamr@2 | 70 |
private: |
williamr@2 | 71 |
CGridCellRegion(const TRangeRef& aBounds); |
williamr@2 | 72 |
void ConstructL(); |
williamr@2 | 73 |
private: |
williamr@2 | 74 |
TRangeRef iBounds; |
williamr@2 | 75 |
CArrayFix<TRangeRef>* iRangeList; |
williamr@2 | 76 |
}; |
williamr@2 | 77 |
#endif |