epoc32/include/mw/aknsdrawutils.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Defines a public static class AknsDrawUtils and related 
    15 *                constants.
    16 *
    17 */
    18 
    19 
    20 #ifndef AKNSDRAWUTILS_H
    21 #define AKNSDRAWUTILS_H
    22 
    23 // INCLUDES
    24 #include <AknsUtils.h>
    25 
    26 // CONSTANTS
    27 
    28 /**
    29 * Default value for drawing parameters.
    30 *
    31 * @since 2.0
    32 */
    33 static const TInt KAknsDrawParamDefault                 = 0x0;
    34 
    35 /**
    36 * Drawing parameter that limits processing of layout levels to the first one.
    37 * This can be used to temporarily disable secondary layout levels.
    38 *
    39 * @since 2.0
    40 */
    41 static const TInt KAknsDrawParamLimitToFirstLevel       = 0x1;
    42 
    43 /**
    44 * Drawing parameter that suspends clearing under images. Only the first
    45 * layout level is affected.
    46 *
    47 * @since 2.0
    48 */
    49 static const TInt KAknsDrawParamNoClearUnderImage       = 0x2;
    50 
    51 /**
    52 * Drawing parameter that causes the layouts and bitmaps to be prepared,
    53 * but no actual drawing takes place.
    54 *
    55 * @since 2.8
    56 */
    57 static const TInt KAknsDrawParamPrepareOnly             = 0x04;
    58 
    59 /**
    60 * Drawing parameter that draws only the RGB channel of data.
    61 *
    62 * @since 3.0
    63 */
    64 static const TInt KAknsDrawParamRGBOnly                 = 0x8;
    65 
    66 /**
    67 * Drawing parameter that draws only the alpha channel of data. If the data
    68 * is unmasked, the result is undefined.
    69 *
    70 * @since 3.0
    71 */
    72 static const TInt KAknsSDMAlphaOnly                     = 0x10;
    73 /**
    74 * Drawing parameter that allows empty SCALABLEITEMS to use
    75 * the parent bitmap directly
    76 *
    77 * @since 3.0
    78 */
    79 static const TInt KAknsDrawParamChained                     = 0x20;
    80 
    81 /**
    82 * Forces drawing the bottom level in chain to use RGBOnly. Bottom level is the
    83 * first drawn level, visually the bottom most level.
    84 *
    85 * @since 3.0
    86 */
    87 static const TInt KAknsDrawParamBottomLevelRGBOnly            = 0x40;
    88 
    89 /**
    90 * Ignores layer mask when drawing layers.
    91 *
    92 * @since 3.2
    93 */
    94 
    95 static const TInt KAknsDrawParamIgnoreLayerMask               = 0x80;
    96 
    97 /**
    98 * Direction, from where notes and queries slide to the screen.
    99 *
   100 * @since 3.1
   101 */
   102 enum TSlidingMode
   103     {
   104     /** Sliding is disabled either by skin or compile time */
   105     ESlidingDisabled = 0,
   106 
   107     /** Slide from the CBA side */
   108     ESlidingFromCBA,
   109 
   110     /** Slide from left */
   111     ESlidingFromLeft,
   112 
   113     /** Slide from topleft */
   114     ESlidingFromTopLeft, 
   115 
   116     /** Slide from top */
   117     ESlidingFromTop,
   118 
   119     /** Slide from topright */
   120     ESlidingFromTopRight, 
   121 
   122     /** Slide from right */
   123     ESlidingFromRight, 
   124 
   125     /** Slide from bottomright */
   126     ESlidingFromBottomRight, 
   127 
   128     /** Slide from bottom */
   129     ESlidingFromBottom, 
   130 
   131     /** Slide from bottomleft */
   132     ESlidingFromBottomLeft,
   133 
   134     /** Slide from random direction (any of the 8 directions) */
   135     ESlidingFromRandom
   136     };
   137 
   138 
   139 // FORWARD DECLARATIONS
   140 class MAknsSkinInstance;
   141 class MAknsControlContext;
   142 class CWindowGc;
   143 class CFbsBitGc;
   144 class CCoeControl;
   145 
   146 // CLASS DECLARATION
   147 
   148 /**
   149 * Static utility class to support Avkon Skins drawing operations.
   150 * AknsDrawUtils provides utility methods to perform skin-aware drawing
   151 * operations, such as background drawing.
   152 *
   153 * This is a public static class with exported functions.
   154 * The class is not intended for derivation outside the library.
   155 *
   156 * @lib AknSkins.lib
   157 *
   158 * @since 2.0
   159 */
   160 class AknsDrawUtils
   161     {
   162     public: // New functions        
   163 
   164         /**
   165         * Returns pointer to the current control context.
   166         * If aMop parameter is specified retrieves the nearest control context
   167         * in control hierarchy. If none is found (or @c NULL parameter was
   168         * given) returns @c NULL.
   169         *
   170         * @since 2.0
   171         *
   172         * @param aMop Object provider to be used to find the control context
   173         *   or @c NULL.
   174         *
   175         * @return Pointer to the nearest control context or @c NULL if none 
   176         *   was found.
   177         */
   178         IMPORT_C static MAknsControlContext* ControlContext( 
   179             const MObjectProvider* aMop );
   180 
   181         /**
   182         * Returns pointer to the control context of the parent of the given
   183         * control. The context possibly supplied by the control itself is ignored.
   184         *
   185         * @since 2.6
   186         *
   187         * @param aControl Pointer to CCoeControl or @c NULL.
   188         *
   189         * @return Pointer to the nearest control context of the parent control
   190         *   or @c NULL if none was found.
   191         */
   192         IMPORT_C static MAknsControlContext* ControlContextOfParent( 
   193             const CCoeControl* aControl );
   194 
   195         /**
   196         * Draws background with assumed origin.
   197         * Draws bacground to the specified rectangle. Origin is assumed
   198         * to be (0,0). This overload can not be used with parent absolute 
   199         * layouts.
   200         *
   201         * See @c DrawBackground for details on chained layouts.
   202         *
   203         * @since 2.0
   204         *
   205         * @param aInstance Pointer to skin instance as obtained from
   206         *   AknsUtils::SkinInstance(). If @c NULL rectangle is cleared
   207         *   without bitmap.
   208         *
   209         * @param aContext Control context to obtain context specific 
   210         *   information about background drawing. If @c NULL and skin
   211         *   instance was given, default parameters are used.
   212         *
   213         * @param aGc Graphics context to be used for drawing.
   214         *
   215         * @param aRect Rectangle to be drawn.
   216         *
   217         * @return ETrue if background was drawn with a bitmap, EFalse
   218         *   otherwise.
   219         */
   220         IMPORT_C static TBool Background( MAknsSkinInstance* aInstance,
   221             MAknsControlContext* aContext, CWindowGc& aGc, const TRect& aRect );
   222 
   223         /**
   224         * Draws background with proper origin.
   225         * Draws bacground to the specified rectangle. The origin is queried
   226         * from the control position list (if given using 
   227         * AknsUtils::RegisterControlPosition). If not found, the origin is
   228         * queried from the given control, which may result in a window server
   229         * flush.
   230         *
   231         * See @c DrawBackground for details on chained layouts.
   232         *
   233         * @since 2.0
   234         *
   235         * @param aInstance Pointer to skin instance as obtained from
   236         *   AknsUtils::SkinInstance(). If @c NULL rectangle is cleared
   237         *   without bitmap.
   238         *
   239         * @param aContext Control context to obtain context specific 
   240         *   information about background drawing. Must be specified, if
   241         *   aInstance is not @c NULL.
   242         *
   243         * @param aControl Control that knows the current window.
   244         *   Must be specified if parent absolute layout can be used,
   245         *   otherwise @c NULL may be given.
   246         *
   247         * @param aGc Graphics context to be used for drawing.
   248         *
   249         * @param aRect Rectangle to be drawn.
   250         *
   251         * @return ETrue if background was drawn with a bitmap, EFalse
   252         *   otherwise. Note that many scalable skins implicitly define
   253         *   background bitmaps for seemingly blank areas.
   254         */
   255         IMPORT_C static TBool Background( MAknsSkinInstance* aInstance,
   256             MAknsControlContext* aContext, const CCoeControl* aControl,
   257             CWindowGc& aGc, const TRect& aRect );
   258 
   259         /**
   260         * Draws background with proper origin and drawing parameters.
   261         * Draws bacground to the specified rectangle. The origin is queried
   262         * from the control position list (if given using 
   263         * AknsUtils::RegisterControlPosition). If not found, the origin is
   264         * queried from the given control, which may result in a window server
   265         * flush. Drawing parameters may be used to control drawing.
   266         *
   267         * See @c DrawBackground for details on chained layouts.
   268         *
   269         * @since 2.0
   270         *
   271         * @param aInstance Pointer to skin instance as obtained from
   272         *   AknsUtils::SkinInstance(). If @c NULL rectangle is cleared
   273         *   without bitmap.
   274         *
   275         * @param aContext Control context to obtain context specific 
   276         *   information about background drawing. Must be specified, if
   277         *   aInstance is not @c NULL.
   278         *
   279         * @param aControl Control that knows the current window.
   280         *   Must be specified if parent absolute layout can be used,
   281         *   otherwise @c NULL may be given.
   282         *
   283         * @param aGc Graphics context to be used for drawing.
   284         *
   285         * @param aRect Rectangle to be drawn.
   286         *
   287         * @param aDrawParam Bitwise combination of drawing parameters. 
   288         *   @c KAknsDrawParamDefault should be used if no special handling 
   289         *   is required.
   290         *
   291         * @return ETrue if background was drawn with a bitmap, EFalse
   292         *   otherwise. Note that many scalable skins implicitly define
   293         *   background bitmaps for seemingly blank areas.
   294         */
   295         IMPORT_C static TBool Background( MAknsSkinInstance* aInstance,
   296             MAknsControlContext* aContext, const CCoeControl* aControl,
   297             CWindowGc& aGc, const TRect& aRect, const TInt aDrawParam );
   298 
   299         /**
   300         * Draws background to the given graphics context.
   301         * The origin is queried from the control position list (if given using
   302         * AknsUtils::RegisterControlPosition). If not found, the origin is
   303         * queried from the given control, which may result in a window server
   304         * flush.
   305         *
   306         * If background contains multiple layers, they are drawn in the
   307         * sequence specified by the context. If multiple contexts are chained
   308         * (using @c SetParentContext), they are drawn in reverse order, i.e.
   309         * the context given as parameter to this method call is drawn last.
   310         *
   311         * Drawing parameter KAknsDrawParamNoClearUnderImage is automatically
   312         * assumed for all the chained contexts, except the deepest one.
   313         *
   314         * @since 2.0
   315         *
   316         * @param aInstance Pointer to skin instance as obtained from
   317         *   AknsUtils::SkinInstance(). If @c NULL rectangle is cleared
   318         *   without bitmap.
   319         *
   320         * @param aContext Control context to obtain context specific 
   321         *   information about background drawing. Must be specified, if
   322         *   aInstance is not @c NULL.
   323         *
   324         * @param aControl Control that knows the current window.
   325         *   Must be specified if parent absolute layout can be used,
   326         *   otherwise @c NULL may be given.
   327         *
   328         * @param aGc Graphics context to be used for drawing.
   329         *
   330         * @param aDstPos Destination position (top-left corner of the area
   331         *   to be drawn) in graphics context coordinate system.
   332         *
   333         * @param aControlRect Rectangle (in the control coordinate system) 
   334         *   to be drawn.
   335         *
   336         * @param aDrawParam Bitwise combination of drawing parameters. 
   337         *   @c KAknsDrawParamDefault should be used if no special handling 
   338         *   is required.
   339         *
   340         * @return ETrue if background was drawn with a bitmap, EFalse
   341         *   otherwise. Note that many scalable skins implicitly define
   342         *   background bitmaps for seemingly blank areas.
   343         */
   344         IMPORT_C static TBool DrawBackground( MAknsSkinInstance* aInstance,
   345             MAknsControlContext* aContext, const CCoeControl* aControl,
   346             CBitmapContext& aGc, const TPoint& aDstPos,
   347             const TRect& aControlRect, const TInt aDrawParam );
   348 
   349         /**
   350         * Draws background between rects.
   351         * Draws bacground between specified rectangles. Origin is assumed
   352         * to be (0,0).
   353         *
   354         * See @c DrawBackground for details on chained layouts.
   355         *
   356         * @since 2.0
   357         *
   358         * @param aInstance Pointer to skin instance as obtained from
   359         *   AknsUtils::SkinInstance(). If @c NULL rectangle is cleared
   360         *   without bitmap.
   361         *
   362         * @param aContext Control context to obtain context specific 
   363         *   information about background drawing. If @c NULL and skin
   364         *   instance was given, default parameters are used.
   365         *
   366         * @param aGc Graphics context to be used for drawing.
   367         *
   368         * @param aOuterRect Outer rectangle.
   369         *
   370         * @param aInnerRect Inner rectangle.
   371         *
   372         * @return ETrue if background was drawn with a bitmap, EFalse
   373         *   otherwise. Note that many scalable skins implicitly define
   374         *   background bitmaps for seemingly blank areas.
   375         */
   376         IMPORT_C static TBool BackgroundBetweenRects( 
   377             MAknsSkinInstance* aInstance,
   378             MAknsControlContext* aContext, CWindowGc& aGc, 
   379             const TRect& aOuterRect,const TRect& aInnerRect );
   380 
   381         /**
   382         * Draws background between rects.
   383         * Draws bacground between specified rectangles. 
   384         *
   385         * See @c DrawBackground for details on chained layouts.
   386         *
   387         * @since 2.0
   388         *
   389         * @param aInstance Pointer to skin instance as obtained from
   390         *   AknsUtils::SkinInstance(). If @c NULL rectangle is cleared
   391         *   without bitmap.
   392         *
   393         * @param aContext Control context to obtain context specific 
   394         *   information about background drawing. Must be specified if
   395         *   aInstance is not @c NULL.
   396         *
   397         * @param aControl Control that knows the current window.
   398         *   Must be specified if parent absolute layout can be used,
   399         *   otherwise @c NULL may be given.
   400         *
   401         * @param aGc Graphics context to be used for drawing.
   402         *
   403         * @param aOuterRect Outer rectangle.
   404         *
   405         * @param aInnerRect Inner rectangle.
   406         *
   407         * @return ETrue if background was drawn with a bitmap, EFalse
   408         *   otherwise. Note that many scalable skins implicitly define
   409         *   background bitmaps for seemingly blank areas.
   410         */
   411         IMPORT_C static TBool BackgroundBetweenRects( 
   412             MAknsSkinInstance* aInstance,
   413             MAknsControlContext* aContext, const CCoeControl* aControl, 
   414             CWindowGc& aGc, 
   415             const TRect& aOuterRect,const TRect& aInnerRect );
   416 
   417         /**
   418         * Draws background between rects.
   419         * Draws bacground between specified rectangles with drawing parameters. 
   420         *
   421         * @since 2.0
   422         *
   423         * @param aInstance Pointer to skin instance as obtained from
   424         *   AknsUtils::SkinInstance(). If @c NULL rectangle is cleared
   425         *   without bitmap.
   426         *
   427         * @param aContext Control context to obtain context specific 
   428         *   information about background drawing. Must be specified if
   429         *   aInstance is not @c NULL.
   430         *
   431         * @param aControl Control that knows the current window.
   432         *   Must be specified if parent absolute layout can be used,
   433         *   otherwise @c NULL may be given.
   434         *
   435         * @param aGc Graphics context to be used for drawing.
   436         *
   437         * @param aOuterRect Outer rectangle.
   438         *
   439         * @param aInnerRect Inner rectangle.
   440         *
   441         * @param aDrawParam Bitwise combination of drawing parameters. 
   442         *   @c KAknsDrawParamDefault should be used if no special handling 
   443         *   is required.
   444         *
   445         * @return ETrue if background was drawn with a bitmap, EFalse
   446         *   otherwise. Note that many scalable skins implicitly define
   447         *   background bitmaps for seemingly blank areas.
   448         */
   449         IMPORT_C static TBool BackgroundBetweenRects( 
   450             MAknsSkinInstance* aInstance,
   451             MAknsControlContext* aContext, const CCoeControl* aControl, 
   452             CWindowGc& aGc, 
   453             const TRect& aOuterRect, const TRect& aInnerRect, 
   454             const TInt aDrawParam );
   455 
   456         /**
   457         * Determines whether background drawing would be done with
   458         * a bitmap (deprecated).
   459         *
   460         * @param aInstance Pointer to skin instance. If @c NULL,
   461         *   method returns EFalse.
   462         *
   463         * @param aContext Control context, or @c NULL if no context 
   464         *   is used. Note that absence of control context affects
   465         *   the result.
   466         *
   467         * @return @c ETrue if background would be drawn with a bitmap,
   468         *   @c EFalse otherwise. If a scalable skin is currently active,
   469         *   the return value is undefined, and does not necessarily
   470         *   reflect the return value of the actual drawing operation.
   471         *
   472         * @deprecated This method is deprecated as of release 2.8.
   473         *   Use the return values of background drawing functions to
   474         *   determine whether the background was drawn with skinned
   475         *   content. The return value is always ETrue starting from
   476         *   rel 3.1
   477         */
   478         IMPORT_C static TBool HasBitmapBackground(
   479             MAknsSkinInstance* aInstance,
   480             MAknsControlContext* aContext );
   481 
   482         /**
   483         * Draws a cached image (with its attributes specified in the skin)
   484         * to the given rectangle.
   485         *
   486         * @param aInstance Pointer to the skin instance. If @c NULL,
   487         *   the method returns immediately.
   488         *
   489         * @param aGc Graphics context to be used for drawing.
   490         *
   491         * @param aRect Rectangle specifying the pane used for drawing. The
   492         *   image is laid out within the rectangle.
   493         *
   494         * @param aID Item ID of the image to be drawn.
   495         */
   496         IMPORT_C static void DrawCachedImage( MAknsSkinInstance* aInstance,
   497             CWindowGc& aGc, const TRect& aRect, const TAknsItemID& aID );
   498 
   499         /**
   500         * Draws a cached image (with its attributes specified in the skin)
   501         * to the given rectangle in an off-screen graphics context.
   502         *
   503         * @since 2.8
   504         *
   505         * @param aInstance Pointer to the skin instance. If @c NULL,
   506         *   the method returns immediately.
   507         *
   508         * @param aGc Bitmapped graphics context to be used for drawing.
   509         *
   510         * @param aRect Rectangle specifying the pane used for drawing. The
   511         *   image is laid out within the rectangle.
   512         *
   513         * @param aID Item ID of the image to be drawn.
   514         */
   515         IMPORT_C static void DrawCachedImage( MAknsSkinInstance* aInstance,
   516             CFbsBitGc& aGc, const TRect& aRect, const TAknsItemID& aID );
   517 
   518         /**
   519         * Draws a frame (with cached images) to the specified area.
   520         *
   521         * @param aInstance Pointer to the skin instance. If @c NULL, the 
   522         *   method returns EFalse.
   523         *
   524         * @param aGc Graphics context to be used for drawing.
   525         *
   526         * @param aOuterRect Outer rectangle of the frame. Frame elements
   527         *   will be drawn within this rectangle.
   528         *
   529         * @param aInnerRect Inner rectangle of the frame. Frame center 
   530         *   will be drawn within this rectangle.
   531         *
   532         * @param aFrameID Item ID of the entire frame.
   533         *
   534         * @param aCenterID Item ID of the center part of the frame. If
   535         *   @c KAknsIIDNone, no center will be drawn. If @c KAknsIIDDefault,
   536         *   the default value from the frame itself will be used. Other values,
   537         *   the item to be used for the center part. If the frame is 
   538         *   specified as 1 part graphics in the skin instead of 9 part
   539         *   graphics, this parameter has no effect.
   540         *
   541         * @return EFalse, if the frame was not drawn at all. ETrue, if the
   542         *   frame was (at least partially) drawn.
   543         */
   544         IMPORT_C static TBool DrawFrame( MAknsSkinInstance* aInstance,
   545             CWindowGc& aGc, const TRect& aOuterRect, const TRect& aInnerRect, 
   546             const TAknsItemID& aFrameID, const TAknsItemID& aCenterID );
   547 
   548         /**
   549         * Prepares the frame graphics for drawing. This function should be
   550         * called when the frame sizes are known and in places where Flushing
   551         * the Window server buffer will not cause flicker. For example, a
   552         * good place to call PrepareFrame() would be controls SizeChanged 
   553         * function. Altough its not mandatory to call PrepareFrame()
   554         * before DrawFrame(), it's highly recommended in order to avoid
   555         * unnecessary flushes in the middle of the actual drawing routine. 
   556         *
   557         * Note that the rect parameters must be exactly the same for
   558         * PrepareFrame and subsequent DrawFrame calls. Otherwise the 
   559         * DrawFrame functions will cause a flush, which leads
   560         * to flicker.
   561         *
   562         * @since 2.8
   563         *
   564         * @param aInstance Pointer to the skin instance. If @c NULL, the 
   565         *   method returns EFalse.
   566         *
   567         * @param aOuterRect Outer rectangle of the frame. Frame elements
   568         *   are scaled to this size.
   569         *
   570         * @param aInnerRect Inner rectangle of the frame. Frame center 
   571         *   is scaled to this size
   572         *
   573         * @param aFrameID Item ID of the entire frame.
   574         *
   575         * @param aCenterID Item ID of the center part of the frame. If
   576         *   @c KAknsIIDNone, no center part will be prepared.
   577         *   If @c KAknsIIDDefault, the default value from the frame
   578         *   itself will be used. Other values, the item to be used 
   579         *   for the center part. If the frame is specified as 1 part
   580         *   graphics in the skin instead of 9 part graphics, this
   581         *   parameter has no effect.
   582         *
   583         * @return EFalse, if were nothing to prepare. ETrue, if the
   584         *   frame was (at least partially) prepared.
   585         */
   586         IMPORT_C static TBool PrepareFrame( MAknsSkinInstance* aInstance,
   587             const TRect& aOuterRect, const TRect& aInnerRect, 
   588             const TAknsItemID& aFrameID, const TAknsItemID& aCenterID);
   589 
   590         /**
   591         * Draws a frame (with cached images) to the specified area
   592         * in an off-screen graphics context.
   593         *
   594         * @since 2.8
   595         *
   596         * @param aInstance Pointer to the skin instance. If @c NULL, the 
   597         *   method returns EFalse.
   598         *
   599         * @param aGc Bitmapped graphics context to be used for drawing.
   600         *
   601         * @param aOuterRect Outer rectangle of the frame. Frame elements
   602         *   will be drawn within this rectangle.
   603         *
   604         * @param aInnerRect Inner rectangle of the frame. Frame center 
   605         *   will be drawn within this rectangle.
   606         *
   607         * @param aFrameID Item ID of the entire frame.
   608         *
   609         * @param aCenterID Item ID of the center part of the frame. If
   610         *   @c KAknsIIDNone, no center will be drawn. If @c KAknsIIDDefault,
   611         *   the default value from the frame itself will be used. Other values,
   612         *   the item to be used for the center part. If unsure, specify
   613         *   @c KAknsIIDDefault. If the frame is specified as 1 part 
   614         *   graphics in the skin instead of 9 part graphics, this 
   615         *   parameter has no effect.
   616         *
   617         * @param aDrawParam Bitwise combination of drawing parameters. 
   618         *   @c KAknsDrawParamDefault should be used if no special handling 
   619         *   is required.
   620         *
   621         * @return EFalse, if the frame was not drawn at all. ETrue, if the
   622         *   frame was (at least partially) drawn.
   623         */
   624         IMPORT_C static TBool DrawFrame( MAknsSkinInstance* aInstance,
   625             CFbsBitGc& aGc, const TRect& aOuterRect, const TRect& aInnerRect, 
   626             const TAknsItemID& aFrameID, const TAknsItemID& aCenterID,
   627             const TInt aDrawParam );
   628 
   629         /**
   630         * Draws a frame (with cached images) to the specified area
   631         * in an off-screen graphics context.
   632         *
   633         * @since 2.8
   634         *
   635         * @param aInstance Pointer to the skin instance. If @c NULL, the 
   636         *   method returns EFalse.
   637         *
   638         * @param aGc Bitmapped graphics context to be used for drawing.
   639         *
   640         * @param aOuterRect Outer rectangle of the frame. Frame elements
   641         *   will be drawn within this rectangle.
   642         *
   643         * @param aInnerRect Inner rectangle of the frame. Frame center 
   644         *   will be drawn within this rectangle.
   645         *
   646         * @param aFrameID Item ID of the entire frame.
   647         *
   648         * @param aCenterID Item ID of the center part of the frame. If
   649         *   @c KAknsIIDNone, no center will be drawn. If @c KAknsIIDDefault,
   650         *   the default value from the frame itself will be used. Other values,
   651         *   the item to be used for the center part. If unsure, specifi
   652         *   @c KAknsIIDDefault. If the frame is specified as 1 part 
   653         *   graphics in the skin instead of 9 part graphics, this
   654         *   parameter has no effect.
   655         *
   656         * @return EFalse, if the frame was not drawn at all. ETrue, if the
   657         *   frame was (at least partially) drawn.
   658         */
   659         IMPORT_C static TBool DrawFrame( MAknsSkinInstance* aInstance,
   660             CFbsBitGc& aGc, const TRect& aOuterRect, const TRect& aInnerRect, 
   661             const TAknsItemID& aFrameID, const TAknsItemID& aCenterID );
   662 
   663         /**
   664         * Draws the specified part of the frame (with a cached image) to the
   665         * specified rectangle.
   666         *
   667         * @par Compatibility note:
   668         * Prior to Series 60 release 2.8, the entire outer rectangle could
   669         * be given as the rectangle of a corner part. Due to scalable UI
   670         * compatibility, this is no longer supported in release 2.8, and thus
   671         * the exact corner rectangle is required. This funtion may not
   672         * function correctly if the skin specifies the frame as 1 part
   673         * graphics.
   674         *
   675         * @param aInstance Pointer to the skin instance. If @c NULL, the 
   676         *   method returns @c EFalse.
   677         *
   678         * @param aGc Graphics context to be used for drawing.
   679         *
   680         * @param aRect Rectangle for drawing. This must be the rectangle
   681         *   of the specific part of the drawn that will be drawn, e.g.
   682         *   top-left corner rectangle if the top-left corner is being drawn.
   683         *
   684         * @param aFrameID Item ID of the entire frame.
   685         *
   686         * @param aFrameElement Element (index) of the frame element to
   687         *   be drawn.
   688         *
   689         * @return ETrue, if the element was drawn. EFalse otherwise.
   690         */
   691         IMPORT_C static TBool DrawFramePart( MAknsSkinInstance* aInstance,
   692             CWindowGc& aGc, const TRect& aRect, const TAknsItemID& aFrameID,
   693             const TAknsFrameElementIndex aFrameElement );
   694 
   695         /**
   696         * Returns a boolean value indicating whether list separator lines
   697         * should be drawn.
   698         *
   699         * This method checks:
   700         *  - The value of @c KAknsIIDPropertyListSeparatorLines property.
   701         *  - The presence of (non-scalable) column bitmaps.
   702         *       If found, @c EFalse is returned.
   703         *  - The presence of generic list background (non-scalable).
   704         *       If found, @c EFalse is returned.
   705         *
   706         * Note that the exact internal implementation of the checks is
   707         * subject to change.
   708         *
   709         * @since 2.8
   710         *
   711         * @param aInstance Pointer to the skin instance. If @c NULL, 
   712         *   the method returns @c ETrue.
   713         *
   714         * @return @c ETrue, if list separator lines should drawn. 
   715         *   @c EFalse, if list separator lines should not be drawn
   716         *   and, consequently, list column and slice bitmaps (if any) from the
   717         *   skin content should be drawn.
   718         */
   719         IMPORT_C static TBool IsListSeperatorLines(
   720             MAknsSkinInstance* aInstance );
   721 
   722         /**
   723         * Returns an enum value indicating the way notes and queries appear
   724         * to the screen (sliding animation)
   725         *
   726         * @since 3.1
   727         *
   728         * @param aInstance Pointer to the skin instance. If @c NULL, 
   729         *   the method returns @c ESlidingDisabled.
   730         *
   731         * @return @c Sliding mode from enumeration TSlidingMode
   732         */
   733         IMPORT_C static TSlidingMode SlidingMode(
   734             MAknsSkinInstance* aInstance );
   735 
   736     private: // Prohibited constructors and destructor
   737         
   738         // Construction prohibited (static class)
   739         AknsDrawUtils();
   740         // Destruction prohibited (static class)
   741         ~AknsDrawUtils();
   742     };
   743 
   744 #endif // AKNSDRAWUTILS_H
   745 
   746 // End of File