CPrintPreviewDevice Class Reference

class CPrintPreviewDevice : public CGraphicsDevice

Inherits from

Public Member Functions
~CPrintPreviewDevice()
TInt CreateContext(CGraphicsContext *&)
TDisplayMode DisplayMode()
TInt FontHeightInTwips(TInt, TInt)
TInt GetNearestFontInPixels(CFont *&, const TFontSpec &)
TInt GetNearestFontInTwips(CFont *&, const TFontSpec &)
TInt GetNearestFontToDesignHeightInPixels(CFont *&, const TFontSpec &)
TInt GetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)
TInt GetNearestFontToMaxHeightInPixels(CFont *&, const TFontSpec &, TInt)
TInt GetNearestFontToMaxHeightInTwips(CFont *&, const TFontSpec &, TInt)
TInt GetPalette(CPalette *&)
TInt HorizontalPixelsToTwips(TInt)
TInt HorizontalTwipsToPixels(TInt)
CPrintPreviewDevice *NewL(CWsScreenDevice *)
TInt NumTypefaces()
voidPaletteAttributes(TBool &, TInt &)
voidReleaseFont(CFont *)
voidSetBandRect(const TRect &)
voidSetPalette(CPalette *)
voidSetPanelPos(const TPoint &)
voidSetTwipToPixelMapping(const TSize &, const TSize &)
voidSetWindow(RWindow *)
TSize SizeInPixels()
TSize SizeInTwips()
voidTypefaceSupport(TTypefaceSupport &, TInt)
TInt VerticalPixelsToTwips(TInt)
TInt VerticalTwipsToPixels(TInt)
Private Member Functions
CPrintPreviewDevice(CWsScreenDevice *)
voidDoCreateContextL(CGraphicsContext *&)
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()
Private Attributes
TRect iBandRect
TInt iHZoom
TSize iPageSizeInTwips
TPoint iPanelPos
TInt iVZoom
RWindow *iWin
CWsScreenDevice *iWinDevice

Constructor & Destructor Documentation

CPrintPreviewDevice(CWsScreenDevice *)

CPrintPreviewDevice(CWsScreenDevice *aWinDevice)[private]

Parameters

CWsScreenDevice * aWinDevice

~CPrintPreviewDevice()

~CPrintPreviewDevice()

Member Functions Documentation

CreateContext(CGraphicsContext *&)

TInt CreateContext(CGraphicsContext *&aGC)[virtual]

Creates a graphics context for the device.

Parameters

CGraphicsContext *& aGCOn return, contains a pointer to the created graphics context.

DisplayMode()

TDisplayMode DisplayMode()const [virtual]

Gets the display mode of the device.

DoCreateContextL(CGraphicsContext *&)

voidDoCreateContextL(CGraphicsContext *&aGc)[private]

Parameters

CGraphicsContext *& aGc

FontHeightInTwips(TInt, TInt)

TInt FontHeightInTwips(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().

GetNearestFontInPixels(CFont *&, const TFontSpec &)

TInt GetNearestFontInPixels(CFont *&aFont,
const TFontSpec &aFontSpec
)

Parameters

CFont *& aFont
const TFontSpec & aFontSpec

GetNearestFontInTwips(CFont *&, const TFontSpec &)

TInt GetNearestFontInTwips(CFont *&aFont,
const TFontSpec &aFontSpec
)[virtual]

Parameters

CFont *& aFont
const TFontSpec & aFontSpec

GetNearestFontToDesignHeightInPixels(CFont *&, const TFontSpec &)

TInt GetNearestFontToDesignHeightInPixels(CFont *&aFont,
const TFontSpec &aFontSpec
)

Parameters

CFont *& aFont
const TFontSpec & aFontSpec

GetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)

TInt GetNearestFontToDesignHeightInTwips(CFont *&aFont,
const TFontSpec &aFontSpec
)[virtual]

Parameters

CFont *& aFont
const TFontSpec & aFontSpec

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

TInt GetNearestFontToMaxHeightInPixels(CFont *&aFont,
const TFontSpec &aFontSpec,
TIntaMaxHeight
)

Parameters

CFont *& aFont
const TFontSpec & aFontSpec
TInt aMaxHeight

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

TInt GetNearestFontToMaxHeightInTwips(CFont *&aFont,
const TFontSpec &aFontSpec,
TIntaMaxHeight
)[virtual]

Parameters

CFont *& aFont
const TFontSpec & aFontSpec
TInt aMaxHeight

GetPalette(CPalette *&)

TInt GetPalette(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)

TInt HorizontalPixelsToTwips(TIntaPixels)const [virtual]

Parameters

TInt aPixels

HorizontalTwipsToPixels(TInt)

TInt HorizontalTwipsToPixels(TIntaTwips)const [virtual]

Parameters

TInt aTwips

NewL(CWsScreenDevice *)

CPrintPreviewDevice *NewL(CWsScreenDevice *aWinDevice)[static]

Parameters

CWsScreenDevice * aWinDevice

NumTypefaces()

TInt NumTypefaces()const [virtual]

Gets the number of typefaces supported by the graphics device.

PaletteAttributes(TBool &, TInt &)

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.

ReleaseFont(CFont *)

voidReleaseFont(CFont *aFont)[virtual]

Parameters

CFont * aFont

SetBandRect(const TRect &)

voidSetBandRect(const TRect &aRect)[inline]

Parameters

const TRect & aRect

SetPalette(CPalette *)

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.

SetPanelPos(const TPoint &)

voidSetPanelPos(const TPoint &aPoint)[inline]

Parameters

const TPoint & aPoint

SetTwipToPixelMapping(const TSize &, const TSize &)

voidSetTwipToPixelMapping(const TSize &aImageSizeInPixels,
const TSize &aPageSizeInTwips
)

Parameters

const TSize & aImageSizeInPixels
const TSize & aPageSizeInTwips

SetWindow(RWindow *)

voidSetWindow(RWindow *aWin)[inline]

Parameters

RWindow * aWin

SizeInPixels()

TSize SizeInPixels()const [virtual]

Gets the size of the device area in pixels.

SizeInTwips()

TSize SizeInTwips()const [virtual]

Gets the size of the device area in twips.

TypefaceSupport(TTypefaceSupport &, TInt)

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)

TInt VerticalPixelsToTwips(TIntaPixels)const [virtual]

Parameters

TInt aPixels

VerticalTwipsToPixels(TInt)

TInt VerticalTwipsToPixels(TIntaTwips)const [virtual]

Parameters

TInt aTwips

Member Data Documentation

TRect iBandRect

TRect iBandRect[private]

TInt iHZoom

TInt iHZoom[private]

TSize iPageSizeInTwips

TSize iPageSizeInTwips[private]

TPoint iPanelPos

TPoint iPanelPos[private]

TInt iVZoom

TInt iVZoom[private]

RWindow * iWin

RWindow *iWin[private]

CWsScreenDevice * iWinDevice

CWsScreenDevice *iWinDevice[private]