aknpictographdrawerinterface.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : AknPictographDrawerInterface.h
00004 *  Part of     : AknPictograph
00005 *  Interface   : Pictograph API
00006 *  Description : Pictograph drawer interface.
00007 *
00008 *  Version     : 1
00009 *
00010 *  Copyright (c) 2002 Nokia Corporation.
00011 *  This material, including documentation and any related 
00012 *  computer programs, is protected by copyright controlled by 
00013 *  Nokia Corporation. All rights are reserved. Copying, 
00014 *  including reproducing, storing, adapting or translating, any 
00015 *  or all of this material requires the prior written consent of 
00016 *  Nokia Corporation. This material also contains confidential 
00017 *  information which may not be disclosed to others without the 
00018 *  prior written consent of Nokia Corporation.
00019 * ==============================================================================
00020 */
00021 
00022 #ifndef AKN_PICTOGRAPH_DRAWER_INTERFACE_H
00023 #define AKN_PICTOGRAPH_DRAWER_INTERFACE_H
00024 
00025 // INCLUDES
00026 #include <e32std.h>
00027 #include <gdi.h>
00028 
00029 // CONSTANTS
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 // FORWARD DECLARATIONS
00047 
00048 class CBitmapContext;
00049 class CFont;
00050 
00051 // CLASS DECLARATION
00052 
00053 class MAknPictographAnimatorCallBack
00054     {
00055     public:
00067         virtual void DrawPictographArea() = 0;
00068     };
00069 
00076 NONSHARABLE_CLASS(MAknPictographDrawer) 
00077         {
00078     public:  // Constructors and destructor
00079 
00083         inline virtual ~MAknPictographDrawer() {};
00084 
00085     public: // New functions
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 // AKN_PICTOGRAPH_DRAWER_INTERFACE_H
00303 #endif
00304             
00305 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top