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.
Public Member Functions | |
---|---|
~CPrinterDevice () | |
void | CreateControlL ( CPrinterPort *) |
TPageSpec | CurrentPageSpecInTwips () |
IMPORT_C void | DeleteControl () |
void | ExternalizePropertiesL ( RWriteStream &) |
void | InternalizePropertiesL ( RReadStream &) |
TPrinterModelEntry | Model () |
IMPORT_C TRect | PrintablePageInPixels () |
IMPORT_C void | RestorePropertiesL () |
IMPORT_C void | SelectPageSpecInTwips (const TPageSpec &) |
TInt | SetModel (const TPrinterModelHeader &, CStreamStore &) |
IMPORT_C void | StorePropertiesL () |
Protected Member Functions | |
---|---|
CPrinterDevice () |
Public Attributes | |
---|---|
CPrinterControl * | iControl |
Protected Attributes | |
---|---|
TPageSpec | iCurrentPageSpecInTwips |
IMPORT_C | ~CPrinterDevice | ( | ) |
Destructor. It frees all resources owned by the object, prior to its destruction.
void | CreateControlL | ( | 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().
CPrinterPort * aPrinterPort | Pointer to an instance of a printer port. |
TPageSpec | CurrentPageSpecInTwips | ( | ) | const [inline] |
Gets the current page specification in twips.
IMPORT_C void | DeleteControl | ( | ) | [virtual] |
Deletes the printer control owned by this object.
The function sets the iControl member to NULL.
void | ExternalizePropertiesL | ( | RWriteStream & | ) | const [inline, virtual] |
Externalizes printer properties to the store.
The default implementation is empty.
RWriteStream & |
void | InternalizePropertiesL | ( | RReadStream & | ) | [inline, virtual] |
Externalizes printer properties to the store.
The default implementation is empty.
RReadStream & |
IMPORT_C TRect | PrintablePageInPixels | ( | ) | const [virtual] |
Gets the dimensions of the area to which the printer device can print.
These dimensions are normally less than those returned by TPageSpec::OrientedPageSize() because a margin exists between the boundary of the printable page and the absolute extent of the page.
IMPORT_C void | SelectPageSpecInTwips | ( | const TPageSpec & | aPageSpec | ) | [virtual] |
Sets the page specification in twips.
const TPageSpec & aPageSpec | The page specification in twips. |
TInt | SetModel | ( | const TPrinterModelHeader & | aModel, |
CStreamStore & | aStore | |||
) | [pure virtual] |
Sets the printer model header and the store.
const TPrinterModelHeader & aModel | The printer model header. |
CStreamStore & aStore | The store. |
CPrinterControl * | iControl |
The printer control.
This may be NULL. If implemented, it provides control over the print operation.
TPageSpec | iCurrentPageSpecInTwips | [protected] |
Current page specification in twips.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.