MAknPictographDrawer Class Reference

API published in: S60 2nd Ed FP 2

Link against: aknpictograph.lib

Capability Information

Required Capabilities

None


#include <aknpictographdrawerinterface.h>

Detailed Description

Pictograph drawer interface.

Public Member Functions

virtual  ~MAknPictographDrawer ()
  Destructor.
virtual HBufC *  SupportedPictographCodesL () const =0
  Returns a heap descriptor filled with all supported pictograph codes.
virtual TBool  IsPictograph (TText aCode) const =0
  Tells whether the character is in the pictograph code range.
virtual TBool  ContainsPictographs (const TDesC &aText) const =0
  Tells whether the text contains any pictographs.
virtual void  DrawPictograph (CBitmapContext &aGc, const TPoint &aTopLeft, TText aCode, TAknPictographHeight aHeight) const =0
  Draws pictograph bitmap in the given position.
virtual void  DrawPictograph (CBitmapContext &aGc, const TRect &aRect, TText aCode, TAknPictographHeight aHeight) const =0
  Draws pictograph bitmap centered in the given rect.
virtual void  DrawPictograph (CBitmapContext &aGc, const TRect &aRect, const TRect &aClipRect, TText aCode, TAknPictographHeight aHeight) const =0
  Draws pictograph bitmap centered in the given rect, clipped with clipping rect.
virtual void  DrawText (CBitmapContext &aGc, const CFont &aFont, const TDesC &aText, const TPoint &aPosition) const =0
  Draws text using CGraphicsContext::DrawText and then draws pictographs on top of that.
virtual void  DrawText (CBitmapContext &aGc, const CFont &aFont, const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, CGraphicsContext::TTextAlign aAlignment=CGraphicsContext::ELeft, TInt aLeftMargin=0) const =0
  Draws text using CGraphicsContext::DrawText and then draws pictographs on top of that.
virtual void  DrawPictographsInText (CBitmapContext &aGc, const CFont &aFont, const TDesC &aText, const TPoint &aPosition) const =0
  Draws pictographs that are encountered in the text.
virtual void  DrawPictographsInText (CBitmapContext &aGc, const CFont &aFont, const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, CGraphicsContext::TTextAlign aAlignment=CGraphicsContext::ELeft, TInt aLeftMargin=0) const =0
  Draws pictographs that are encountered in the text.
virtual TBool  IsAnimated (TText aCode, TAknPictographHeight aHeight) const =0
  Tells whether the given pictograph is animated or not.
virtual TInt  SelectPictographHeightForFont (const CFont &aFont, TAknPictographHeight &aHeight) const =0
  Tries to find a matching pictograph height for a given font.
virtual TAknPictographDrawingMode  SetPictographDrawingMode (TAknPictographDrawingMode aDrawingMode)=0
  Sets the pictograph drawing mode for DrawPictograph calls.

Constructor & Destructor Documentation

virtual MAknPictographDrawer::~MAknPictographDrawer  )  [inline, virtual]
 

Destructor.


Member Function Documentation

virtual TBool MAknPictographDrawer::ContainsPictographs const TDesC &  aText  )  const [pure virtual]
 

Tells whether the text contains any pictographs.

Parameters:
aText  Text.
Returns:
ETrue if the text contains any pictographs, EFalse if not.
virtual void MAknPictographDrawer::DrawPictograph CBitmapContext &  aGc,
const TRect &  aRect,
const TRect &  aClipRect,
TText  aCode,
TAknPictographHeight  aHeight
const [pure virtual]
 

Draws pictograph bitmap centered in the given rect, clipped with clipping rect.

This method sets aGc to use CGraphicsContext::ENullBrush.

Parameters:
aGc  Graphics context.
aRect  Rectangle, where the pictograph is centered in.
aClipRect  Clipping rectangle.
aCode  Pictograph code in Unicode.
aHeight  Pictograph height.
virtual void MAknPictographDrawer::DrawPictograph CBitmapContext &  aGc,
const TRect &  aRect,
TText  aCode,
TAknPictographHeight  aHeight
const [pure virtual]
 

Draws pictograph bitmap centered in the given rect.

This method sets aGc to use CGraphicsContext::ENullBrush.

Parameters:
aGc  Graphics context.
aRect  Rectangle, where the pictograph is centered in.
aCode  Pictograph code in Unicode.
aHeight  Pictograph height.
virtual void MAknPictographDrawer::DrawPictograph CBitmapContext &  aGc,
const TPoint &  aTopLeft,
TText  aCode,
TAknPictographHeight  aHeight
const [pure virtual]
 

Draws pictograph bitmap in the given position.

This method sets aGc to use CGraphicsContext::ENullBrush.

Parameters:
aGc  Graphics context.
aTopLeft  Top left coordinates of the rendering position .
aCode  Pictograph code in Unicode.
aHeight  Pictograph height.
virtual void MAknPictographDrawer::DrawPictographsInText CBitmapContext &  aGc,
const CFont &  aFont,
const TDesC &  aText,
const TRect &  aBox,
TInt  aBaselineOffset,
CGraphicsContext::TTextAlign  aAlignment = CGraphicsContext::ELeft,
TInt  aLeftMargin = 0
const [pure virtual]
 

Draws pictographs that are encountered in the text.

This method sets aGc to use CGraphicsContext::ENullBrush.

Parameters:
aGc  Graphics context.
aFont  Used font.
aText  Text.
aBox  Rectangle, where the text is rendered.
aBaselineOffset  Offset from the top of the rectangle to the baseline to the text.
aAlignment  Text alignment.
aLeftMargin  The left margin for left-aligned text, or the right margin for right-aligned text
virtual void MAknPictographDrawer::DrawPictographsInText CBitmapContext &  aGc,
const CFont &  aFont,
const TDesC &  aText,
const TPoint &  aPosition
const [pure virtual]
 

Draws pictographs that are encountered in the text.

Suitable pictograph height is chosen based on aFont. This method sets aGc to use CGraphicsContext::ENullBrush.

Parameters:
aGc  Graphics context.
aFont  Used font.
aText  Text.
aPosition  Text baseline coordinates of the starting position.
virtual void MAknPictographDrawer::DrawText CBitmapContext &  aGc,
const CFont &  aFont,
const TDesC &  aText,
const TRect &  aBox,
TInt  aBaselineOffset,
CGraphicsContext::TTextAlign  aAlignment = CGraphicsContext::ELeft,
TInt  aLeftMargin = 0
const [pure virtual]
 

Draws text using CGraphicsContext::DrawText and then draws pictographs on top of that.

Suitable pictograph height is chosen based on aFont.

The graphics context aGc must be set to use font aFont before calling this method.

This method sets aGc to use CGraphicsContext::ENullBrush.

Parameters:
aGc  Graphics context.
aFont  Used font.
aText  Text.
aBox  Rectangle, where the text is rendered.
aBaselineOffset  Offset from the top of the rectangle to the baseline to the text.
aAlignment  Text alignment.
aLeftMargin  The left margin for left-aligned text, or the right margin for right-aligned text
virtual void MAknPictographDrawer::DrawText CBitmapContext &  aGc,
const CFont &  aFont,
const TDesC &  aText,
const TPoint &  aPosition
const [pure virtual]
 

Draws text using CGraphicsContext::DrawText and then draws pictographs on top of that.

Suitable pictograph height is chosen based on aFont.

The graphics context aGc must be set to use font aFont before calling this method.

This method sets aGc to use CGraphicsContext::ENullBrush.

Parameters:
aGc  Graphics context.
aFont  Used font.
aText  Text.
aPosition  Text baseline coordinates of the starting position.
virtual TBool MAknPictographDrawer::IsAnimated TText  aCode,
TAknPictographHeight  aHeight
const [pure virtual]
 

Tells whether the given pictograph is animated or not.

Parameters:
aCode  Pictograph code in Unicode.
virtual TBool MAknPictographDrawer::IsPictograph TText  aCode  )  const [pure virtual]
 

Tells whether the character is in the pictograph code range.

Parameters:
aCode  Character code in Unicode.
Returns:
ETrue if in pictograph code range, EFalse if not.
virtual TInt MAknPictographDrawer::SelectPictographHeightForFont const CFont &  aFont,
TAknPictographHeight aHeight
const [pure virtual]
 

Tries to find a matching pictograph height for a given font.

Parameters:
aFont  Used font.
aHeight  Pictograph height.
Returns:
KErrNone if a supported pictograph height is found that matches aFont otherwise returns KErrNotSupported
virtual TAknPictographDrawingMode MAknPictographDrawer::SetPictographDrawingMode TAknPictographDrawingMode  aDrawingMode  )  [pure virtual]
 

Sets the pictograph drawing mode for DrawPictograph calls.

Other functions e.g. DrawText, etc are unaffected by this function. The drawing mode is set to EDrawingModeNormal by default. Note: When drawing mode EDrawingModeWhite is set only a single DrawPictograph call is supported per component->Draw() call.

Parameters:
aDrawingMode  the new pictograph drawing mode to be used.
Returns:
the value of the previous pictograph drawing mode.
virtual HBufC* MAknPictographDrawer::SupportedPictographCodesL  )  const [pure virtual]
 

Returns a heap descriptor filled with all supported pictograph codes.

They are sorted in ascending pictograph code order. Ownership of the returned object is transferred to the caller.

Returns:
Heap descriptor filled with all supported pictograph codes.

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

Copyright © Nokia Corporation 2001-2008
Back to top