#include <gdi.h>
Link against: gdi.lib
class CPrinterControl : public CBase |
Protected Attributes | |
---|---|
CPrinterPort * | iPrinterPort |
TState | iState |
Public Member Enumerations | |
---|---|
enum | TMoreOnPage { EMoreOnPage, ENoMoreOnPage } |
Protected Member Enumerations | |
---|---|
enum | TState { ENotPrinting, EPrinting } |
Public Member Functions | |
---|---|
~CPrinterControl() | |
pure virtual void | AbortPrint() |
pure virtual TInt | BandsPerPage() |
pure virtual void | QueueEndPrint(TRequestStatus &) |
pure virtual TMoreOnPage | QueueGetBand(TRequestStatus &, TBandAttributes &) |
Protected Member Functions | |
---|---|
CPrinterControl(CPrinterPort *) |
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.
See also: CPrinterDevice
Flags indicating whether there is more on the page to print.
Enumerator | Value | Description |
---|---|---|
EMoreOnPage |
Indicates there is more to print on the current page. | |
ENoMoreOnPage |
Indicates there is no more to print on the current page. |
IMPORT_C | CPrinterControl | ( | CPrinterPort * | aPrinterPort | ) | [protected] |
IMPORT_C | ~CPrinterControl | ( | ) |
Destructor.
It frees all resources owned by the object, prior to its destruction.
void | AbortPrint | ( | ) | [pure virtual] |
Aborts the print process before it has completed.
This function should be called if QueueGetBand() reports an error.
TInt | BandsPerPage | ( | ) | [pure virtual] |
Gets the number of bands per page.
void | QueueEndPrint | ( | TRequestStatus & | aStatus | ) | [pure virtual] |
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 | |
---|---|
aStatus | Request status object. On successful completion contains KErrNone, otherwise another of the system-wide error codes. |
TMoreOnPage | QueueGetBand | ( | TRequestStatus & | aStatus, |
TBandAttributes & | aBand | |||
) | [pure virtual] |
Prints the next band on the page.
This is an asynchronous function.
Parameters | |
---|---|
aStatus | Request status object. On successful completion contains KErrNone, otherwise another of the system-wide error codes. |
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 |