|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef HUIFXPARAMETERMANAGER_H_ |
|
21 #define HUIFXPARAMETERMANAGER_H_ |
|
22 |
|
23 #include "HuiFxParameter.h" |
|
24 #include "HuiFxParameterCollection.h" |
|
25 #include <e32std.h> |
|
26 #include <e32hashtab.h> |
|
27 |
|
28 class CHuiFxEngine; |
|
29 class TRgb; |
|
30 |
|
31 /** |
|
32 * A hash map containing named layer and filter parameters |
|
33 */ |
|
34 typedef RPtrHashMap<TDesC, MHuiFxParameter> RHuiFxParameterMap; |
|
35 |
|
36 class CHuiFxParameterManager: public CBase, public MHuiFxParameterCollection |
|
37 { |
|
38 public: |
|
39 static CHuiFxParameterManager* NewL(); |
|
40 ~CHuiFxParameterManager(); |
|
41 |
|
42 MHuiFxParameter* Parameter(const TDesC& aName); |
|
43 |
|
44 // does not take ownership |
|
45 void RegisterParameterL(const TDesC& aName, TRgb* aColor); |
|
46 void RegisterParameterL(const TDesC& aName, TReal32* aScalar); |
|
47 |
|
48 TBool HasAnimatedParameters() const; |
|
49 void AdvanceTime(TReal32 aElapsedTime); |
|
50 TBool Update(CHuiFxEngine& aEngine, const TRect& aVisualRect); |
|
51 public: // effect cache |
|
52 CHuiFxParameterManager* CloneL() const; |
|
53 void CopyParameterL(const TDesC &aName, TReal32 *aValue, const CHuiFxParameterManager *aOldValues); |
|
54 void CopyParameterL(const TDesC &aName, TRgb *aValue, const CHuiFxParameterManager *aOldValues); |
|
55 private: |
|
56 CHuiFxParameterManager(); |
|
57 void ConstructL(); |
|
58 void ResolveReference( TReal32& aDefaultValue, THuiFxReferencePoint aRef, CHuiFxEngine& aEngine, const TRect& aVisualRec ); |
|
59 |
|
60 RHuiFxParameterMap iParameters; |
|
61 }; |
|
62 |
|
63 #endif /* HUIFXPARAMETERMANAGER_H_ */ |