williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #if !defined(__GRDPRINT_H__) williamr@2: #define __GRDPRINT_H__ williamr@2: williamr@2: #if !defined(__E32STD_H__) williamr@2: #include williamr@2: #endif williamr@2: #if !defined(__E32BASE_H__) williamr@2: #include williamr@2: #endif williamr@2: #if !defined(__GRDSTD_H__) williamr@2: #include williamr@2: #endif williamr@2: williamr@2: williamr@2: williamr@2: class CGridPrinter : public CBase, public MPageRegionPrinter williamr@2: /** Handles printing and print preview functionality for grid. williamr@2: @publishedAll williamr@2: @released */ williamr@2: { williamr@2: public: williamr@2: IMPORT_C static CGridPrinter* NewL(CGridLay* aGridLay,CGridLabelImg* aPrintLabelImg, williamr@2: CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor); williamr@2: IMPORT_C virtual ~CGridPrinter(); williamr@2: inline void SetRealPrintingDeviceMap(const MGraphicsDeviceMap* aGraphicsDeviceMap); williamr@2: IMPORT_C void SetTopLeftMargin(const TPoint& aTlMarginInTwips); williamr@2: IMPORT_C void SetPageSizeInTwipsL(const TSize& aSizeInTwips); williamr@2: IMPORT_C void PaginateL(); williamr@2: inline CGridLay& GridLay(); williamr@2: public: // from MPageRegionPrinter williamr@2: IMPORT_C virtual void PrintBandL(CGraphicsDevice* aDevice,TInt aPageNo,const TBandAttributes& aBandInPixels); williamr@2: private: williamr@2: CGridPrinter(CGridLabelImg* aPrintLabelImg,CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor); williamr@2: void ConstructL(CGridLay* aGridLay); williamr@2: void SetGdMapAndPushLabelImgLC(); williamr@2: private: williamr@2: CGridLay* iGridLay; williamr@2: CGridImg* iGridImg; williamr@2: CGridLabelImg* iPrintLabelImg; williamr@2: CGridCellImg* iPrintCellImg; williamr@2: TZoomFactor* iZoomFactor; williamr@2: const MGraphicsDeviceMap* iGraphicsDeviceMap; williamr@2: TPoint iTlMarginInTwips; williamr@2: TRect iPrintablePage; williamr@2: TInt iScaleFactor; williamr@2: }; williamr@2: williamr@2: #include williamr@2: #endif