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(__GRDPRINT_H__)
17 #define __GRDPRINT_H__
19 #if !defined(__E32STD_H__)
22 #if !defined(__E32BASE_H__)
25 #if !defined(__GRDSTD_H__)
31 class CGridPrinter : public CBase, public MPageRegionPrinter
32 /** Handles printing and print preview functionality for grid.
37 IMPORT_C static CGridPrinter* NewL(CGridLay* aGridLay,CGridLabelImg* aPrintLabelImg,
38 CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor);
39 IMPORT_C virtual ~CGridPrinter();
40 inline void SetRealPrintingDeviceMap(const MGraphicsDeviceMap* aGraphicsDeviceMap);
41 IMPORT_C void SetTopLeftMargin(const TPoint& aTlMarginInTwips);
42 IMPORT_C void SetPageSizeInTwipsL(const TSize& aSizeInTwips);
43 IMPORT_C void PaginateL();
44 inline CGridLay& GridLay();
45 public: // from MPageRegionPrinter
46 IMPORT_C virtual void PrintBandL(CGraphicsDevice* aDevice,TInt aPageNo,const TBandAttributes& aBandInPixels);
48 CGridPrinter(CGridLabelImg* aPrintLabelImg,CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor);
49 void ConstructL(CGridLay* aGridLay);
50 void SetGdMapAndPushLabelImgLC();
54 CGridLabelImg* iPrintLabelImg;
55 CGridCellImg* iPrintCellImg;
56 TZoomFactor* iZoomFactor;
57 const MGraphicsDeviceMap* iGraphicsDeviceMap;
58 TPoint iTlMarginInTwips;
63 #include <grdprint.inl>