|
1 /* |
|
2 * Copyright (c) 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: CMmPostEvaluationProcessor declaration |
|
15 * Version : %version: 2 % << Don't touch! Updated by Synergy at check-out. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_MMPOSTEVALUATIONPROCESSOR_H |
|
21 #define C_MMPOSTEVALUATIONPROCESSOR_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <e32std.h> |
|
25 |
|
26 class CMmListBoxItemDrawer; |
|
27 |
|
28 /** |
|
29 * Used to performa additional post evaluation operations connected with |
|
30 * the ui, and preparation of a suite display from the mmwidgets side. |
|
31 * All the operation are performed in an active object, since they |
|
32 * are not time crucial, and are performed to adjust performance: |
|
33 * such as preloading suite icons that are not visible in the current view. |
|
34 * |
|
35 * @code |
|
36 * @endcode |
|
37 * @lib mmwidgets |
|
38 * @since S60 v5.0 |
|
39 * @see CListBoxItemDrawer |
|
40 * @ingroup group_mmwidgets |
|
41 */ |
|
42 NONSHARABLE_CLASS( CMmPostEvaluationProcessor ) : public CActive |
|
43 { |
|
44 |
|
45 public: |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * |
|
49 * @since S60 v5.0 |
|
50 * @param aDrawer Item drawer used to draw item. |
|
51 */ |
|
52 static CMmPostEvaluationProcessor* NewL( CMmListBoxItemDrawer& aDrawer ); |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 * |
|
57 * @since S60 v5.0 |
|
58 * @param aDrawer Item drawer used to draw item. |
|
59 */ |
|
60 static CMmPostEvaluationProcessor* NewLC( CMmListBoxItemDrawer& aDrawer ); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 * |
|
65 * @since S60 v5.0 |
|
66 */ |
|
67 virtual ~CMmPostEvaluationProcessor(); |
|
68 |
|
69 /** |
|
70 * Starts at predefiend index. |
|
71 * |
|
72 * @param aIndex Starts processing at index. |
|
73 * @since S60 v3.0 |
|
74 */ |
|
75 void StartAt( TInt aIndex = 0 ); |
|
76 |
|
77 private: |
|
78 |
|
79 /** |
|
80 * Default constructor. |
|
81 * |
|
82 * @since S60 v3.0 |
|
83 * @param aDrawer Object used to draw items in widgets. |
|
84 */ |
|
85 CMmPostEvaluationProcessor( CMmListBoxItemDrawer& aDrawer ); |
|
86 |
|
87 /** |
|
88 * 2nd phase constructor. |
|
89 * |
|
90 * @since S60 v3.0 |
|
91 */ |
|
92 void ConstructL(); |
|
93 |
|
94 |
|
95 |
|
96 private: // From CActive |
|
97 |
|
98 /** |
|
99 * Draws next animation phase. |
|
100 * |
|
101 * @since S60 v3.0 |
|
102 */ |
|
103 void RunL(); |
|
104 |
|
105 /** |
|
106 * Cancels animation timer. Stops animation. |
|
107 * |
|
108 * @since S60 v3.0 |
|
109 */ |
|
110 void DoCancel(); |
|
111 |
|
112 /** |
|
113 * Handles error if error an error occured. |
|
114 * |
|
115 * @since S60 v3.0 |
|
116 * @param aError Error code which occurred. |
|
117 * @return Error code for error handling. |
|
118 */ |
|
119 TInt RunError( TInt aError ); |
|
120 |
|
121 private: // Data |
|
122 |
|
123 /** |
|
124 * Drawer to use for preload. |
|
125 |
|
126 */ |
|
127 CMmListBoxItemDrawer & iDrawer; |
|
128 |
|
129 /** |
|
130 * Index to be processed in next RunL. |
|
131 |
|
132 */ |
|
133 TInt iIndexToProcess; |
|
134 |
|
135 }; |
|
136 |
|
137 #endif // MMDRAWERANIMATOR_H |