epoc32/include/frmprint.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/frmprint.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/frmprint.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,75 @@
     1.4 -frmprint.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __FRMPRINT_H__
    1.21 +#define __FRMPRINT_H__
    1.22 +
    1.23 +#include <e32std.h>
    1.24 +#include <frmtlay.h>
    1.25 +
    1.26 +/**
    1.27 +@publishedAll
    1.28 +@released
    1.29 +*/ 
    1.30 +class CTextPageRegionPrinter : public CBase	, public MPageRegionPrinter
    1.31 +
    1.32 +	{
    1.33 +public:
    1.34 +	IMPORT_C static CTextPageRegionPrinter* NewL(MLayDoc* aLayDoc,CPrinterDevice* aPrinterDevice);
    1.35 +	IMPORT_C ~CTextPageRegionPrinter();
    1.36 +	IMPORT_C void SetPageList(const CArrayFix<TInt>* aPageList);
    1.37 +	IMPORT_C void SetPrinterDevice(CPrinterDevice* aPrinterDevice);
    1.38 +	IMPORT_C void SetDocument(MLayDoc *aDoc); // Used for replacing document
    1.39 +	IMPORT_C void SetPrintPreview(TBool aPrintPreview);
    1.40 +	IMPORT_C void SetPageSpecInTwips(const TPageSpec& aPageSpec);  // Physical size of page.
    1.41 +	IMPORT_C void SetPageMarginsInTwips(const TMargins& aPageMargins); // Default are all zero.
    1.42 +	IMPORT_C void SetTextMarginWidthsInTwips(TInt aLabelMarginWidth,TInt aGutterMarginWidth); // label margin &c (if any)
    1.43 +	IMPORT_C void SetFirstPageOfDoc(TInt aFirstPage);	// possible offset depending on document - Default is 1
    1.44 +	IMPORT_C void PrintBandL(CGraphicsDevice* aLayoutDevice,TInt aPageNo
    1.45 +															,const TBandAttributes& aBandInPixels);
    1.46 +	//deprecated 7.0 
    1.47 +	IMPORT_C void SetParagraphFillTextOnly(TBool aFillTextOnly);
    1.48 +private:
    1.49 +	CTextPageRegionPrinter();
    1.50 +	void ConstructL(MLayDoc* aLayDoc,CPrinterDevice* aPrinterDevice);
    1.51 +	void PrintBand2L(CGraphicsDevice* aLayoutDevice,TInt aPageNo,const TBandAttributes& aBandInPixels);
    1.52 +	void SetFormatAndImageDevices();
    1.53 +	void SetPageL(TInt aNextPage);
    1.54 +	TRect ViewRectInTwips() const;
    1.55 +	TInt LayoutWidthInTwips() const;
    1.56 +	TInt LabelMarginWidthInPixels() const;
    1.57 +	TInt TextStartXInPixels() const;
    1.58 +	void SetPageTextHeight();
    1.59 +	void LeaveL(TInt aErr);
    1.60 +private:
    1.61 +	CTextLayout* iLayout; // 'HAS' relationship
    1.62 +	CPrinterDevice* iPrinterDevice;
    1.63 +	CGraphicsDevice* iImageDevice;
    1.64 +	CGraphicsContext* iGc;
    1.65 +	CGraphicsContext* iPictureGc;
    1.66 +	TDrawTextLayoutContext iDrawTextLayoutContext;
    1.67 +	const CArrayFix<TInt>* iPageList;	// 'USES' relationship. Destroyed by application
    1.68 +	TSize iPageSizeInTwips; // In Twips
    1.69 +	TMargins iPageMarginsInTwips;	// In twips
    1.70 +	TInt iGutterMarginWidthInTwips;   // Gap between labels and text proper - in twips
    1.71 +	TInt iLabelMarginWidthInTwips;	   // In twips
    1.72 +	TInt iCurrentPage;
    1.73 +	TInt iFirstPage;
    1.74 +	TInt iTopPageDocPos;
    1.75 +	TInt iPageTextHeightInPixels; 
    1.76 +	TBool iPrintPreview;
    1.77 +	};
    1.78 +
    1.79 +#endif