epoc32/include/grdprint.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 grdprint.h
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if !defined(__GRDPRINT_H__)
       
    17 #define __GRDPRINT_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(__GRDSTD_H__)
       
    26 #include <grdstd.h>
       
    27 #endif
       
    28 
       
    29 
       
    30 
       
    31 class CGridPrinter : public CBase, public MPageRegionPrinter
       
    32 /** Handles printing and print preview functionality for grid.
       
    33 @publishedAll 
       
    34 @released */
       
    35 	{
       
    36 public:
       
    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);
       
    47 private:
       
    48 	CGridPrinter(CGridLabelImg* aPrintLabelImg,CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor);
       
    49 	void ConstructL(CGridLay* aGridLay);
       
    50 	void SetGdMapAndPushLabelImgLC();
       
    51 private:
       
    52 	CGridLay* iGridLay;
       
    53 	CGridImg* iGridImg;
       
    54 	CGridLabelImg* iPrintLabelImg;
       
    55 	CGridCellImg* iPrintCellImg;
       
    56 	TZoomFactor* iZoomFactor;
       
    57 	const MGraphicsDeviceMap* iGraphicsDeviceMap;
       
    58 	TPoint iTlMarginInTwips;
       
    59 	TRect iPrintablePage;
       
    60 	TInt iScaleFactor;
       
    61 	};
       
    62 
       
    63 #include <grdprint.inl>
       
    64 #endif