CPdrDevice Class Reference

class CPdrDevice : public CPrinterDevice

Inherits from

Public Member Functions
~CPdrDevice()
IMPORT_C TDisplayModeDisplayMode()
IMPORT_C TIntFlags()
IMPORT_C TIntFontHeightInTwips(TInt, TInt)
IMPORT_C TIntGetNearestFontInTwips(CFont *&, const TFontSpec &)
IMPORT_C TIntGetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)
IMPORT_C TIntGetNearestFontToMaxHeightInTwips(CFont *&, const TFontSpec &, TInt)
IMPORT_C TIntGetPalette(CPalette *&)
IMPORT_C TIntHorizontalPixelsToTwips(TInt)
IMPORT_C TIntHorizontalTwipsToPixels(TInt)
IMPORT_C TPrinterModelEntryModel()
IMPORT_C TIntNumTypefaces()
IMPORT_C TPointOffsetInPixels()
IMPORT_C voidPaletteAttributes(TBool &, TInt &)
IMPORT_C TRectPrintablePageInPixels()
IMPORT_C voidReleaseFont(CFont *)
IMPORT_C voidSelectPageSpecInTwips(const TPageSpec &)
IMPORT_C TIntSetModel(const TPrinterModelHeader &, CStreamStore &)
IMPORT_C voidSetPalette(CPalette *)
IMPORT_C TSizeSizeInPixels()
IMPORT_C TSizeSizeInTwips()
IMPORT_C voidTypefaceSupport(TTypefaceSupport &, TInt)
IMPORT_C TIntVerticalPixelsToTwips(TInt)
IMPORT_C TIntVerticalTwipsToPixels(TInt)
Protected Member Functions
CPdrDevice()
IMPORT_C TSizeKPixelSizeInTwips()
Private Member Functions
voidDoSetModelL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CGraphicsDevice::CreateContext(CGraphicsContext *&)
CPrinterDevice::CPrinterDevice()
CPrinterDevice::CreateControlL(CPrinterPort *)
CPrinterDevice::CurrentPageSpecInTwips()const
CPrinterDevice::DeleteControl()
CPrinterDevice::ExternalizePropertiesL(RWriteStream &)const
CPrinterDevice::InternalizePropertiesL(RReadStream &)
CPrinterDevice::RestorePropertiesL()
CPrinterDevice::StorePropertiesL()const
CPrinterDevice::~CPrinterDevice()
Protected Attributes
TPrinterModelHeader iModel
CPdrModelInfo *iModelInfo
CStreamStore *iStore
CPdrTypefaceStore *iTypefaceStore
Inherited Attributes
CPrinterDevice::iControl
CPrinterDevice::iCurrentPageSpecInTwips

Constructor & Destructor Documentation

CPdrDevice()

IMPORT_CCPdrDevice()[protected]

~CPdrDevice()

IMPORT_C~CPdrDevice()[virtual]

Member Functions Documentation

DisplayMode()

IMPORT_C TDisplayModeDisplayMode()const [virtual]

Gets the display mode of the device.

DoSetModelL()

voidDoSetModelL()[private]

Flags()

IMPORT_C TIntFlags()const

FontHeightInTwips(TInt, TInt)

IMPORT_C TIntFontHeightInTwips(TIntaTypefaceIndex,
TIntaHeightIndex
)const [virtual]

Get the height of a font in twips.

The font is identified by typeface and height.

The value returned is rounded up or down to the nearest font height in twips.

Parameters

TInt aTypefaceIndexAn index identifying the typeface, in the range: 0 to (NumTypefaces() - 1).
TInt aHeightIndexAn index identifying the font height, in the range: 0 to (iNumHeights - 1). Note that iNumHeights is in the TTypefaceSupport object returned by TypefaceSupport().

GetNearestFontInTwips(CFont *&, const TFontSpec &)

IMPORT_C TIntGetNearestFontInTwips(CFont *&aFont,
const TFontSpec &aFontSpec
)

Parameters

CFont *& aFont
const TFontSpec & aFontSpec

GetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)

IMPORT_C TIntGetNearestFontToDesignHeightInTwips(CFont *&aFont,
const TFontSpec &aFontSpec
)

Parameters

CFont *& aFont
const TFontSpec & aFontSpec

GetNearestFontToMaxHeightInTwips(CFont *&, const TFontSpec &, TInt)

IMPORT_C TIntGetNearestFontToMaxHeightInTwips(CFont *&aFont,
const TFontSpec &aFontSpec,
TIntaMaxHeight
)

Parameters

CFont *& aFont
const TFontSpec & aFontSpec
TInt aMaxHeight

GetPalette(CPalette *&)

IMPORT_C TIntGetPalette(CPalette *&aPalette)const [virtual]

Gets the device's current palette.

This function is only supported if the device has a modifiable palette, which can be determined by calling PaletteAttributes().

Parameters

CPalette *& aPaletteOn return, holds the device's current palette.

HorizontalPixelsToTwips(TInt)

IMPORT_C TIntHorizontalPixelsToTwips(TIntaPixels)const

Parameters

TInt aPixels

HorizontalTwipsToPixels(TInt)

IMPORT_C TIntHorizontalTwipsToPixels(TIntaTwips)const

Parameters

TInt aTwips

KPixelSizeInTwips()

IMPORT_C TSizeKPixelSizeInTwips()const [protected, virtual]

Model()

IMPORT_C TPrinterModelEntryModel()const [virtual]

Gets the printer model entry.

NumTypefaces()

IMPORT_C TIntNumTypefaces()const [virtual]

Gets the number of typefaces supported by the graphics device.

OffsetInPixels()

IMPORT_C TPointOffsetInPixels()

PaletteAttributes(TBool &, TInt &)

IMPORT_C voidPaletteAttributes(TBool &aModifiable,
TInt &aNumEntries
)const [virtual]

Gets the palette attributes of the device.

Parameters

TBool & aModifiableOn return, holds information on whether or not the device's palette is modifiable (ETrue) or fixed (EFalse).
TInt & aNumEntriesOn return, holds the number of entries in the device's palette.

PrintablePageInPixels()

IMPORT_C TRectPrintablePageInPixels()const [virtual]

ReleaseFont(CFont *)

IMPORT_C voidReleaseFont(CFont *aFont)

Parameters

CFont * aFont

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 &)

IMPORT_C TIntSetModel(const TPrinterModelHeader &aModel,
CStreamStore &aStore
)[virtual]

Sets the printer model header and the store.

Parameters

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

SetPalette(CPalette *)

IMPORT_C voidSetPalette(CPalette *aPalette)[virtual]

Sets the device's palette.

Setting the palette is only possible if the device has a modifiable palette, which can be determined by calling PaletteAttributes().

Parameters

CPalette * aPaletteThe new palette for the device.

SizeInPixels()

IMPORT_C TSizeSizeInPixels()const [virtual]

Gets the size of the device area in pixels.

SizeInTwips()

IMPORT_C TSizeSizeInTwips()const [virtual]

Gets the size of the device area in twips.

TypefaceSupport(TTypefaceSupport &, TInt)

IMPORT_C voidTypefaceSupport(TTypefaceSupport &aTypefaceSupport,
TIntaTypefaceIndex
)const [virtual]

Gets typeface information for a specified typeface.

This information is returned in aTypefaceSupport, and includes:

the typeface name and typeface attributes

the number of font heights

the maximum and minimum font heights

whether it is a scalable typeface

NumTypefaces()

Parameters

TTypefaceSupport & aTypefaceSupportOn return, contains the typeface information.
TInt aTypefaceIndexA typeface index number, in the range: zero to (NumTypefaces() - 1).

VerticalPixelsToTwips(TInt)

IMPORT_C TIntVerticalPixelsToTwips(TIntaPixels)const

Parameters

TInt aPixels

VerticalTwipsToPixels(TInt)

IMPORT_C TIntVerticalTwipsToPixels(TIntaTwips)const

Parameters

TInt aTwips

Member Data Documentation

TPrinterModelHeader iModel

TPrinterModelHeader iModel[protected]

CPdrModelInfo * iModelInfo

CPdrModelInfo *iModelInfo[protected]

CStreamStore * iStore

CStreamStore *iStore[protected]

CPdrTypefaceStore * iTypefaceStore

CPdrTypefaceStore *iTypefaceStore[protected]