CPrinterDevice Class Reference

class CPrinterDevice : public CGraphicsDevice

Printer graphics device interface.

This abstract class represents a physical graphics device that is used for printing.

This class is used to:

set and get the page specification

map between the co-ordinates of the printed page (in twips) and the co-ordinates of the image device (in pixels)

get and set the printer model entry

create and delete a printer control.

A printer driver is defined in terms of a printer device and a printer control. A printer device can own either a single or no printer control. The control determines the progress and termination of the print job and is responsible for producing output.

CPrinterControl

Inherits from

Constructor & Destructor Documentation

CPrinterDevice()

IMPORT_CCPrinterDevice()[protected]

~CPrinterDevice()

IMPORT_C~CPrinterDevice()

Member Functions Documentation

CreateControlL(CPrinterPort *)

voidCreateControlL(CPrinterPort *aPrinterPort)[pure virtual]

Creates a printer control.

The printer control is an instance of a CPrinterControl derived class; it is assigned to this printer device's iControl member.

Note that this function is called by CPrintSetup::StartPrintL().

Parameters

CPrinterPort * aPrinterPortPointer to an instance of a printer port.

CurrentPageSpecInTwips()

TPageSpec CurrentPageSpecInTwips()const [inline]

Gets the current page specification in twips.

The current page specification, in twips.

DeleteControl()

IMPORT_C voidDeleteControl()[virtual]

ExternalizePropertiesL(RWriteStream &)

voidExternalizePropertiesL(RWriteStream &)const [inline, virtual]

Externalizes printer properties to the store.

The default implementation is empty.

Parameters

RWriteStream &

InternalizePropertiesL(RReadStream &)

voidInternalizePropertiesL(RReadStream &)[inline, virtual]

Externalizes printer properties to the store.

The default implementation is empty.

Parameters

RReadStream &

Model()

TPrinterModelEntry Model()const [pure virtual]

Gets the printer model entry.

The printer model entry.

PrintablePageInPixels()

IMPORT_C TRectPrintablePageInPixels()const [virtual]

RestorePropertiesL()

IMPORT_C voidRestorePropertiesL()

SelectPageSpecInTwips(const TPageSpec &)

IMPORT_C voidSelectPageSpecInTwips(const TPageSpec &aPageSpec)[virtual]

Sets the page specification in twips.

Parameters

const TPageSpec & aPageSpecThe page specification in twips.

SetModel(const TPrinterModelHeader &, CStreamStore &)

TInt SetModel(const TPrinterModelHeader &aModel,
CStreamStore &aStore
)[pure virtual]

Sets the printer model header and the store.

KErrNone if successful; otherwise, another of the system-wide error codes.

Parameters

const TPrinterModelHeader & aModelThe printer model header.
CStreamStore & aStoreThe store.

StorePropertiesL()

IMPORT_C voidStorePropertiesL()const

Member Data Documentation

CPrinterControl * iControl

CPrinterControl *iControl

The printer control.

This may be NULL. If implemented, it provides control over the print operation.

TPageSpec iCurrentPageSpecInTwips

TPageSpec iCurrentPageSpecInTwips[protected]

Current page specification in twips.