CGDIDeviceContext Class Reference

class CGDIDeviceContext : public CBase

CGDIDeviceContext

BrowserEngine.dll
Since
2.1

Inherits from

Public Member Functions
~CGDIDeviceContext ()
NW_GDI_Color_t BackgroundColor ()
void ChangeFontSize ( CGDIFont *)
NW_GDI_Rectangle_t ClipRect ()
CGDIFont * CreateFont (const NW_Text_t *, TGDIFontStyle , TUint8 , TUint16 , TGDIFontVariant )
const NW_GDI_Rectangle_t * DisplayBounds ()
TUint8 DisplayDepth ()
void DrawImage (const NW_GDI_Point2D_t *, const NW_GDI_Rectangle_t *, NW_GDI_ImageBlock_t *)
void DrawLine ( NW_GDI_Point2D_t , NW_GDI_Point2D_t )
void DrawPixel (const NW_GDI_Point2D_t *)
TBrowserStatusCode DrawPolyline ( NW_GDI_Metric_t , const NW_GDI_Point2D_t *, TBool )
void DrawRectangle (const NW_GDI_Rectangle_t *)
TBrowserStatusCode DrawText (const NW_GDI_Point2D_t *, const NW_Text_t *, CGDIFont *, NW_GDI_Metric_t , NW_GDI_TextDecoration_t , NW_GDI_FlowDirection_t , NW_GDI_Metric_t )
NW_GDI_Pattern_t FillPattern ()
void FillRectangle (const NW_GDI_Rectangle_t *)
CFont * FindFont ( TFontSpec )
NW_GDI_Color_t ForegroundColor ()
TBrowserStatusCode GetColorPalette ( NW_GDI_ColorPalette_t *)
TBrowserStatusCode GetFlowDirection ( NW_Text_t *, NW_GDI_FlowDirection_t *)
void GetHighlightColor ( NW_GDI_Color_t *)
void * GetScaledCFont ( CGDIFont *)
TBrowserStatusCode GetSubstringExtent (const NW_Text_t *, CGDIFont *, NW_Text_Length_t , NW_Text_Length_t , NW_GDI_Metric_t , NW_GDI_FlowDirection_t , NW_GDI_Dimension2D_t *)
TBrowserStatusCode GetTextExtent (const NW_Text_t *, CGDIFont *, NW_GDI_Metric_t , NW_GDI_FlowDirection_t , NW_GDI_Dimension2D_t *)
NW_GDI_Pattern_t LinePattern ()
NW_GDI_Metric_t LineWidth ()
CGDIDeviceContext * NewL (void *, CView *)
const NW_GDI_Point2D_t * Origin ()
NW_GDI_PaintMode_t PaintMode ()
void PostDraw ( TBool )
void PreDraw ()
TBool RemoveNbsp ()
TBrowserStatusCode ScaleImage (const NW_GDI_Dimension3D_t *, const NW_GDI_ImageBlock_t *, NW_GDI_ImageBlock_t *)
void SetBackgroundColor ( NW_GDI_Color_t )
void SetClipRect (const NW_GDI_Rectangle_t *)
void SetDisplayBounds (const NW_GDI_Rectangle_t *)
void SetFillPattern ( NW_GDI_Pattern_t )
TBool SetFontSizeLevel ()
void SetFontSizeLevel ( TGDIDeviceContextFontSizeLevel )
void SetForegroundColor ( NW_GDI_Color_t )
void SetGraphicsContext (void *)
void SetLinePattern ( NW_GDI_Pattern_t )
void SetLineWidth ( NW_GDI_Metric_t )
void SetOrigin (const NW_GDI_Point2D_t *)
void SetPaintMode ( NW_GDI_PaintMode_t )
void SetRemoveNbsp ( TBool )
void SetTextDirection ( NW_GDI_TextDirection_t )
TBrowserStatusCode SplitText ( NW_Text_t *, CGDIFont *, NW_GDI_Metric_t , NW_GDI_Metric_t , NW_GDI_FlowDirection_t , NW_Text_Length_t *, TUint8 )
TGDISupportedLanguage SupportedLanguage ()
void SwitchAgainstBG ( NW_GDI_Color_t *)
NW_GDI_TextDirection_t TextDirection ()
EVariantFlag VariantFlag ()
CWsScreenDevice * WsScreenDevice ()
Private Member Functions
CGDIDeviceContext ()
TBool CanSplit ( TText16 , TText16 )
TBrowserStatusCode ConstructL (void *, CView *)
CBitmapContext * Epoc32GraphicsContext ()
void InitializeGraphicsContext ()
TBool IsThaiCell ( TText16 , TText16 )
TBrowserStatusCode ScaleBitmap ( CFbsBitmap *, CFbsBitmap **, TRect *)
TBrowserStatusCode SplitAtNewline ( NW_Text_t *, CGDIFont *, NW_GDI_Metric_t , NW_GDI_Metric_t , NW_GDI_FlowDirection_t , NW_Text_Length_t *)
NW_GDI_Color_t SwapColorBytes ( NW_GDI_Color_t )
TBrowserStatusCode Truncate ( NW_Text_t *, CGDIFont *, NW_GDI_Metric_t , NW_GDI_Metric_t , NW_GDI_FlowDirection_t , NW_Text_Length_t *)
TBrowserStatusCode WordWrap ( NW_Text_t *, CGDIFont *, NW_GDI_Metric_t , NW_GDI_Metric_t , NW_GDI_FlowDirection_t , NW_Text_Length_t *)
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
NW_GDI_Color_t iBackgroundColor
NW_GDI_Rectangle_t iClipRect
NW_GDI_Rectangle_t iDisplayBounds
NW_GDI_Pattern_t iFillPattern
CFontCache * iFontCache
TGDIDeviceContextFontSizeLevel iFontSizeLevel
NW_GDI_Color_t iForegroundColor
void * iGraphicsContext
NW_GDI_Pattern_t iLinePattern
NW_GDI_Metric_t iLineWidth
CView * iOocEpoc32View
NW_GDI_Point2D_t iOrigin
NW_GDI_PaintMode_t iPaintMode
TBool iRemoveNbsp
NW_Int32 iResourceFileOffset
TGDISupportedLanguage iSupportedLanguage
NW_GDI_TextDirection_t iTextDirection
EVariantFlag iVariantFlag
CWsScreenDevice * iWsScreenDev

Constructor & Destructor Documentation

CGDIDeviceContext()

CGDIDeviceContext ( ) [private]

C++ default constructor.

~CGDIDeviceContext()

~CGDIDeviceContext ( ) [virtual]

Destructor.

Member Functions Documentation

BackgroundColor()

NW_GDI_Color_t BackgroundColor ( ) const
This method
Since
2.1

CanSplit(TText16, TText16)

TBool CanSplit ( TText16 aChar1,
TText16 aChar2
) [private]
Checks whether or not a line split (word wrap) can occur between the two characters specified.
Since
2.6

Parameters

TText16 aChar1 First character.
TText16 aChar2 Second character.

ChangeFontSize(CGDIFont *)

void ChangeFontSize ( CGDIFont * aFont )
This method
Since
2.1

Parameters

CGDIFont * aFont

ClipRect()

NW_GDI_Rectangle_t ClipRect ( ) const
This method
Since
2.1

ConstructL(void *, CView *)

TBrowserStatusCode ConstructL ( void * aGraphicsContext,
CView * aOocEpoc32View
) [private]

By default Symbian 2nd phase constructor is private.

Parameters

void * aGraphicsContext
CView * aOocEpoc32View

CreateFont(const NW_Text_t *, TGDIFontStyle, TUint8, TUint16, TGDIFontVariant)

CGDIFont * CreateFont ( const NW_Text_t * aFamily,
TGDIFontStyle aStyle,
TUint8 aSizeInPixels,
TUint16 aWeight,
TGDIFontVariant aVariant
) const
This method
Since
2.1

Parameters

const NW_Text_t * aFamily
TGDIFontStyle aStyle
TUint8 aSizeInPixels
TUint16 aWeight
TGDIFontVariant aVariant

DisplayBounds()

const NW_GDI_Rectangle_t * DisplayBounds ( ) const
This method
Since
2.1

DisplayDepth()

TUint8 DisplayDepth ( ) const
This method
Since
2.1

DrawImage(const NW_GDI_Point2D_t *, const NW_GDI_Rectangle_t *, NW_GDI_ImageBlock_t *)

void DrawImage ( const NW_GDI_Point2D_t * aLocation,
const NW_GDI_Rectangle_t * aRectangle,
NW_GDI_ImageBlock_t * aImageBlock
)
This method
Since
2.1

Parameters

const NW_GDI_Point2D_t * aLocation
const NW_GDI_Rectangle_t * aRectangle
NW_GDI_ImageBlock_t * aImageBlock

DrawLine(NW_GDI_Point2D_t, NW_GDI_Point2D_t)

void DrawLine ( NW_GDI_Point2D_t aStartPoint,
NW_GDI_Point2D_t aEndPoint
)
This method
Since
2.1

Parameters

NW_GDI_Point2D_t aStartPoint
NW_GDI_Point2D_t aEndPoint

DrawPixel(const NW_GDI_Point2D_t *)

void DrawPixel ( const NW_GDI_Point2D_t * aLocation )
This method
Since
2.1

Parameters

const NW_GDI_Point2D_t * aLocation

DrawPolyline(NW_GDI_Metric_t, const NW_GDI_Point2D_t *, TBool)

TBrowserStatusCode DrawPolyline ( NW_GDI_Metric_t aNumPoints,
const NW_GDI_Point2D_t * aPoints,
TBool aClosed
)
This method
Since
2.1

Parameters

NW_GDI_Metric_t aNumPoints
const NW_GDI_Point2D_t * aPoints
TBool aClosed

DrawRectangle(const NW_GDI_Rectangle_t *)

void DrawRectangle ( const NW_GDI_Rectangle_t * aRectangle )
This method
Since
2.1

Parameters

const NW_GDI_Rectangle_t * aRectangle

DrawText(const NW_GDI_Point2D_t *, const NW_Text_t *, CGDIFont *, NW_GDI_Metric_t, NW_GDI_TextDecoration_t, NW_GDI_FlowDirection_t, NW_GDI_Metric_t)

TBrowserStatusCode DrawText ( const NW_GDI_Point2D_t * aLocation,
const NW_Text_t * aText,
CGDIFont * aGDIFont,
NW_GDI_Metric_t aSpacing,
NW_GDI_TextDecoration_t aDecoration,
NW_GDI_FlowDirection_t aDir,
NW_GDI_Metric_t aWidth
)
This method
Since
2.1

Epoc32GraphicsContext()

CBitmapContext * Epoc32GraphicsContext ( ) [private]
This method
Since
2.1

FillPattern()

NW_GDI_Pattern_t FillPattern ( ) const
This method
Since
2.1

FillRectangle(const NW_GDI_Rectangle_t *)

void FillRectangle ( const NW_GDI_Rectangle_t * aRectangle )
This method
Since
2.1

Parameters

const NW_GDI_Rectangle_t * aRectangle

FindFont(TFontSpec)

CFont * FindFont ( TFontSpec aFontSpec )
This method
Since
2.1

Parameters

TFontSpec aFontSpec

ForegroundColor()

NW_GDI_Color_t ForegroundColor ( ) const
This method
Since
2.1

GetColorPalette(NW_GDI_ColorPalette_t *)

TBrowserStatusCode GetColorPalette ( NW_GDI_ColorPalette_t * aColPalette )
This method
Since
2.1

Parameters

NW_GDI_ColorPalette_t * aColPalette

GetFlowDirection(NW_Text_t *, NW_GDI_FlowDirection_t *)

TBrowserStatusCode GetFlowDirection ( NW_Text_t * aText,
NW_GDI_FlowDirection_t * aFlowDirection
) const
This method
Since
2.1

Parameters

NW_Text_t * aText
NW_GDI_FlowDirection_t * aFlowDirection

GetHighlightColor(NW_GDI_Color_t *)

void GetHighlightColor ( NW_GDI_Color_t * aColor )
This method
Since
2.1

Parameters

NW_GDI_Color_t * aColor

GetScaledCFont(CGDIFont *)

void * GetScaledCFont ( CGDIFont * aFont ) const
This method
Since
2.1

Parameters

CGDIFont * aFont

GetSubstringExtent(const NW_Text_t *, CGDIFont *, NW_Text_Length_t, NW_Text_Length_t, NW_GDI_Metric_t, NW_GDI_FlowDirection_t, NW_GDI_Dimension2D_t *)

TBrowserStatusCode GetSubstringExtent ( const NW_Text_t * aText,
CGDIFont * aGDIFont,
NW_Text_Length_t aStart,
NW_Text_Length_t aLength,
NW_GDI_Metric_t aSpacing,
NW_GDI_FlowDirection_t aFlowDirection,
NW_GDI_Dimension2D_t * aExtent
)
This method
Since
2.1

GetTextExtent(const NW_Text_t *, CGDIFont *, NW_GDI_Metric_t, NW_GDI_FlowDirection_t, NW_GDI_Dimension2D_t *)

TBrowserStatusCode GetTextExtent ( const NW_Text_t * aText,
CGDIFont * aGDIFont,
NW_GDI_Metric_t aSpacing,
NW_GDI_FlowDirection_t aFlowDirection,
NW_GDI_Dimension2D_t * aExtent
) const
This method
Since
2.1

Parameters

const NW_Text_t * aText
CGDIFont * aGDIFont
NW_GDI_Metric_t aSpacing
NW_GDI_FlowDirection_t aFlowDirection
NW_GDI_Dimension2D_t * aExtent

InitializeGraphicsContext()

void InitializeGraphicsContext ( ) [private]
This method
Since
2.1

IsThaiCell(TText16, TText16)

TBool IsThaiCell ( TText16 aChar1,
TText16 aChar2
) [private]
Checks whether or not the two consecutive characters are within a single Thai script "cell".
Since
2.6

Parameters

TText16 aChar1 First character.
TText16 aChar2 Second character.

LinePattern()

NW_GDI_Pattern_t LinePattern ( ) const
This method
Since
2.1

LineWidth()

NW_GDI_Metric_t LineWidth ( ) const
This method
Since
2.1

NewL(void *, CView *)

CGDIDeviceContext * NewL ( void * aGraphicsContext,
CView * aOocEpoc32View
) [static]

Two-phased constructor.

Parameters

void * aGraphicsContext
CView * aOocEpoc32View

Origin()

const NW_GDI_Point2D_t * Origin ( ) const
This method
Since
2.1

PaintMode()

NW_GDI_PaintMode_t PaintMode ( ) const
This method
Since
2.1

PostDraw(TBool)

void PostDraw ( TBool aDrawNow )
This method
Since
2.1

Parameters

TBool aDrawNow

PreDraw()

void PreDraw ( )
This method
Since
2.1

RemoveNbsp()

TBool RemoveNbsp ( )
This method
Since
2.1

ScaleBitmap(CFbsBitmap *, CFbsBitmap **, TRect *)

TBrowserStatusCode ScaleBitmap ( CFbsBitmap * aBitmap,
CFbsBitmap ** aScaledBitmap,
TRect * aRect
) [private]
This method
Since
2.1

Parameters

CFbsBitmap * aBitmap
CFbsBitmap ** aScaledBitmap
TRect * aRect

ScaleImage(const NW_GDI_Dimension3D_t *, const NW_GDI_ImageBlock_t *, NW_GDI_ImageBlock_t *)

TBrowserStatusCode ScaleImage ( const NW_GDI_Dimension3D_t * aSize,
const NW_GDI_ImageBlock_t * aImageBlock,
NW_GDI_ImageBlock_t * aScaledImageBlock
)
This method
Since
2.1

Parameters

const NW_GDI_Dimension3D_t * aSize
const NW_GDI_ImageBlock_t * aImageBlock
NW_GDI_ImageBlock_t * aScaledImageBlock

SetBackgroundColor(NW_GDI_Color_t)

void SetBackgroundColor ( NW_GDI_Color_t aColor )
This method
Since
2.1

Parameters

NW_GDI_Color_t aColor

SetClipRect(const NW_GDI_Rectangle_t *)

void SetClipRect ( const NW_GDI_Rectangle_t * aClipRect )
This method
Since
2.1

Parameters

const NW_GDI_Rectangle_t * aClipRect

SetDisplayBounds(const NW_GDI_Rectangle_t *)

void SetDisplayBounds ( const NW_GDI_Rectangle_t * aDisplaybounds )
This method
Since
2.1

Parameters

const NW_GDI_Rectangle_t * aDisplaybounds

SetFillPattern(NW_GDI_Pattern_t)

void SetFillPattern ( NW_GDI_Pattern_t aFillPattern )
This method
Since
2.1

Parameters

NW_GDI_Pattern_t aFillPattern

SetFontSizeLevel()

TBool SetFontSizeLevel ( )
This method
Since
2.1

SetFontSizeLevel(TGDIDeviceContextFontSizeLevel)

void SetFontSizeLevel ( TGDIDeviceContextFontSizeLevel aFontSizeLevel )
This method
Since
2.1

Parameters

TGDIDeviceContextFontSizeLevel aFontSizeLevel

SetForegroundColor(NW_GDI_Color_t)

void SetForegroundColor ( NW_GDI_Color_t aColor )
This method
Since
2.1

Parameters

NW_GDI_Color_t aColor

SetGraphicsContext(void *)

void SetGraphicsContext ( void * aGraphicsContext )
This method
Since
2.1

Parameters

void * aGraphicsContext

SetLinePattern(NW_GDI_Pattern_t)

void SetLinePattern ( NW_GDI_Pattern_t aLinePattern )
This method
Since
2.1

Parameters

NW_GDI_Pattern_t aLinePattern

SetLineWidth(NW_GDI_Metric_t)

void SetLineWidth ( NW_GDI_Metric_t aLineWidth )
This method
Since
2.1

Parameters

NW_GDI_Metric_t aLineWidth

SetOrigin(const NW_GDI_Point2D_t *)

void SetOrigin ( const NW_GDI_Point2D_t * aOrigin )
This method
Since
2.1

Parameters

const NW_GDI_Point2D_t * aOrigin

SetPaintMode(NW_GDI_PaintMode_t)

void SetPaintMode ( NW_GDI_PaintMode_t aPaintMode )
This method
Since
2.1

Parameters

NW_GDI_PaintMode_t aPaintMode

SetRemoveNbsp(TBool)

void SetRemoveNbsp ( TBool aFlag )
This method
Since
2.1

Parameters

TBool aFlag

SetTextDirection(NW_GDI_TextDirection_t)

void SetTextDirection ( NW_GDI_TextDirection_t aTextDirection )
This method
Since
2.1

Parameters

NW_GDI_TextDirection_t aTextDirection

SplitAtNewline(NW_Text_t *, CGDIFont *, NW_GDI_Metric_t, NW_GDI_Metric_t, NW_GDI_FlowDirection_t, NW_Text_Length_t *)

TBrowserStatusCode SplitAtNewline ( NW_Text_t * aText,
CGDIFont * aGDIFont,
NW_GDI_Metric_t aCconstraint,
NW_GDI_Metric_t aSpacing,
NW_GDI_FlowDirection_t aFlowDirection,
NW_Text_Length_t * aLength
) [private]
This method
Since
2.1

Parameters

NW_Text_t * aText
CGDIFont * aGDIFont
NW_GDI_Metric_t aCconstraint
NW_GDI_Metric_t aSpacing
NW_GDI_FlowDirection_t aFlowDirection
NW_Text_Length_t * aLength

SplitText(NW_Text_t *, CGDIFont *, NW_GDI_Metric_t, NW_GDI_Metric_t, NW_GDI_FlowDirection_t, NW_Text_Length_t *, TUint8)

TBrowserStatusCode SplitText ( NW_Text_t * aText,
CGDIFont * aGDIFont,
NW_GDI_Metric_t aConstraint,
NW_GDI_Metric_t aSpacing,
NW_GDI_FlowDirection_t aFlowDirection,
NW_Text_Length_t * aLength,
TUint8 aMode
)
This method
Since
2.1

Parameters

NW_Text_t * aText
CGDIFont * aGDIFont
NW_GDI_Metric_t aConstraint
NW_GDI_Metric_t aSpacing
NW_GDI_FlowDirection_t aFlowDirection
NW_Text_Length_t * aLength
TUint8 aMode

SupportedLanguage()

TGDISupportedLanguage SupportedLanguage ( )
This method
Since
2.x

SwapColorBytes(NW_GDI_Color_t)

NW_GDI_Color_t SwapColorBytes ( NW_GDI_Color_t aColor ) [private]
This method
Since
2.1

Parameters

NW_GDI_Color_t aColor

SwitchAgainstBG(NW_GDI_Color_t *)

void SwitchAgainstBG ( NW_GDI_Color_t * aColor )
This method
Since
2.1

Parameters

NW_GDI_Color_t * aColor

TextDirection()

NW_GDI_TextDirection_t TextDirection ( ) const
This method
Since
2.1

Truncate(NW_Text_t *, CGDIFont *, NW_GDI_Metric_t, NW_GDI_Metric_t, NW_GDI_FlowDirection_t, NW_Text_Length_t *)

TBrowserStatusCode Truncate ( NW_Text_t * aText,
CGDIFont * aGDIFont,
NW_GDI_Metric_t aConstraint,
NW_GDI_Metric_t aSpacing,
NW_GDI_FlowDirection_t aFlowDirection,
NW_Text_Length_t * aLength
) [private]
This method
Since
2.1

Parameters

NW_Text_t * aText
CGDIFont * aGDIFont
NW_GDI_Metric_t aConstraint
NW_GDI_Metric_t aSpacing
NW_GDI_FlowDirection_t aFlowDirection
NW_Text_Length_t * aLength

VariantFlag()

EVariantFlag VariantFlag ( )
This method
Since
2.1

WordWrap(NW_Text_t *, CGDIFont *, NW_GDI_Metric_t, NW_GDI_Metric_t, NW_GDI_FlowDirection_t, NW_Text_Length_t *)

TBrowserStatusCode WordWrap ( NW_Text_t * aText,
CGDIFont * aGDIFont,
NW_GDI_Metric_t aConstraint,
NW_GDI_Metric_t aSpacing,
NW_GDI_FlowDirection_t aFlowDirection,
NW_Text_Length_t * aLength
) [private]
This method
Since
2.1

Parameters

NW_Text_t * aText
CGDIFont * aGDIFont
NW_GDI_Metric_t aConstraint
NW_GDI_Metric_t aSpacing
NW_GDI_FlowDirection_t aFlowDirection
NW_Text_Length_t * aLength

WsScreenDevice()

CWsScreenDevice * WsScreenDevice ( ) [inline]
This method
Since
2.x

Member Data Documentation

NW_GDI_Color_t iBackgroundColor

NW_GDI_Color_t iBackgroundColor [private]

NW_GDI_Rectangle_t iClipRect

NW_GDI_Rectangle_t iClipRect [private]

NW_GDI_Rectangle_t iDisplayBounds

NW_GDI_Rectangle_t iDisplayBounds [private]

NW_GDI_Pattern_t iFillPattern

NW_GDI_Pattern_t iFillPattern [private]

CFontCache * iFontCache

CFontCache * iFontCache [private]

TGDIDeviceContextFontSizeLevel iFontSizeLevel

TGDIDeviceContextFontSizeLevel iFontSizeLevel [private]

NW_GDI_Color_t iForegroundColor

NW_GDI_Color_t iForegroundColor [private]

void * iGraphicsContext

void * iGraphicsContext [private]

NW_GDI_Pattern_t iLinePattern

NW_GDI_Pattern_t iLinePattern [private]

NW_GDI_Metric_t iLineWidth

NW_GDI_Metric_t iLineWidth [private]

CView * iOocEpoc32View

CView * iOocEpoc32View [private]

NW_GDI_Point2D_t iOrigin

NW_GDI_Point2D_t iOrigin [private]

NW_GDI_PaintMode_t iPaintMode

NW_GDI_PaintMode_t iPaintMode [private]

TBool iRemoveNbsp

TBool iRemoveNbsp [private]

NW_Int32 iResourceFileOffset

NW_Int32 iResourceFileOffset [private]

TGDISupportedLanguage iSupportedLanguage

TGDISupportedLanguage iSupportedLanguage [private]

NW_GDI_TextDirection_t iTextDirection

NW_GDI_TextDirection_t iTextDirection [private]

EVariantFlag iVariantFlag

EVariantFlag iVariantFlag [private]

CWsScreenDevice * iWsScreenDev

CWsScreenDevice * iWsScreenDev [private]