1.1 --- a/epoc32/include/mw/aknslayeredbackgroundcontrolcontext.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/aknslayeredbackgroundcontrolcontext.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,135 @@
1.4 -aknslayeredbackgroundcontrolcontext.h
1.5 +/*
1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Defines a concrete public class
1.19 +* CAknsLayeredBackgroundControlContext.
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +#ifndef AKNSLAYEREDBACKGROUNDCONTROLCONTEXT_H
1.25 +#define AKNSLAYEREDBACKGROUNDCONTROLCONTEXT_H
1.26 +
1.27 +// INCLUDES
1.28 +#include <AknsBasicBackgroundControlContext.h>
1.29 +
1.30 +// CLASS DECLARATION
1.31 +
1.32 +/**
1.33 +* Implementation of a control context that provides one or more layered
1.34 +* backgrounds with their layout rectangles.
1.35 +*
1.36 +* This is a public class with exported functions.
1.37 +* The class is not intended for derivation outside the library.
1.38 +*
1.39 +* @lib AknSkins.lib
1.40 +*
1.41 +* @since 2.0
1.42 +*/
1.43 +NONSHARABLE_CLASS(CAknsLayeredBackgroundControlContext) :
1.44 + public CAknsBasicBackgroundControlContext
1.45 + {
1.46 + public: // Constructors and destructor
1.47 +
1.48 + /**
1.49 + * Two-phased constructor.
1.50 + *
1.51 + * @since 2.0
1.52 + *
1.53 + * @param aImageID Item ID of the first background bitmap.
1.54 + *
1.55 + * @param aRect Rectangle where the first bitmap should be laid out.
1.56 + *
1.57 + * @param aParentAbsolute ETrue if parent absolute layout should be
1.58 + * used, EFalse otherwise. If a parent absolute layout is used,
1.59 + * the parent position must be set and updated using SetParentPos.
1.60 + *
1.61 + * @param aNumberOfLayers Total number of layers as an integer.
1.62 + * This must be 1 or more.
1.63 + *
1.64 + * @return Newly constructed object.
1.65 + */
1.66 + IMPORT_C static CAknsLayeredBackgroundControlContext* NewL(
1.67 + const TAknsItemID& aImageID, const TRect& aRect,
1.68 + const TBool aParentAbsolute, const TInt aNumberOfLayers );
1.69 +
1.70 + /**
1.71 + * Destructor.
1.72 + */
1.73 + virtual ~CAknsLayeredBackgroundControlContext();
1.74 +
1.75 + public: // New functions
1.76 +
1.77 + /**
1.78 + * Sets the item ID of the specified layer.
1.79 + *
1.80 + * @since 2.0
1.81 + *
1.82 + * @param aLayer Index of the layer, where 0 is the first one.
1.83 + * The index must be less than aNumberOfLayers given to @c NewL().
1.84 + *
1.85 + * @param aID Item ID of the image.
1.86 + */
1.87 + IMPORT_C void SetLayerImage( const TInt aLayer,
1.88 + const TAknsItemID& aID );
1.89 +
1.90 + /**
1.91 + * Sets the layout rectangle of the specified layer.
1.92 + *
1.93 + * @since 2.0
1.94 + *
1.95 + * @param aLayer Index of the layer, where 0 is the first one.
1.96 + * The index must be less than aNumberOfLayers given to @c NewL().
1.97 + *
1.98 + * @param aRect Rectangle where the image should be laid out.
1.99 + */
1.100 + IMPORT_C void SetLayerRect( const TInt aLayer,
1.101 + const TRect& aRect );
1.102 +
1.103 + public: // From MAknsControlContext
1.104 +
1.105 + /**
1.106 + * @copydoc MAknsControlContext::IsCompatibleWithType
1.107 + */
1.108 + TBool IsCompatibleWithType( const TAknsControlContextType aType ) const;
1.109 +
1.110 + protected:
1.111 +
1.112 + /**
1.113 + * C++ constructor.
1.114 + */
1.115 + CAknsLayeredBackgroundControlContext();
1.116 +
1.117 + /**
1.118 + * Symbian 2nd phase constructor.
1.119 + */
1.120 + void ConstructL( const TRect& aRect, const TBool aParentAbsolute,
1.121 + const TAknsItemID& aImageID, const TInt aNumberOfLayers );
1.122 +
1.123 + protected: // Data
1.124 +
1.125 + /**
1.126 + * Array of layered layouts.
1.127 + */
1.128 + TAknsBackground* iLayoutArray;
1.129 +
1.130 + /**
1.131 + * Size of the layer array.
1.132 + */
1.133 + TInt iLayoutArraySize;
1.134 +
1.135 + };
1.136 +
1.137 +#endif // AKNSLAYEREDBACKGROUNDCONTROLCONTEXT_H
1.138 +
1.139 +// End of File