|
1 /* |
|
2 * Copyright (c) 2006 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: MPX common container HG Texture manager. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMPXCOMMONCONTAINERTEXTUREMANAGER2_H |
|
21 #define CMPXCOMMONCONTAINERTEXTUREMANAGER2_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <mpxitemid.h> |
|
27 #include <gulicon.h> |
|
28 #include <e32hashtab.h> |
|
29 |
|
30 #include "mpxcommoncontainer.h" |
|
31 |
|
32 // CONSTANTS |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CFbsBitmap; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Texture manager for common container. |
|
41 * |
|
42 * @lib mpxcommoncontainer.lib |
|
43 * @since S60 v3.2 |
|
44 */ |
|
45 NONSHARABLE_CLASS( CMPXCommonContainerTextureManager2 ) |
|
46 : public CBase |
|
47 { |
|
48 public: |
|
49 |
|
50 /** |
|
51 * default C++ constructor. |
|
52 */ |
|
53 CMPXCommonContainerTextureManager2(); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CMPXCommonContainerTextureManager2(); |
|
59 |
|
60 /** |
|
61 * Creates texture from the specified bitmap. |
|
62 * |
|
63 * @param aIndex container item index |
|
64 * @param aItemId container item id |
|
65 * @param aBitmap a bitmap |
|
66 */ |
|
67 void CreateTextureL( TInt aIndex, TMPXItemId aItemId, CFbsBitmap* bitmap ); |
|
68 |
|
69 |
|
70 /** |
|
71 * Returns texture for the specified item |
|
72 * |
|
73 * @param aItemId container item id |
|
74 * @return ETrue for the item, EFalse if non-existent |
|
75 */ |
|
76 TBool TextureExist( TMPXItemId aItemId ) const; |
|
77 |
|
78 /** |
|
79 * Called with array index when a bitmap is needed |
|
80 * |
|
81 * @param aId container item id |
|
82 */ |
|
83 CFbsBitmap* ProvideBitmapL( TInt aIndex ); |
|
84 |
|
85 /** |
|
86 * Removes the cached texture information |
|
87 * |
|
88 */ |
|
89 void ClearCache(); |
|
90 |
|
91 |
|
92 private: // data |
|
93 |
|
94 typedef RHashMap<TInt, CFbsBitmap*> RTextureMap; |
|
95 RTextureMap iTextureMap; |
|
96 typedef RHashMap<TInt32, TInt> RTextureIndex; |
|
97 RTextureIndex iTextureIndexMap; |
|
98 }; |
|
99 |
|
100 #endif // CMPXCOMMONCONTAINERTEXTUREMANAGER2_H |
|
101 |
|
102 // End of File |