epoc32/include/frmprint.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 #ifndef __FRMPRINT_H__
    17 #define __FRMPRINT_H__
    18 
    19 #include <e32std.h>
    20 #include <frmtlay.h>
    21 
    22 /**
    23 @publishedAll
    24 @released
    25 */ 
    26 class CTextPageRegionPrinter : public CBase	, public MPageRegionPrinter
    27 
    28 	{
    29 public:
    30 	IMPORT_C static CTextPageRegionPrinter* NewL(MLayDoc* aLayDoc,CPrinterDevice* aPrinterDevice);
    31 	IMPORT_C ~CTextPageRegionPrinter();
    32 	IMPORT_C void SetPageList(const CArrayFix<TInt>* aPageList);
    33 	IMPORT_C void SetPrinterDevice(CPrinterDevice* aPrinterDevice);
    34 	IMPORT_C void SetDocument(MLayDoc *aDoc); // Used for replacing document
    35 	IMPORT_C void SetPrintPreview(TBool aPrintPreview);
    36 	IMPORT_C void SetPageSpecInTwips(const TPageSpec& aPageSpec);  // Physical size of page.
    37 	IMPORT_C void SetPageMarginsInTwips(const TMargins& aPageMargins); // Default are all zero.
    38 	IMPORT_C void SetTextMarginWidthsInTwips(TInt aLabelMarginWidth,TInt aGutterMarginWidth); // label margin &c (if any)
    39 	IMPORT_C void SetFirstPageOfDoc(TInt aFirstPage);	// possible offset depending on document - Default is 1
    40 	IMPORT_C void PrintBandL(CGraphicsDevice* aLayoutDevice,TInt aPageNo
    41 															,const TBandAttributes& aBandInPixels);
    42 	//deprecated 7.0 
    43 	IMPORT_C void SetParagraphFillTextOnly(TBool aFillTextOnly);
    44 private:
    45 	CTextPageRegionPrinter();
    46 	void ConstructL(MLayDoc* aLayDoc,CPrinterDevice* aPrinterDevice);
    47 	void PrintBand2L(CGraphicsDevice* aLayoutDevice,TInt aPageNo,const TBandAttributes& aBandInPixels);
    48 	void SetFormatAndImageDevices();
    49 	void SetPageL(TInt aNextPage);
    50 	TRect ViewRectInTwips() const;
    51 	TInt LayoutWidthInTwips() const;
    52 	TInt LabelMarginWidthInPixels() const;
    53 	TInt TextStartXInPixels() const;
    54 	void SetPageTextHeight();
    55 	void LeaveL(TInt aErr);
    56 private:
    57 	CTextLayout* iLayout; // 'HAS' relationship
    58 	CPrinterDevice* iPrinterDevice;
    59 	CGraphicsDevice* iImageDevice;
    60 	CGraphicsContext* iGc;
    61 	CGraphicsContext* iPictureGc;
    62 	TDrawTextLayoutContext iDrawTextLayoutContext;
    63 	const CArrayFix<TInt>* iPageList;	// 'USES' relationship. Destroyed by application
    64 	TSize iPageSizeInTwips; // In Twips
    65 	TMargins iPageMarginsInTwips;	// In twips
    66 	TInt iGutterMarginWidthInTwips;   // Gap between labels and text proper - in twips
    67 	TInt iLabelMarginWidthInTwips;	   // In twips
    68 	TInt iCurrentPage;
    69 	TInt iFirstPage;
    70 	TInt iTopPageDocPos;
    71 	TInt iPageTextHeightInPixels; 
    72 	TBool iPrintPreview;
    73 	};
    74 
    75 #endif