00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AKN_PICTOGRAPH_DRAWER_INTERFACE_H
00023 #define AKN_PICTOGRAPH_DRAWER_INTERFACE_H
00024
00025
00026 #include <e32std.h>
00027 #include <gdi.h>
00028
00029
00030
00031 enum TAknPictographHeight
00032 {
00033 EHeight12 = 0,
00034 EHeight16 = 1,
00035 EHeight18 = 2,
00036 EHeight24 = 3,
00037 EHeight30 = 4
00038 };
00039
00040 enum TAknPictographDrawingMode
00041 {
00042 EDrawingModeNormal = 0,
00043 EDrawingModeWhite = 1
00044 };
00045
00046
00047
00048 class CBitmapContext;
00049 class CFont;
00050
00051
00052
00053 class MAknPictographAnimatorCallBack
00054 {
00055 public:
00067 virtual void DrawPictographArea() = 0;
00068 };
00069
00076 NONSHARABLE_CLASS(MAknPictographDrawer)
00077 {
00078 public:
00079
00083 inline virtual ~MAknPictographDrawer() {};
00084
00085 public:
00086
00097 virtual HBufC* SupportedPictographCodesL() const = 0;
00098
00106 virtual TBool IsPictograph( TText aCode ) const = 0;
00107
00115 virtual TBool ContainsPictographs( const TDesC& aText ) const = 0;
00116
00127 virtual void DrawPictograph(
00128 CBitmapContext& aGc,
00129 const TPoint& aTopLeft,
00130 TText aCode,
00131 TAknPictographHeight aHeight ) const = 0;
00132
00143 virtual void DrawPictograph(
00144 CBitmapContext& aGc,
00145 const TRect& aRect,
00146 TText aCode,
00147 TAknPictographHeight aHeight ) const = 0;
00148
00161 virtual void DrawPictograph(
00162 CBitmapContext& aGc,
00163 const TRect& aRect,
00164 const TRect& aClipRect,
00165 TText aCode,
00166 TAknPictographHeight aHeight ) const = 0;
00167
00185 virtual void DrawText(
00186 CBitmapContext& aGc,
00187 const CFont& aFont,
00188 const TDesC& aText,
00189 const TPoint& aPosition ) const = 0;
00190
00213 virtual void DrawText(
00214 CBitmapContext& aGc,
00215 const CFont& aFont,
00216 const TDesC& aText,
00217 const TRect& aBox,
00218 TInt aBaselineOffset,
00219 CGraphicsContext::TTextAlign aAlignment =
00220 CGraphicsContext::ELeft,
00221 TInt aLeftMargin = 0 ) const = 0;
00222
00234 virtual void DrawPictographsInText(
00235 CBitmapContext& aGc,
00236 const CFont& aFont,
00237 const TDesC& aText,
00238 const TPoint& aPosition ) const = 0;
00239
00255 virtual void DrawPictographsInText(
00256 CBitmapContext& aGc,
00257 const CFont& aFont,
00258 const TDesC& aText,
00259 const TRect& aBox,
00260 TInt aBaselineOffset,
00261 CGraphicsContext::TTextAlign aAlignment =
00262 CGraphicsContext::ELeft,
00263 TInt aLeftMargin = 0 ) const = 0;
00264
00271 virtual TBool IsAnimated( TText aCode, TAknPictographHeight aHeight ) const = 0;
00272
00282 virtual TInt SelectPictographHeightForFont(
00283 const CFont& aFont,
00284 TAknPictographHeight& aHeight
00285 ) const = 0;
00286
00298 virtual TAknPictographDrawingMode SetPictographDrawingMode(
00299 TAknPictographDrawingMode aDrawingMode) = 0;
00300 };
00301
00302
00303 #endif
00304
00305