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 ()
void PaletteAttributes ( TBool &, TInt &)
void ReleaseFont ( CFont *)
void SetBandRect (const TRect &)
void SetPalette ( CPalette *)
void SetPanelPos (const TPoint &)
void SetTwipToPixelMapping (const TSize &, const TSize &)
void SetWindow ( RWindow *)
TSize SizeInPixels ()
TSize SizeInTwips ()
void TypefaceSupport ( TTypefaceSupport &, TInt )
TInt VerticalPixelsToTwips ( TInt )
TInt VerticalTwipsToPixels ( TInt )
Private Member Functions
CPrintPreviewDevice ( CWsScreenDevice *)
void DoCreateContextL ( 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 *& aGC On return, contains a pointer to the created graphics context.

DisplayMode()

TDisplayMode DisplayMode ( ) const [virtual]

Gets the display mode of the device.

DoCreateContextL(CGraphicsContext *&)

void DoCreateContextL ( CGraphicsContext *& aGc ) [private]

Parameters

CGraphicsContext *& aGc

FontHeightInTwips(TInt, TInt)

TInt FontHeightInTwips ( TInt aTypefaceIndex,
TInt aHeightIndex
) 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 aTypefaceIndex An index identifying the typeface, in the range: 0 to (NumTypefaces() - 1).
TInt aHeightIndex An 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,
TInt aMaxHeight
)

Parameters

CFont *& aFont
const TFontSpec & aFontSpec
TInt aMaxHeight

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

TInt GetNearestFontToMaxHeightInTwips ( CFont *& aFont,
const TFontSpec & aFontSpec,
TInt aMaxHeight
) [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 *& aPalette On return, holds the device's current palette.

HorizontalPixelsToTwips(TInt)

TInt HorizontalPixelsToTwips ( TInt aPixels ) const [virtual]

Parameters

TInt aPixels

HorizontalTwipsToPixels(TInt)

TInt HorizontalTwipsToPixels ( TInt aTwips ) 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 &)

void PaletteAttributes ( TBool & aModifiable,
TInt & aNumEntries
) const [virtual]

Gets the palette attributes of the device.

Parameters

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

ReleaseFont(CFont *)

void ReleaseFont ( CFont * aFont ) [virtual]

Parameters

CFont * aFont

SetBandRect(const TRect &)

void SetBandRect ( const TRect & aRect ) [inline]

Parameters

const TRect & aRect

SetPalette(CPalette *)

void SetPalette ( 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 * aPalette The new palette for the device.

SetPanelPos(const TPoint &)

void SetPanelPos ( const TPoint & aPoint ) [inline]

Parameters

const TPoint & aPoint

SetTwipToPixelMapping(const TSize &, const TSize &)

void SetTwipToPixelMapping ( const TSize & aImageSizeInPixels,
const TSize & aPageSizeInTwips
)

Parameters

const TSize & aImageSizeInPixels
const TSize & aPageSizeInTwips

SetWindow(RWindow *)

void SetWindow ( 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)

void TypefaceSupport ( TTypefaceSupport & aTypefaceSupport,
TInt aTypefaceIndex
) 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 & aTypefaceSupport On return, contains the typeface information.
TInt aTypefaceIndex A typeface index number, in the range: zero to (NumTypefaces() - 1).

VerticalPixelsToTwips(TInt)

TInt VerticalPixelsToTwips ( TInt aPixels ) const [virtual]

Parameters

TInt aPixels

VerticalTwipsToPixels(TInt)

TInt VerticalTwipsToPixels ( TInt aTwips ) 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]