Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:

Inherited from CBase:


Construction and destruction


NewL(CGridLay *,CGridLabelImg *,CGridCellImg *,TZoomFactor *)

IMPORT_C static 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()

IMPORT_C virtual ~CGridPrinter();

Description

Destructor.

Frees resources before destruction of the object.

[Top]


Member functions


SetRealPrintingDeviceMap(const MGraphicsDeviceMap *)

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(const TPoint &)

IMPORT_C void SetTopLeftMargin(const TPoint &aTlMarginInTwips);

Description

Sets the top left margin.

Parameters

const TPoint &aTlMarginInTwips

The top left margin, in twips.


SetPageSizeInTwipsL(const TSize &)

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(CGridLay *,CGridLabelImg *,CGridCellImg *,TZoomFactor *). Internally, the class creates its own CGridLay object from the information supplied in the CGridLay object passed to CGridPrinter::NewL(CGridLay *,CGridLabelImg *,CGridCellImg *,TZoomFactor *).

Return value

CGridLay &

The grid layout object.


PrintBandL(CGraphicsDevice *,TInt,const TBandAttributes &)

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

Description

Prints a band.

The function implements MPageRegionPrinter::PrintBandL(CGraphicsDevice *,TInt,const TBandAttributes &).

!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.