1 /* |
|
2 * Copyright (c) 2002-2005 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: List manager,which is used by drop down list |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "peninputlistmanager.h" |
|
20 #include "peninputlistonerowwithouticon.h" |
|
21 #include "peninputlistonerowwithouticonwithbubble.h" |
|
22 #include "peninputlistmultirowwithicon.h" |
|
23 #include "peninputlistmultirowwithiconwithbubble.h" |
|
24 #include "peninputlistonerowwithicon.h" |
|
25 #include "peninputlistonerowwithiconwithbubble.h" |
|
26 #include "peninputlistmultirowwithouticon.h" |
|
27 |
|
28 #include "peninputlistmultirowrollwithiconwithbubble.h" |
|
29 #include "peninputlistonerowrollwithiconwithbubble.h" |
|
30 |
|
31 #include "peninputlistmultirowrollwithicon.h" |
|
32 #include "peninputlistonerowrollwithicon.h" |
|
33 #include "peninputlistexpandablemultirowwithouticon.h" |
|
34 #include <peninputdropdownlistcontext.h> |
|
35 |
|
36 // ======== MEMBER FUNCTIONS ======== |
|
37 |
|
38 // Implementation of Class CListManager |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CListManager::NewL |
|
42 // factory function |
|
43 // (other items were commented in a header). |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 CListManager* CListManager::NewL(MFepCtrlDropdownListContext* aContext) |
|
47 { |
|
48 CListManager* self = new (ELeave) CListManager(); |
|
49 CleanupStack::PushL(self); |
|
50 self->ConstructL(aContext); |
|
51 CleanupStack::Pop(); |
|
52 return self; |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CListManager::~CListManager |
|
57 // factory function |
|
58 // (other items were commented in a header). |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 CListManager::~CListManager() |
|
62 { |
|
63 delete iListOneRowWithoutIcon; |
|
64 delete iListOneRowWithoutIconWithBubble; |
|
65 delete iListOneRowWithIcon; |
|
66 delete iListOneRowWithIconWithBubble; |
|
67 delete iListMultiRowWithIcon; |
|
68 delete iListMultiRowWithIconWithBubble; |
|
69 delete iListMultiRowWithoutIcon; |
|
70 delete iListMultiRowRollWithIcon; |
|
71 delete iListOneRowRollWithIcon; |
|
72 delete iListExpandableMultiRowWithoutIcon; |
|
73 delete iListMultiRowRollWithIconWithBubble; |
|
74 delete iListOneRowRollWithIconWithBubble; |
|
75 } |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // CListManager::NewL |
|
79 // 2nd construct function |
|
80 // (other items were commented in a header). |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 void CListManager::ConstructL(MFepCtrlDropdownListContext* aContext) |
|
84 { |
|
85 iContext = aContext; |
|
86 iListOneRowWithoutIcon = CListOneRowWithoutIcon::NewL(this, aContext); |
|
87 iListOneRowWithoutIconWithBubble = CListOneRowWithoutIconWithBubble::NewL(this, aContext); |
|
88 iListOneRowWithIcon = CListOneRowWithIcon::NewL(this, aContext); |
|
89 iListOneRowWithIconWithBubble = CListOneRowWithIconWithBubble::NewL(this, aContext); |
|
90 iListMultiRowWithIcon = CListMultiRowWithIcon::NewL(this, aContext); |
|
91 iListMultiRowWithIconWithBubble = CListMultiRowWithIconWithBubble::NewL(this, aContext); |
|
92 iListMultiRowWithoutIcon = CListMultiRowWithoutIcon::NewL(this, aContext); |
|
93 iListMultiRowRollWithIcon = CListMultiRowRollWithIcon::NewL(this, aContext); |
|
94 iListOneRowRollWithIcon = CListOneRowRollWithIcon::NewL(this, aContext); |
|
95 iListExpandableMultiRowWithoutIcon = CListExpandableMultiRowWithoutIcon::NewL(this, aContext); |
|
96 iListMultiRowRollWithIconWithBubble = CListMultiRowRollWithIconWithBubble::NewL(this, aContext); |
|
97 iListOneRowRollWithIconWithBubble = CListOneRowRollWithIconWithBubble::NewL(this, aContext); |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CListManager::SizeChanged |
|
102 // size change |
|
103 // (other items were commented in a header). |
|
104 // ----------------------------------------------------------------------------- |
|
105 // |
|
106 void CListManager::SizeChanged() |
|
107 { |
|
108 iListOneRowWithoutIcon->SizeChanged(); |
|
109 iListOneRowWithoutIconWithBubble->SizeChanged(); |
|
110 iListOneRowWithIcon->SizeChanged(); |
|
111 iListOneRowWithIconWithBubble->SizeChanged(); |
|
112 iListMultiRowWithIcon->SizeChanged(); |
|
113 iListMultiRowWithIconWithBubble->SizeChanged(); |
|
114 iListMultiRowWithoutIcon->SizeChanged(); |
|
115 iListMultiRowRollWithIcon->SizeChanged(); |
|
116 iListOneRowRollWithIcon->SizeChanged(); |
|
117 iListExpandableMultiRowWithoutIcon->SizeChanged(); |
|
118 iListMultiRowRollWithIconWithBubble->SizeChanged(); |
|
119 iListOneRowRollWithIconWithBubble->SizeChanged(); |
|
120 } |
|
121 |
|
122 // ----------------------------------------------------------------------------- |
|
123 // CListManager::Move |
|
124 // move the list |
|
125 // (other items were commented in a header). |
|
126 // ----------------------------------------------------------------------------- |
|
127 // |
|
128 void CListManager::Move(const TPoint& aOffset) |
|
129 { |
|
130 iListOneRowWithoutIcon->Move(aOffset); |
|
131 iListOneRowWithoutIconWithBubble->Move(aOffset); |
|
132 iListOneRowWithIcon->Move(aOffset); |
|
133 iListOneRowWithIconWithBubble->Move(aOffset); |
|
134 iListMultiRowWithIcon->Move(aOffset); |
|
135 iListMultiRowWithIconWithBubble->Move(aOffset); |
|
136 iListMultiRowWithoutIcon->Move(aOffset); |
|
137 iListMultiRowRollWithIcon->Move(aOffset); |
|
138 iListOneRowRollWithIcon->Move(aOffset); |
|
139 iListExpandableMultiRowWithoutIcon->Move(aOffset); |
|
140 iListMultiRowRollWithIconWithBubble->Move(aOffset); |
|
141 iListOneRowRollWithIconWithBubble->Move(aOffset); |
|
142 |
|
143 // Move all candidates |
|
144 for ( TInt i=0; i<iContext->CandidateCount(); i++ ) |
|
145 { |
|
146 CCandidate* candidate = iContext->GetCandidate(i); |
|
147 if ( candidate ) |
|
148 { |
|
149 candidate->Move(aOffset); |
|
150 } |
|
151 } |
|
152 } |
|
153 |
|
154 // ----------------------------------------------------------------------------- |
|
155 // CListManager::ActiveList |
|
156 // get active list |
|
157 // (other items were commented in a header). |
|
158 // ----------------------------------------------------------------------------- |
|
159 // |
|
160 CList* CListManager::ActiveList() const |
|
161 { |
|
162 return iActiveList; |
|
163 } |
|
164 // ----------------------------------------------------------------------------- |
|
165 // CListManager::SetActiveList |
|
166 // set active list |
|
167 // (other items were commented in a header). |
|
168 // ----------------------------------------------------------------------------- |
|
169 // |
|
170 void CListManager::SetActiveList(CList* aList) |
|
171 { |
|
172 iActiveList = aList; |
|
173 } |
|
174 |
|
175 // ----------------------------------------------------------------------------- |
|
176 // CListManager::ListOneRowWithoutIcon |
|
177 // get one row without icon |
|
178 // (other items were commented in a header). |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 CList* CListManager::ListOneRowWithoutIcon() const |
|
182 { |
|
183 return iListOneRowWithoutIcon; |
|
184 } |
|
185 |
|
186 // ----------------------------------------------------------------------------- |
|
187 // CListManager::ListOneRowWithoutIcon |
|
188 // get one row without icon |
|
189 // (other items were commented in a header). |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 CList* CListManager::ListOneRowWithoutIconWithBubble() const |
|
193 { |
|
194 return iListOneRowWithoutIconWithBubble; |
|
195 } |
|
196 |
|
197 |
|
198 // ----------------------------------------------------------------------------- |
|
199 // CListManager::ListOneRowWithIcon |
|
200 // get one row with icon |
|
201 // (other items were commented in a header). |
|
202 // ----------------------------------------------------------------------------- |
|
203 // |
|
204 CList* CListManager::ListOneRowWithIcon() const |
|
205 { |
|
206 return iListOneRowWithIcon; |
|
207 } |
|
208 |
|
209 // ----------------------------------------------------------------------------- |
|
210 // CListManager::ListOneRowWithIcon |
|
211 // get one row with icon |
|
212 // (other items were commented in a header). |
|
213 // ----------------------------------------------------------------------------- |
|
214 // |
|
215 CList* CListManager::ListOneRowWithIconWithBubble() const |
|
216 { |
|
217 return iListOneRowWithIconWithBubble; |
|
218 } |
|
219 |
|
220 // ----------------------------------------------------------------------------- |
|
221 // CListManager::ListMultiRowWithIcon |
|
222 // get multi row with icon |
|
223 // (other items were commented in a header). |
|
224 // ----------------------------------------------------------------------------- |
|
225 // |
|
226 CList* CListManager::ListMultiRowWithIcon() const |
|
227 { |
|
228 return iListMultiRowWithIcon; |
|
229 } |
|
230 |
|
231 CList* CListManager::ListMultiRowWithIconWithBubble() const |
|
232 { |
|
233 return iListMultiRowWithIconWithBubble; |
|
234 } |
|
235 |
|
236 |
|
237 // ----------------------------------------------------------------------------- |
|
238 // CListManager::ListMultiRowWithoutIcon |
|
239 // get multi row without icon |
|
240 // (other items were commented in a header). |
|
241 // ----------------------------------------------------------------------------- |
|
242 // |
|
243 CList* CListManager::ListMultiRowWithoutIcon() const |
|
244 { |
|
245 return iListMultiRowWithoutIcon; |
|
246 } |
|
247 |
|
248 CList* CListManager::ListMultiRowRollWithIcon() const |
|
249 { |
|
250 return iListMultiRowRollWithIcon; |
|
251 } |
|
252 |
|
253 CList* CListManager::ListOneRowRollWithIcon() const |
|
254 { |
|
255 return iListOneRowRollWithIcon; |
|
256 } |
|
257 |
|
258 CList* CListManager::ListExpandableMultiRowWithoutIcon() const |
|
259 { |
|
260 return iListExpandableMultiRowWithoutIcon; |
|
261 } |
|
262 |
|
263 // ----------------------------------------------------------------------------- |
|
264 // CListManager::ListMultiRowRollWithIconWithBubble |
|
265 // get one row roll with icon with bubble |
|
266 // (other items were commented in a header). |
|
267 // ----------------------------------------------------------------------------- |
|
268 // |
|
269 CList* CListManager::ListOneRowRollWithIconWithBubble() const |
|
270 { |
|
271 return iListOneRowRollWithIconWithBubble; |
|
272 } |
|
273 |
|
274 // ----------------------------------------------------------------------------- |
|
275 // CListManager::ListMultiRowRollWithIconWithBubble |
|
276 // get multi row roll with icon with bubble |
|
277 // (other items were commented in a header). |
|
278 // ----------------------------------------------------------------------------- |
|
279 // |
|
280 CList* CListManager::ListMultiRowRollWithIconWithBubble() const |
|
281 { |
|
282 return iListMultiRowRollWithIconWithBubble; |
|
283 } |
|
284 |
|
285 void CListManager::ResetStatus() |
|
286 { |
|
287 ListOneRowWithoutIcon()->ResetStatus(); |
|
288 ListOneRowWithoutIconWithBubble()->ResetStatus(); |
|
289 ListMultiRowWithIcon()->ResetStatus(); |
|
290 ListMultiRowWithIconWithBubble()->ResetStatus(); |
|
291 ListOneRowWithIcon()->ResetStatus(); |
|
292 ListOneRowWithIconWithBubble()->ResetStatus(); |
|
293 ListMultiRowRollWithIcon()->ResetStatus(); |
|
294 ListOneRowRollWithIcon()->ResetStatus(); |
|
295 ListOneRowRollWithIconWithBubble()->ResetStatus(); |
|
296 ListMultiRowRollWithIconWithBubble()->ResetStatus(); |
|
297 } |
|
298 |
|
299 // End Of File |
|