|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /* |
|
21 * File: CExtProgressContainer.h |
|
22 * Created: 17-10-2005 |
|
23 * Author: |
|
24 * |
|
25 */ |
|
26 |
|
27 #ifndef EXTPROGRESSCONTAINER_H |
|
28 #define EXTPROGRESSCONTAINER_H |
|
29 |
|
30 // INCLUDES |
|
31 #include <coecntrl.h> |
|
32 #include <akncontrol.h> |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CEikProgressInfo; |
|
36 class CExtProgressAnimationControl; |
|
37 class CFbsBitmap; |
|
38 class CEikLabel; |
|
39 class CAknsBasicBackgroundControlContext; |
|
40 |
|
41 /* CLASS: CExtProgressContainer |
|
42 * |
|
43 * |
|
44 */ |
|
45 NONSHARABLE_CLASS( CExtProgressContainer ) : public CCoeControl, public MCoeControlObserver |
|
46 { |
|
47 |
|
48 public: |
|
49 |
|
50 /** NewL factory method, does not pop cleanupstack |
|
51 * |
|
52 * @param - |
|
53 * @return pointer to created CExtProgressContainer object |
|
54 */ |
|
55 static CExtProgressContainer * NewL (const TRect& aRect, |
|
56 CCoeControl* aParent); |
|
57 |
|
58 /** Destructor |
|
59 * |
|
60 * @param - |
|
61 * @return - |
|
62 */ |
|
63 virtual ~CExtProgressContainer (); |
|
64 |
|
65 /* Second phase constructor |
|
66 * |
|
67 * @param - |
|
68 * @return - |
|
69 */ |
|
70 void ConstructL (const TRect& aRect, CCoeControl* aParent); |
|
71 |
|
72 /* GetProgressInfoL |
|
73 * |
|
74 * @param - |
|
75 * @return - |
|
76 */ |
|
77 CEikProgressInfo* GetProgressInfoL(); |
|
78 |
|
79 /* GetAnimationControlL |
|
80 * |
|
81 * @param - |
|
82 * @return - |
|
83 */ |
|
84 CExtProgressAnimationControl* GetAnimationControlL(); |
|
85 |
|
86 /* SetTextL |
|
87 * |
|
88 * @param aText - label text |
|
89 * @return - |
|
90 */ |
|
91 void SetTextL(const TDesC &aText); |
|
92 |
|
93 // Test function |
|
94 void Test(); |
|
95 |
|
96 |
|
97 |
|
98 protected: |
|
99 |
|
100 /** CountComponentControls |
|
101 * |
|
102 * @see CCoeControl |
|
103 * |
|
104 */ |
|
105 TInt CountComponentControls() const; |
|
106 |
|
107 /** ComponentControl |
|
108 * |
|
109 * @see CCoeControl |
|
110 * |
|
111 */ |
|
112 CCoeControl* ComponentControl(TInt aIndex) const; |
|
113 |
|
114 /** SizeChanged |
|
115 * |
|
116 * @see CCoeControl |
|
117 * |
|
118 */ |
|
119 void SizeChanged(); |
|
120 |
|
121 /** HandleControlEventL |
|
122 * |
|
123 * @see CCoeControl |
|
124 * |
|
125 */ |
|
126 void HandleControlEventL(CCoeControl* /*aControl*/,TCoeEvent aEventType); |
|
127 |
|
128 /** Draw |
|
129 * |
|
130 * |
|
131 * @see CCoeControl |
|
132 * |
|
133 */ |
|
134 void Draw(const TRect& aRect) const; |
|
135 |
|
136 /** |
|
137 * From CoeControl, MopSupplyObject. |
|
138 * |
|
139 * @param aId |
|
140 */ |
|
141 virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); |
|
142 |
|
143 /** MinimumSize |
|
144 * |
|
145 * |
|
146 * @see CCoeControl |
|
147 * |
|
148 */ |
|
149 TSize MinimumSize(); |
|
150 |
|
151 private: |
|
152 |
|
153 /** Default constructor, cannot leave. |
|
154 * |
|
155 * @param - |
|
156 * @return - |
|
157 */ |
|
158 CExtProgressContainer (); |
|
159 |
|
160 private: // data |
|
161 |
|
162 CEikLabel* iLabel; |
|
163 CEikProgressInfo* iProgressInfo; |
|
164 CExtProgressAnimationControl* iAnimationControl; |
|
165 |
|
166 /** Background context. Skin stuff. */ |
|
167 CAknsBasicBackgroundControlContext* iBgContext; |
|
168 }; |
|
169 |
|
170 #endif |
|
171 |
|
172 // End of File |