Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: GDI.H
Link against: gdi.lib

Class CPrinterControl

class CPrinterControl : public CBase;

Description

Printer control interface.

This abstract base class acts as the interface between a CPrinterDevice object and the printer. It creates the context for, and controls the progress and termination of the print job.

Only those who need to add new printer drivers should write derived classes. After instantiation of such a class, using CPrinterDevice::CreateControlL(), the object can be accessed via the iControl member of CPrinterDevice.

Derivation

Members

Defined in CPrinterControl:
AbortPrint(), BandsPerPage(), CPrinterControl(), EMoreOnPage, ENoMoreOnPage, ENotPrinting, EPrinting, QueueEndPrint(), QueueGetBand(), TMoreOnPage, TState, iPrinterPort, iState, ~CPrinterControl()

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

See also

See also:


Construction and destruction


~CPrinterControl()

IMPORT_C ~CPrinterControl();

Description

Destructor.

It frees all resources owned by the object, prior to its destruction.


CPrinterControl()

protected: IMPORT_C CPrinterControl(CPrinterPort *aPrinterPort);

Description

Parameters

CPrinterPort *aPrinterPort

[Top]


Member functions


BandsPerPage()

virtual TInt BandsPerPage()=0;

Description

Gets the number of bands per page.

Return value

TInt

The number of bands on each page.


QueueGetBand()

virtual TMoreOnPage QueueGetBand(TRequestStatus &aStatus, TBandAttributes &aBand)=0;

Description

Prints the next band on the page.

This is an asynchronous function.

Parameters

TRequestStatus &aStatus

Request status object. On successful completion contains KErrNone, otherwise another of the system-wide error codes.

TBandAttributes &aBand

On return, indicates the attributes of the band, including its height and width and whether or not the device will ignore one or other of graphics or text output. This information may be used by applications to draw more efficiently, or may be ignored

Return value

TMoreOnPage

EMoreOnPage, if any unprinted bands remain on the current page. ENoMoreOnPage, if the current band is last on page.


QueueEndPrint()

virtual void QueueEndPrint(TRequestStatus &aStatus)=0;

Description

Terminates the print process.

This is an asynchronous function and is called when no more bands in the document remain to be printed.Note that all bands have been printed when no more pages or copies remain to be printed, and QueueGetBand() returns ENoMoreToPrint.

Parameters

TRequestStatus &aStatus

Request status object. On successful completion contains KErrNone, otherwise another of the system-wide error codes.


AbortPrint()

virtual void AbortPrint()=0;

Description

Aborts the print process before it has completed.

This function should be called if QueueGetBand() reports an error.

[Top]


Member enumerations


Enum TMoreOnPage

TMoreOnPage

Description

Flags indicating whether there is more on the page to print.

EMoreOnPage

Indicates there is more to print on the current page.

ENoMoreOnPage

Indicates there is no more to print on the current page.


Enum TState

protected: TState

Description

State flags.

ENotPrinting

Not printing.

EPrinting

Printing.

[Top]


Member data


iState

protected: TState iState;

Description

Printing state.


iPrinterPort

protected: CPrinterPort * iPrinterPort;

Description

Printer port.