Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
CPrinterDevice Class Referenceabstract

Printer graphics device interface. More...

#include <gdi.h>

Inheritance diagram for CPrinterDevice:
CGraphicsDevice CBase MGraphicsDeviceMap

Public Member Functions

IMPORT_C ~CPrinterDevice ()
 Destructor.
 
TPageSpec CurrentPageSpecInTwips () const
 Gets the current page specification in twips.
 
virtual IMPORT_C void SelectPageSpecInTwips (const TPageSpec &aPageSpec)
 Sets the page specification in twips.
 
virtual IMPORT_C TRect PrintablePageInPixels () const
 Gets the dimensions of the area to which the printer device can print.
 
virtual TPrinterModelEntry Model () const =0
 Gets the printer model entry.
 
virtual TInt SetModel (const TPrinterModelHeader &aModel, CStreamStore &aStore)=0
 Sets the printer model header and the store.
 
virtual void CreateControlL (CPrinterPort *aPrinterPort)=0
 Creates a printer control.
 
virtual IMPORT_C void DeleteControl ()
 Deletes the printer control owned by this object.
 
virtual void InternalizePropertiesL (RReadStream &)
 Externalizes printer properties to the store.
 
virtual void ExternalizePropertiesL (RWriteStream &) const
 Externalizes printer properties to the store.
 
IMPORT_C void RestorePropertiesL ()
 Restores printer properties.
 
IMPORT_C void StorePropertiesL () const
 Stores the printer properties.
 
- Public Member Functions inherited from CGraphicsDevice
virtual TDisplayMode DisplayMode () const =0
 Gets the display mode of the device.
 
virtual TSize SizeInPixels () const =0
 Gets the size of the device area in pixels.
 
virtual TSize SizeInTwips () const =0
 Gets the size of the device area in twips.
 
virtual TInt CreateContext (CGraphicsContext *&aGC)=0
 Creates a graphics context for the device.
 
virtual TInt NumTypefaces () const =0
 Gets the number of typefaces supported by the graphics device.
 
virtual void TypefaceSupport (TTypefaceSupport &aTypefaceSupport, TInt aTypefaceIndex) const =0
 Gets typeface information for a specified typeface.
 
virtual TInt FontHeightInTwips (TInt aTypefaceIndex, TInt aHeightIndex) const =0
 Get the height of a font in twips.
 
virtual void PaletteAttributes (TBool &aModifiable, TInt &aNumEntries) const =0
 Gets the palette attributes of the device.
 
virtual void SetPalette (CPalette *aPalette)=0
 Sets the device's palette.
 
virtual TInt GetPalette (CPalette *&aPalette) const =0
 Gets the device's current palette.
 
- Public Member Functions inherited from CBase
 CBase ()
 Default constructor.
 
virtual IMPORT_C ~CBase ()
 Virtual destructor.
 
TAny * operator new (TUint aSize, TAny *aBase) __NO_THROW
 Initialises the object to binary zeroes.
 
TAny * operator new (TUint aSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TUint aExtraSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave, TUint aExtraSize)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
- Public Member Functions inherited from MGraphicsDeviceMap
IMPORT_C MGraphicsDeviceMap ()
 Default constructor.
 
virtual IMPORT_C ~MGraphicsDeviceMap ()
 Destructor.
 
IMPORT_C TPoint TwipsToPixels (const TPoint &aTwipPoint) const
 Converts a point in twips to a point in pixels.
 
IMPORT_C TRect TwipsToPixels (const TRect &aTwipRect) const
 Converts a rectangle in twips to a rectangle in pixels.
 
IMPORT_C TPoint PixelsToTwips (const TPoint &aPixelPoint) const
 Converts a point in pixels to a point in twips.
 
IMPORT_C TRect PixelsToTwips (const TRect &aPixelRect) const
 Converts a rectangle in pixels to a rectangle in twips.
 
virtual TInt HorizontalTwipsToPixels (TInt aTwips) const =0
 Converts a horizontal dimension from twips to pixels.
 
virtual TInt VerticalTwipsToPixels (TInt aTwips) const =0
 Converts a vertical dimension from twips to pixels.
 
virtual TInt HorizontalPixelsToTwips (TInt aPixels) const =0
 Converts a horizontal dimension from pixels to twips.
 
virtual TInt VerticalPixelsToTwips (TInt aPixels) const =0
 Converts a vertical dimension from pixels to twips.
 
virtual TInt GetNearestFontInTwips (CFont *&aFont, const TFontSpec &aFontSpec)=0
 
virtual TInt GetNearestFontToDesignHeightInTwips (CFont *&, const TFontSpec &)
 
virtual TInt GetNearestFontToMaxHeightInTwips (CFont *&, const TFontSpec &, TInt)
 
virtual void ReleaseFont (CFont *aFont)=0
 Releases the specified font.
 

Public Attributes

CPrinterControl * iControl
 The printer control.
 

Protected Member Functions

IMPORT_C CPrinterDevice ()
 Standard constructor.
 
- Protected Member Functions inherited from CBase
virtual IMPORT_C TInt Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1)
 Extension function.
 

Protected Attributes

TPageSpec iCurrentPageSpecInTwips
 Current page specification in twips.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBase
static IMPORT_C void Delete (CBase *aPtr)
 Deletes the specified object.
 

Detailed Description

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.

See also
CPrinterControl
API status
Published to all clients. Released API.

Definition at line 4002 of file gdi.h.

Constructor & Destructor Documentation

◆ ~CPrinterDevice()

IMPORT_C CPrinterDevice::~CPrinterDevice ( )

Destructor.

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

(generated from Symbian Developer Library)

◆ CPrinterDevice()

IMPORT_C CPrinterDevice::CPrinterDevice ( )
protected

Standard constructor.

(generated from Symbian Developer Library)

Member Function Documentation

◆ CreateControlL()

virtual void CPrinterDevice::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().

Parameters
aPrinterPortPointer to an instance of a printer port.

◆ CurrentPageSpecInTwips()

TPageSpec CPrinterDevice::CurrentPageSpecInTwips ( ) const
inline

Gets the current page specification in twips.

Returns
The current page specification, in twips.

Definition at line 4010 of file gdi.h.

◆ DeleteControl()

IMPORT_C void CPrinterDevice::DeleteControl ( )
virtual

Deletes the printer control owned by this object.

The function sets the iControl member to NULL.

(generated from Symbian Developer Library)

◆ ExternalizePropertiesL()

virtual void CPrinterDevice::ExternalizePropertiesL ( RWriteStream &  ) const
inlinevirtual

Externalizes printer properties to the store.

The default implementation is empty.

Parameters
aStreamThe write stream.

Definition at line 4054 of file gdi.h.

◆ InternalizePropertiesL()

virtual void CPrinterDevice::InternalizePropertiesL ( RReadStream &  )
inlinevirtual

Externalizes printer properties to the store.

The default implementation is empty.

Parameters
aStreamThe read stream.

Definition at line 4047 of file gdi.h.

◆ Model()

virtual TPrinterModelEntry CPrinterDevice::Model ( ) const
pure virtual

Gets the printer model entry.

Returns
The printer model entry.

◆ PrintablePageInPixels()

IMPORT_C TRect CPrinterDevice::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.

(generated from Symbian Developer Library)

◆ RestorePropertiesL()

IMPORT_C void CPrinterDevice::RestorePropertiesL ( )

Restores printer properties.

(generated from Symbian Developer Library)

◆ SelectPageSpecInTwips()

virtual IMPORT_C void CPrinterDevice::SelectPageSpecInTwips ( const TPageSpec &  aPageSpec)
virtual

Sets the page specification in twips.

Parameters
aPageSpecThe page specification in twips.

◆ SetModel()

virtual TInt CPrinterDevice::SetModel ( const TPrinterModelHeader &  aModel,
CStreamStore &  aStore 
)
pure virtual

Sets the printer model header and the store.

Parameters
aModelThe printer model header.
aStoreThe store.
Returns
KErrNone if successful; otherwise, another of the system-wide error codes.

◆ StorePropertiesL()

IMPORT_C void CPrinterDevice::StorePropertiesL ( ) const

Stores the printer properties.

(generated from Symbian Developer Library)

Member Data Documentation

◆ iControl

CPrinterControl* CPrinterDevice::iControl

The printer control.

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

Definition at line 4064 of file gdi.h.

◆ iCurrentPageSpecInTwips

TPageSpec CPrinterDevice::iCurrentPageSpecInTwips
protected

Current page specification in twips.

Definition at line 4067 of file gdi.h.


The documentation for this class was generated from the following files: