Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: GRDPRINT.H
Link against: grid.lib

Class CGridPrinter

class CGridPrinter : public CBase, public MPageRegionPrinter;

Description

Handles printing and print preview functionality for grid.

Derivation

Members

Defined in CGridPrinter:
GridLay(), NewL(), PaginateL(), PrintBandL(), SetPageSizeInTwipsL(), SetRealPrintingDeviceMap(), SetTopLeftMargin(), ~CGridPrinter()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CGridPrinter *NewL(CGridLay *aGridLay, CGridLabelImg *aPrintLabelImg, CGridCellImg *aPrintCellImg, TZoomFactor *aZoomFactor);

Description

Creates a new grid printer object.

Parameters

CGridLay *aGridLay

A pointer to an object that controls the layout of rows and columns.

CGridLabelImg *aPrintLabelImg

A pointer to an object that draws a grid cell's label.

CGridCellImg *aPrintCellImg

A pointer to an object that draws the contents of a single cell.

TZoomFactor *aZoomFactor

A pointer to the zoom factor object.

Return value

CGridPrinter *

See also:


~CGridPrinter()

virtual IMPORT_C ~CGridPrinter();

Description

Destructor.

Frees resources before destruction of the object.

[Top]


Member functions


SetRealPrintingDeviceMap()

inline void SetRealPrintingDeviceMap(const MGraphicsDeviceMap *aGraphicsDeviceMap);

Description

Supplies the object that deals with the mapping between twips and device-specific units for a specific printer.

Parameters

const MGraphicsDeviceMap *aGraphicsDeviceMap

The interface object for mapping between twips and device-specific units.


SetTopLeftMargin()

IMPORT_C void SetTopLeftMargin(const TPoint &aTlMarginInTwips);

Description

Sets the top left margin.

Parameters

const TPoint &aTlMarginInTwips

The top left margin, in twips.


SetPageSizeInTwipsL()

IMPORT_C void SetPageSizeInTwipsL(const TSize &aSizeInTwips);

Description

Sets the size of the page.

Parameters

const TSize &aSizeInTwips

The size of the page, in twips.


PaginateL()

IMPORT_C void PaginateL();

Description

Paginates the grid.


GridLay()

inline CGridLay &GridLay();

Description

Gets the grid layout used by this printing object.

Note that this is not the same object passed to CGridPrinter::NewL(). Internally, the class creates its own CGridLay object from the information supplied in the CGridLay object passed to CGridPrinter::NewL().

Return value

CGridLay &

The grid layout object.


PrintBandL()

virtual IMPORT_C void PrintBandL(CGraphicsDevice *aDevice, TInt aPageNo, const TBandAttributes &aBandInPixels);

Description

Prints a band.

The function implements MPageRegionPrinter::PrintBandL().

!For Now

Parameters

CGraphicsDevice *aDevice

Pointer to the graphics device representing the printer

TInt aPageNo

The number of the page containing the band to be printed.

const TBandAttributes &aBandInPixels

Attributes of the band to be printed.