|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Manages icons for basic marking |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_GLXMARKEDICONMANAGER_H |
|
22 #define C_GLXMARKEDICONMANAGER_H |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 #include <glxiconmanager.h> |
|
27 |
|
28 /** |
|
29 * CGlxMarkedIconManager |
|
30 * |
|
31 * Marking Icon manager |
|
32 * |
|
33 * @lib glxcommandhandlermarking |
|
34 * @author M Byrne |
|
35 * @internal reviewed 12/06/2007 by Alex Birkett |
|
36 */ |
|
37 class CGlxMarkedIconManager : public CGlxIconManager |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * static construction |
|
42 * @param aMediaList reference to media list |
|
43 * @param aVisualList reference to associated visual list |
|
44 * @return pointer to CGlxMarkedIconManager instance |
|
45 */ |
|
46 static CGlxMarkedIconManager* NewL(MGlxMediaList& aMediaList, |
|
47 MGlxVisualList& aVisualList); |
|
48 |
|
49 /** destructor */ |
|
50 ~CGlxMarkedIconManager(); |
|
51 |
|
52 /** |
|
53 * cause the marked and unmarked items to be shown with the required overlays. |
|
54 * @param aMultipleModeEnabled set whether multiple marking mode is |
|
55 * enabled or disabled. |
|
56 */ |
|
57 void SetMultipleMarkingModeIndicatorsL(TBool aMultipleModeEnabled); |
|
58 |
|
59 private: // From MGlxMediaListObserver |
|
60 /// See @ref MGlxMediaListObserver::HandleItemAddedL |
|
61 void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex, |
|
62 MGlxMediaList* aList); |
|
63 |
|
64 /// See @ref MGlxMediaListObserver::HandleMediaL |
|
65 void HandleMediaL(TInt aListIndex, MGlxMediaList* aList); |
|
66 |
|
67 /// See @ref MGlxMediaListObserver::HandleItemRemovedL |
|
68 void HandleItemRemovedL(TInt aStartIndex, TInt aEndIndex, |
|
69 MGlxMediaList* aList); |
|
70 |
|
71 /// See @ref MGlxMediaListObserver::HandleItemModifiedL |
|
72 void HandleItemModifiedL(const RArray<TInt>& aItemIndexes, |
|
73 MGlxMediaList* aList); |
|
74 |
|
75 /// See @ref MGlxMediaListObserver::HandleAttributesAvailableL |
|
76 void HandleAttributesAvailableL(TInt aItemIndex, |
|
77 const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList); |
|
78 |
|
79 /// See @ref MGlxMediaListObserver::HandleFocusChangedL |
|
80 void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType, TInt aNewIndex, TInt aOldIndex, |
|
81 MGlxMediaList* aList); |
|
82 |
|
83 /// See @ref MGlxMediaListObserver::HandleItemSelectedL |
|
84 void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList); |
|
85 |
|
86 /// See @ref MGlxMediaListObserver::HandleMessageL |
|
87 void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList); |
|
88 |
|
89 private: // from MGlxVisualListObserver |
|
90 /** @see MGlxVisualListObserver::HandleFocusChangedL */ |
|
91 void HandleFocusChangedL( TInt aFocusIndex, TReal32 aItemsPerSecond, |
|
92 MGlxVisualList* aList, |
|
93 NGlxListDefs::TFocusChangeType aType ); |
|
94 /** @see MGlxVisualListObserver::HandleSizeChanged */ |
|
95 void HandleSizeChanged( const TSize& aSize, MGlxVisualList* aList ); |
|
96 /** @see MGlxVisualListObserver::HandleVisualRemoved */ |
|
97 void HandleVisualRemoved( const CAlfVisual* aVisual, MGlxVisualList* aList ); |
|
98 /** @see MGlxVisualListObserver::HandleVisualAddedL */ |
|
99 void HandleVisualAddedL( CAlfVisual* aVisual, TInt aIndex, MGlxVisualList* aList ); |
|
100 |
|
101 private: |
|
102 /** |
|
103 * Identifiers for marking icons |
|
104 */ |
|
105 //enum TGlxMarkIcon |
|
106 // { |
|
107 //EMarkIcon, |
|
108 //EUnmarkOverlay // semi-transparent overlay for multi.mark mode |
|
109 // }; |
|
110 |
|
111 |
|
112 private: |
|
113 /** |
|
114 * Constructor |
|
115 * @param aMediaList reference to media list |
|
116 * @param aVisualList reference to associated visual list |
|
117 */ |
|
118 CGlxMarkedIconManager(MGlxMediaList& aMediaList, |
|
119 MGlxVisualList& aVisualList); |
|
120 |
|
121 /** |
|
122 * 2nd phase constructor |
|
123 */ |
|
124 void ConstructL(); |
|
125 |
|
126 |
|
127 private: |
|
128 // texture for marking tick, not owned |
|
129 CAlfTexture* iMarkTexture; |
|
130 |
|
131 // texture for semi-transparent overlay in multiple marking mode, owned |
|
132 CAlfTexture* iBlackTexture; |
|
133 |
|
134 // flag whether multiple marking is active |
|
135 TBool iMultipleMarkingEnabled; |
|
136 }; |
|
137 |
|
138 #endif // C_GLXMARKEDICONMANAGER_H |