66
|
1 |
/*******************************************************************************
|
|
2 |
* Copyright (c) 2005, 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved. This program and the accompanying materials
|
|
4 |
* are made available under the terms of the Eclipse Public License v1.0
|
|
5 |
* which accompanies this distribution, and is available at
|
|
6 |
* http://www.eclipse.org/legal/epl-v10.html
|
|
7 |
*
|
|
8 |
* Contributors:
|
|
9 |
* Nokia Corporation - S60 implementation
|
|
10 |
*******************************************************************************/
|
|
11 |
|
|
12 |
#include <aknenv.h>
|
|
13 |
#include <aknlists.h>
|
|
14 |
#include <eikclbd.h>
|
|
15 |
#include <eikclb.h>
|
|
16 |
#include "swtsortedlist.h"
|
|
17 |
|
|
18 |
|
|
19 |
const TInt KSwtArrayGranularity = 4;
|
|
20 |
const TInt KSwtSearchFieldTextLimit = 20;
|
|
21 |
const TInt KSwtExtraWidthToDisplayCursorInArabicLayout = 1;
|
|
22 |
|
|
23 |
|
|
24 |
// ======== MEMBER FUNCTIONS ========
|
|
25 |
|
|
26 |
|
|
27 |
// ---------------------------------------------------------------------------
|
|
28 |
// CSwtSortedList::NewL
|
|
29 |
// ---------------------------------------------------------------------------
|
|
30 |
//
|
|
31 |
CSwtSortedList* CSwtSortedList::NewL(MSwtDisplay& aDisplay, TSwtPeer aPeer,
|
|
32 |
MSwtComposite& aParent, TInt aStyle)
|
|
33 |
{
|
|
34 |
CSwtSortedList* self = new(ELeave) CSwtSortedList(
|
|
35 |
aDisplay, aPeer, aParent, aStyle);
|
|
36 |
CleanupStack::PushL(self);
|
|
37 |
self->ConstructL();
|
|
38 |
self->InitControlBaseL();
|
|
39 |
CleanupStack::Pop(self);
|
|
40 |
return self;
|
|
41 |
}
|
|
42 |
|
|
43 |
// ---------------------------------------------------------------------------
|
|
44 |
// CSwtSortedList::~CSwtSortedList
|
|
45 |
// ---------------------------------------------------------------------------
|
|
46 |
//
|
|
47 |
CSwtSortedList::~CSwtSortedList()
|
|
48 |
{
|
|
49 |
delete iSearchField;
|
|
50 |
}
|
|
51 |
|
|
52 |
|
|
53 |
// ---------------------------------------------------------------------------
|
|
54 |
// CSwtSortedList::CSwtSortedList
|
|
55 |
// ---------------------------------------------------------------------------
|
|
56 |
//
|
|
57 |
CSwtSortedList::CSwtSortedList(MSwtDisplay& aDisplay, TSwtPeer aPeer,
|
|
58 |
MSwtComposite& aParent, TInt aStyle)
|
|
59 |
: CSwtListBase(aDisplay, aPeer, aParent, aStyle)
|
|
60 |
{
|
|
61 |
}
|
|
62 |
|
|
63 |
|
|
64 |
// ---------------------------------------------------------------------------
|
|
65 |
// CSwtSortedList::ConstructL
|
|
66 |
// ---------------------------------------------------------------------------
|
|
67 |
//
|
|
68 |
void CSwtSortedList::ConstructL()
|
|
69 |
{
|
|
70 |
if ((iStyle & KSwtStyleDown) != 0)
|
|
71 |
{
|
|
72 |
iIsOrderDown = ETrue;
|
|
73 |
}
|
|
74 |
|
|
75 |
CSwtListBase::ConstructL();
|
|
76 |
}
|
|
77 |
|
|
78 |
|
|
79 |
// ---------------------------------------------------------------------------
|
|
80 |
// CSwtSortedList::Filter
|
|
81 |
// ---------------------------------------------------------------------------
|
|
82 |
//
|
|
83 |
CAknListBoxFilterItems* CSwtSortedList::Filter() const
|
|
84 |
{
|
|
85 |
// The model created by CSwtListBoxSingle or
|
|
86 |
// CSwtListBoxSingleGraphic is CAknFilteredTextListBoxModel.
|
|
87 |
CAknFilteredTextListBoxModel* model = STATIC_CAST(
|
|
88 |
CAknFilteredTextListBoxModel*,iList->Model());
|
|
89 |
ASSERT(model);
|
|
90 |
|
|
91 |
return model->Filter();
|
|
92 |
}
|
|
93 |
|
|
94 |
// ---------------------------------------------------------------------------
|
|
95 |
// CSwtSortedList::InsertItemL
|
|
96 |
// ---------------------------------------------------------------------------
|
|
97 |
//
|
|
98 |
void CSwtSortedList::InsertItemL(
|
|
99 |
const TDesC &aPtr,
|
|
100 |
CDesCArray* aItemArray,
|
|
101 |
TKeyCmpText aTextComparisonType)
|
|
102 |
{
|
|
103 |
ASSERT(aItemArray != NULL);
|
|
104 |
HBufC* itemText = CreateItemTextLC(aPtr);
|
|
105 |
if (!iIsOrderDown)
|
|
106 |
{
|
|
107 |
aItemArray->InsertIsqAllowDuplicatesL(*itemText, aTextComparisonType);
|
|
108 |
iTextItems->InsertIsqAllowDuplicatesL(aPtr, aTextComparisonType);
|
|
109 |
}
|
|
110 |
else
|
|
111 |
{
|
|
112 |
TInt ind(0);
|
|
113 |
for (ind = 0; ind < iTextItems->Count(); ind++)
|
|
114 |
{
|
|
115 |
if ((*iTextItems)[ind].CompareC(aPtr) < 0)
|
|
116 |
{
|
|
117 |
aItemArray->InsertL(ind, *itemText);
|
|
118 |
iTextItems->InsertL(ind, aPtr);
|
|
119 |
break;
|
|
120 |
}
|
|
121 |
}
|
|
122 |
// If no item in list or if the item must be appended at the end of the list
|
|
123 |
if (ind == iTextItems->Count())
|
|
124 |
{
|
|
125 |
aItemArray->AppendL(*itemText);
|
|
126 |
iTextItems->AppendL(aPtr);
|
|
127 |
}
|
|
128 |
}
|
|
129 |
CleanupStack::PopAndDestroy(itemText);
|
|
130 |
|
|
131 |
UpdateListMskL();
|
|
132 |
}
|
|
133 |
|
|
134 |
// ---------------------------------------------------------------------------
|
|
135 |
// CSwtSortedList::GetSelectionLC
|
|
136 |
// ---------------------------------------------------------------------------
|
|
137 |
//
|
|
138 |
CPtrCArray* CSwtSortedList::GetSelectionLC() const
|
|
139 |
{
|
|
140 |
const CArrayFix<TInt>* selectionIndexes = iList->View()->SelectionIndexes();
|
|
141 |
if (!selectionIndexes)
|
|
142 |
{
|
|
143 |
return NULL;
|
|
144 |
}
|
|
145 |
|
|
146 |
TInt nbSelection(selectionIndexes->Count());
|
|
147 |
|
|
148 |
CPtrCArray* selectedItemArray = new(ELeave) CPtrC16Array(KSwtArrayGranularity);
|
|
149 |
CleanupStack::PushL(selectedItemArray);
|
|
150 |
TInt selIndex;
|
|
151 |
CAknListBoxFilterItems* filter = NULL;
|
|
152 |
if (iSearchField)
|
|
153 |
{
|
|
154 |
filter = Filter();
|
|
155 |
}
|
|
156 |
for (TInt index=0; index<nbSelection; ++index)
|
|
157 |
{
|
|
158 |
selIndex = selectionIndexes->At(index);
|
|
159 |
if (selIndex >= 0 && selIndex < iTextItems->Count())
|
|
160 |
{
|
|
161 |
if (iSearchField && filter)
|
|
162 |
{
|
|
163 |
if (filter->FilteredNumberOfItems() > 0)// if there are visible items after filtering
|
|
164 |
{
|
|
165 |
selIndex = filter->FilteredItemIndex(selIndex);
|
|
166 |
selectedItemArray->AppendL((*iTextItems)[selIndex]);
|
|
167 |
}
|
|
168 |
}
|
|
169 |
else
|
|
170 |
{
|
|
171 |
selectedItemArray->AppendL((*iTextItems)[selIndex]);
|
|
172 |
}
|
|
173 |
}
|
|
174 |
}
|
|
175 |
return selectedItemArray;
|
|
176 |
}
|
|
177 |
|
|
178 |
// ---------------------------------------------------------------------------
|
|
179 |
// CSwtSortedList::HandleItemAdditionL
|
|
180 |
// ---------------------------------------------------------------------------
|
|
181 |
//
|
|
182 |
void CSwtSortedList::HandleItemAdditionL(TInt aNewFocusIndex)
|
|
183 |
{
|
|
184 |
ASSERT(iList->View());
|
|
185 |
ASSERT(iList->Model());
|
|
186 |
|
|
187 |
SetTextMaxWidth(ComputeTextMaxWidth());
|
|
188 |
|
|
189 |
if (iSearchField)
|
|
190 |
{
|
|
191 |
CAknListBoxFilterItems* filter = Filter();
|
|
192 |
ASSERT(filter);
|
|
193 |
filter->HandleItemArrayChangeL();
|
|
194 |
}
|
|
195 |
else
|
|
196 |
{
|
|
197 |
// S60 behavior: the new added item is the new focused item
|
|
198 |
// and becomes the top item
|
|
199 |
TInt newItemIndex(0);
|
|
200 |
if ((aNewFocusIndex >= 0) && (aNewFocusIndex < iList->Model()->NumberOfItems()))
|
|
201 |
{
|
|
202 |
newItemIndex = aNewFocusIndex;
|
|
203 |
}
|
|
204 |
|
|
205 |
iList->SetCurrentItemIndex(newItemIndex);
|
|
206 |
|
|
207 |
if (iList->CurrentItemIndex() >= 0)
|
|
208 |
{
|
|
209 |
iList->SetTopItemIndex(iList->CurrentItemIndex());
|
|
210 |
}
|
|
211 |
|
|
212 |
iList->HandleItemAdditionL();
|
|
213 |
}
|
|
214 |
|
|
215 |
// if we are in single selection, update the selection
|
|
216 |
// to be the same as the current item index.
|
|
217 |
if ((iStyle & KSwtStyleSingle) != 0)
|
|
218 |
{
|
|
219 |
iList->View()->UpdateSelectionL(CListBoxView::ESingleSelection);
|
|
220 |
}
|
|
221 |
|
|
222 |
UpdateListMskL();
|
|
223 |
}
|
|
224 |
|
|
225 |
// ---------------------------------------------------------------------------
|
|
226 |
// CSwtSortedList::HandleItemRemovalL
|
|
227 |
// ---------------------------------------------------------------------------
|
|
228 |
//
|
|
229 |
void CSwtSortedList::HandleItemRemovalL(
|
|
230 |
const RArray<TInt>& aRemovedItemIndices,
|
|
231 |
TInt aOldFocusIndex)
|
|
232 |
{
|
|
233 |
SetTextMaxWidth(ComputeTextMaxWidth());
|
|
234 |
|
|
235 |
TInt newFocusIndex(0);
|
|
236 |
if (aRemovedItemIndices.Count())
|
|
237 |
{
|
|
238 |
CalcFocusIndexAfterItemRemoval(
|
|
239 |
newFocusIndex,
|
|
240 |
aRemovedItemIndices,
|
|
241 |
aOldFocusIndex);
|
|
242 |
}
|
|
243 |
|
|
244 |
ASSERT((newFocusIndex == 0)
|
|
245 |
|| ((newFocusIndex > 0)
|
|
246 |
&& (newFocusIndex < iList->Model()->NumberOfItems())));
|
|
247 |
iList->SetCurrentItemIndex(newFocusIndex);
|
|
248 |
|
|
249 |
iList->HandleItemRemovalL();
|
|
250 |
|
|
251 |
// Filter update must happen after list update
|
|
252 |
if (iSearchField)
|
|
253 |
{
|
|
254 |
CAknListBoxFilterItems* filter = Filter();
|
|
255 |
ASSERT(filter);
|
|
256 |
filter->HandleItemArrayChangeL();
|
|
257 |
}
|
|
258 |
|
|
259 |
// if we are in single selection, update the selection
|
|
260 |
// to be the same as the current item index.
|
|
261 |
if ((iStyle & KSwtStyleSingle) != 0)
|
|
262 |
{
|
|
263 |
iList->View()->UpdateSelectionL(CListBoxView::ESingleSelection);
|
|
264 |
}
|
|
265 |
|
|
266 |
UpdateListMskL();
|
|
267 |
|
|
268 |
Redraw();
|
|
269 |
}
|
|
270 |
|
|
271 |
// ---------------------------------------------------------------------------
|
|
272 |
// CSwtSortedList::HandleOfferKeyEventL
|
|
273 |
// ---------------------------------------------------------------------------
|
|
274 |
//
|
|
275 |
void CSwtSortedList::HandleOfferKeyEventL()
|
|
276 |
{
|
|
277 |
if (iSearchField)
|
|
278 |
{
|
|
279 |
if (iStyle & KSwtStyleSingle)
|
|
280 |
{
|
|
281 |
const_cast<CListBoxView::CSelectionIndexArray*>(
|
|
282 |
iList->View()->SelectionIndexes())->Reset();
|
|
283 |
}
|
|
284 |
|
|
285 |
CAknListBoxFilterItems* filter = Filter();
|
|
286 |
ASSERT(filter);
|
|
287 |
filter->HandleOfferkeyEventL();
|
|
288 |
|
|
289 |
if ((iStyle & KSwtStyleSingle) && iTextItems->Count() > 0)
|
|
290 |
{
|
|
291 |
iList->View()->SelectItemL(0);
|
|
292 |
}
|
|
293 |
}
|
|
294 |
}
|
|
295 |
|
|
296 |
// ---------------------------------------------------------------------------
|
|
297 |
// CSwtSortedList::SearchFieldHeight
|
|
298 |
// ---------------------------------------------------------------------------
|
|
299 |
//
|
|
300 |
TInt CSwtSortedList::SearchFieldHeight() const
|
|
301 |
{
|
|
302 |
TInt searchHeight(0);
|
|
303 |
if (iSearchField)
|
|
304 |
{
|
|
305 |
searchHeight = CSwtLafFacade::GetLayoutRect(
|
|
306 |
CSwtLafFacade::EFindPane, BorderInnerRect()).Rect().Height();
|
|
307 |
}
|
|
308 |
return searchHeight;
|
|
309 |
}
|
|
310 |
|
|
311 |
// ---------------------------------------------------------------------------
|
|
312 |
// CSwtSortedList::GetSearchFieldPosition
|
|
313 |
// ---------------------------------------------------------------------------
|
|
314 |
//
|
|
315 |
void CSwtSortedList::GetSearchFieldPosition(TPoint& aPosition)
|
|
316 |
{
|
|
317 |
TRect controlRect(BorderInnerRect());
|
|
318 |
aPosition.iX = controlRect.iTl.iX;
|
|
319 |
aPosition.iY = Max(0, controlRect.iBr.iY - SearchFieldHeight());
|
|
320 |
}
|
|
321 |
|
|
322 |
// ---------------------------------------------------------------------------
|
|
323 |
// CSwtSortedList::SetSearchFieldSize
|
|
324 |
// ---------------------------------------------------------------------------
|
|
325 |
//
|
|
326 |
void CSwtSortedList::GetSearchFieldSize(TSize& aSize)
|
|
327 |
{
|
|
328 |
TRect controlRect(BorderInnerRect());
|
|
329 |
aSize.iWidth = controlRect.Width();
|
|
330 |
aSize.iHeight = Min(controlRect.Height(), SearchFieldHeight());
|
|
331 |
}
|
|
332 |
|
|
333 |
// ---------------------------------------------------------------------------
|
|
334 |
// CSwtSortedList::SetSearchFieldSize
|
|
335 |
// ---------------------------------------------------------------------------
|
|
336 |
//
|
|
337 |
void CSwtSortedList::UpdateSearchTextViewRect(const CAknSearchField* aSearchField)
|
|
338 |
{
|
|
339 |
if (aSearchField != NULL)
|
|
340 |
{
|
|
341 |
// Fix to display text cursor in Arabic layout
|
|
342 |
TAknLayoutId currentLayoutId;
|
|
343 |
CAknEnv::Static()->GetCurrentLayoutId(currentLayoutId);
|
|
344 |
if (currentLayoutId == EAknLayoutIdABRW)
|
|
345 |
{
|
|
346 |
CTextView* textView = aSearchField->Editor().TextView();
|
|
347 |
ASSERT(textView);
|
|
348 |
TRect viewRect(textView->ViewRect());
|
|
349 |
viewRect.iBr.iX += KSwtExtraWidthToDisplayCursorInArabicLayout;
|
|
350 |
textView->SetViewRect(viewRect);
|
|
351 |
}
|
|
352 |
}
|
|
353 |
}
|
|
354 |
|
|
355 |
// ---------------------------------------------------------------------------
|
|
356 |
// CSwtSortedList::UpdateSearchFieldBounds
|
|
357 |
// ---------------------------------------------------------------------------
|
|
358 |
//
|
|
359 |
void CSwtSortedList::UpdateSearchFieldBounds()
|
|
360 |
{
|
|
361 |
TPoint pos;
|
|
362 |
TSize size;
|
|
363 |
GetSearchFieldPosition(pos);
|
|
364 |
GetSearchFieldSize(size);
|
|
365 |
iSearchField->SetExtent(pos, size);
|
|
366 |
UpdateSearchTextViewRect(iSearchField);
|
|
367 |
}
|
|
368 |
|
|
369 |
// ---------------------------------------------------------------------------
|
|
370 |
// CSwtSortedList::UpdateSize
|
|
371 |
// From CSwtListBase
|
|
372 |
// ---------------------------------------------------------------------------
|
|
373 |
//
|
|
374 |
void CSwtSortedList::UpdateSize()
|
|
375 |
{
|
|
376 |
TRect controlRect(BorderInnerRect());
|
|
377 |
|
|
378 |
//Update the search field size if exists
|
|
379 |
TInt listHeight(controlRect.Height());
|
|
380 |
if (iSearchField != NULL)
|
|
381 |
{
|
|
382 |
listHeight = Max(0, listHeight - SearchFieldHeight());
|
|
383 |
UpdateSearchFieldBounds();
|
|
384 |
}
|
|
385 |
|
|
386 |
iList->SetSize(TSize(controlRect.Width(), listHeight));
|
|
387 |
}
|
|
388 |
|
|
389 |
// ---------------------------------------------------------------------------
|
|
390 |
// CSwtSortedList::CountComponentControls
|
|
391 |
// From CCoeControl
|
|
392 |
// ---------------------------------------------------------------------------
|
|
393 |
//
|
|
394 |
TInt CSwtSortedList::CountComponentControls() const
|
|
395 |
{
|
|
396 |
// The filter is orphaned to force its editor to draw CAknSearchField's
|
|
397 |
// background instead of our Shell's background.
|
|
398 |
return 1;
|
|
399 |
}
|
|
400 |
|
|
401 |
// ---------------------------------------------------------------------------
|
|
402 |
// CSwtSortedList::ComponentControl
|
|
403 |
// From CCoeControl
|
|
404 |
// ---------------------------------------------------------------------------
|
|
405 |
//
|
|
406 |
CCoeControl* CSwtSortedList::ComponentControl(TInt /*aIndex*/) const
|
|
407 |
{
|
|
408 |
// The filter is orphaned to force its editor to draw CAknSearchField's
|
|
409 |
// background instead of our Shell's background.
|
|
410 |
return iList;
|
|
411 |
}
|
|
412 |
|
|
413 |
// ---------------------------------------------------------------------------
|
|
414 |
// CSwtSortedList::MakeVisible
|
|
415 |
// From CCoeControl
|
|
416 |
// ---------------------------------------------------------------------------
|
|
417 |
//
|
|
418 |
void CSwtSortedList::MakeVisible(TBool aVisible)
|
|
419 |
{
|
|
420 |
CCoeControl::MakeVisible(aVisible);
|
|
421 |
FocusabilityChanged();
|
|
422 |
|
|
423 |
// WORKAROUND START
|
|
424 |
// There can be situations where the cursor is blinking even when the list
|
|
425 |
// is not focused. This is yet another slow down but there is no other way
|
|
426 |
// to avoid the strange behaviour. The cursor visibility setters are private.
|
|
427 |
// Unfocusing the search field will also hide the cursor :)
|
|
428 |
if (iSearchField && !IsFocused())
|
|
429 |
{
|
|
430 |
// Enforce no focus on the editor
|
|
431 |
iSearchField->Editor().SetFocus(EFalse);
|
|
432 |
}
|
|
433 |
// WORKAROUND END
|
|
434 |
}
|
|
435 |
|
|
436 |
// ---------------------------------------------------------------------------
|
|
437 |
// CSwtSortedList::SetDimmed
|
|
438 |
// From CCoeControl
|
|
439 |
// ---------------------------------------------------------------------------
|
|
440 |
//
|
|
441 |
void CSwtSortedList::SetDimmed(TBool aDimmed)
|
|
442 |
{
|
|
443 |
CCoeControl::SetDimmed(aDimmed);
|
|
444 |
iList->SetDimmed(aDimmed);
|
|
445 |
if (iSearchField)
|
|
446 |
{
|
|
447 |
iSearchField->SetDimmed(aDimmed);
|
|
448 |
}
|
|
449 |
FocusabilityChanged();
|
|
450 |
}
|
|
451 |
|
|
452 |
// ---------------------------------------------------------------------------
|
|
453 |
// CSwtSortedList::HandleResourceChange
|
|
454 |
// From CCoeControl
|
|
455 |
// ---------------------------------------------------------------------------
|
|
456 |
//
|
|
457 |
void CSwtSortedList::HandleResourceChange(TInt aType)
|
|
458 |
{
|
|
459 |
if (aType == KAknsMessageSkinChange)
|
|
460 |
{
|
|
461 |
TRAP_IGNORE(CreateIconArrayL(iList));
|
|
462 |
}
|
|
463 |
|
|
464 |
CAknControl::HandleResourceChange(aType);
|
|
465 |
}
|
|
466 |
|
|
467 |
// ---------------------------------------------------------------------------
|
|
468 |
// CSwtSortedList::HandlePointerEventL
|
|
469 |
// From CCoeControl
|
|
470 |
// ---------------------------------------------------------------------------
|
|
471 |
//
|
|
472 |
#ifdef RD_SCALABLE_UI_V2
|
|
473 |
void CSwtSortedList::HandlePointerEventL(const TPointerEvent& aPointerEvent)
|
|
474 |
{
|
|
475 |
// Check if we should start filter grabbing
|
|
476 |
if (aPointerEvent.iType == TPointerEvent::EButton1Down
|
|
477 |
&& !iFilterGrabsPointerEvents)
|
|
478 |
{
|
|
479 |
if (iSearchField && iSearchField->Rect().Contains(aPointerEvent.iPosition))
|
|
480 |
{
|
|
481 |
iFilterGrabsPointerEvents = ETrue;
|
|
482 |
}
|
|
483 |
}
|
|
484 |
|
|
485 |
// Deliver event to filter
|
|
486 |
if (iFilterGrabsPointerEvents)
|
|
487 |
{
|
|
488 |
if (iSearchField)
|
|
489 |
{
|
|
490 |
iSearchField->HandlePointerEventL(aPointerEvent);
|
|
491 |
}
|
|
492 |
}
|
|
493 |
|
|
494 |
// Check if we should stop filter grabbing
|
|
495 |
if (aPointerEvent.iType == TPointerEvent::EButton1Up
|
|
496 |
&& iFilterGrabsPointerEvents)
|
|
497 |
{
|
|
498 |
iFilterGrabsPointerEvents = EFalse;
|
|
499 |
}
|
|
500 |
|
|
501 |
// Deliver event to list
|
|
502 |
if (!iFilterGrabsPointerEvents)
|
|
503 |
{
|
|
504 |
CSwtListBase::HandlePointerEventL(aPointerEvent);
|
|
505 |
}
|
|
506 |
else
|
|
507 |
{
|
|
508 |
PostMouseEventL(aPointerEvent);
|
|
509 |
}
|
|
510 |
}
|
|
511 |
#endif //RD_SCALABLE_UI_V2
|
|
512 |
|
|
513 |
// ---------------------------------------------------------------------------
|
|
514 |
// CSwtSortedList::PositionChanged
|
|
515 |
// From CCoeControl
|
|
516 |
// ---------------------------------------------------------------------------
|
|
517 |
//
|
|
518 |
void CSwtSortedList::PositionChanged()
|
|
519 |
{
|
|
520 |
//Update the search field size if exists
|
|
521 |
if (iSearchField != NULL)
|
|
522 |
{
|
|
523 |
UpdateSearchFieldBounds();
|
|
524 |
}
|
|
525 |
CSwtListBase::PositionChanged();
|
|
526 |
}
|
|
527 |
|
|
528 |
// ---------------------------------------------------------------------------
|
|
529 |
// CSwtSortedList::FocusChanged
|
|
530 |
// From CCoeControl
|
|
531 |
// ---------------------------------------------------------------------------
|
|
532 |
//
|
|
533 |
void CSwtSortedList::FocusChanged(TDrawNow aDrawNow)
|
|
534 |
{
|
|
535 |
TBool isFocused = IsFocused();
|
|
536 |
if (iList)
|
|
537 |
{
|
|
538 |
#ifdef RD_JAVA_S60_RELEASE_9_2
|
|
539 |
EnableFocusHighlight(isFocused);
|
|
540 |
#endif //RD_JAVA_S60_RELEASE_9_2
|
|
541 |
iList->SetFocus(isFocused, aDrawNow);
|
|
542 |
if (iSearchField)
|
|
543 |
{
|
|
544 |
iSearchField->Editor().SetFocus(isFocused);
|
|
545 |
}
|
|
546 |
}
|
|
547 |
HandleFocusChanged(aDrawNow);
|
|
548 |
}
|
|
549 |
|
|
550 |
// ---------------------------------------------------------------------------
|
|
551 |
// CSwtSortedList::ClientRect
|
|
552 |
// From MSwtControl
|
|
553 |
// ---------------------------------------------------------------------------
|
|
554 |
//
|
|
555 |
TRect CSwtSortedList::ClientRect() const
|
|
556 |
{
|
|
557 |
return SbInnerRect(iList->Rect());
|
|
558 |
}
|
|
559 |
|
|
560 |
// ---------------------------------------------------------------------------
|
|
561 |
// CSwtSortedList::ComputeSizeL
|
|
562 |
// From MSwtControl
|
|
563 |
// ---------------------------------------------------------------------------
|
|
564 |
//
|
|
565 |
TSize CSwtSortedList::ComputeSizeL(TInt aWHint, TInt aHHint)
|
|
566 |
{
|
|
567 |
TSize preferredSize(aWHint, aHHint);
|
|
568 |
|
|
569 |
if (aWHint == KSwtDefault)
|
|
570 |
{
|
|
571 |
preferredSize.iWidth = PreferredWidth();
|
|
572 |
}
|
|
573 |
|
|
574 |
if (aHHint == KSwtDefault)
|
|
575 |
{
|
|
576 |
preferredSize.iHeight = PreferredHeight();
|
|
577 |
preferredSize.iHeight += SearchFieldHeight();
|
|
578 |
}
|
|
579 |
|
|
580 |
return preferredSize;
|
|
581 |
}
|
|
582 |
|
|
583 |
// ---------------------------------------------------------------------------
|
|
584 |
// CSwtSortedList::ProcessKeyEventL
|
|
585 |
// From MSwtControl
|
|
586 |
// ---------------------------------------------------------------------------
|
|
587 |
//
|
|
588 |
void CSwtSortedList::ProcessKeyEventL(
|
|
589 |
const TKeyEvent& aKeyEvent,
|
|
590 |
TEventCode aType)
|
|
591 |
{
|
|
592 |
if (iSearchField != NULL)
|
|
593 |
{
|
|
594 |
TKeyResponse keyResponse = iSearchField->OfferKeyEventL(aKeyEvent, aType);
|
|
595 |
if (keyResponse == EKeyWasConsumed)
|
|
596 |
{
|
|
597 |
HandleOfferKeyEventL();
|
|
598 |
return;
|
|
599 |
}
|
|
600 |
}
|
|
601 |
|
|
602 |
CSwtListBase::ProcessKeyEventL(aKeyEvent, aType);
|
|
603 |
}
|
|
604 |
|
|
605 |
#ifdef RD_JAVA_S60_RELEASE_9_2
|
|
606 |
// ---------------------------------------------------------------------------
|
|
607 |
// CSwtSortedList::EnableFocusHighlight
|
|
608 |
// From MSwtControl
|
|
609 |
// ---------------------------------------------------------------------------
|
|
610 |
//
|
|
611 |
void CSwtSortedList::EnableFocusHighlight(TBool aEnable)
|
|
612 |
{
|
|
613 |
ASSERT(iList);
|
|
614 |
ASSERT(iList->View());
|
|
615 |
|
|
616 |
CSwtListBoxLists::EnableFocusHighlight(iList->View()->ItemDrawer(),
|
|
617 |
aEnable);
|
|
618 |
}
|
|
619 |
#endif //RD_JAVA_S60_RELEASE_9_2
|
|
620 |
|
|
621 |
// ---------------------------------------------------------------------------
|
|
622 |
// CSwtSortedList::DoPaint
|
|
623 |
// From MSwtControl
|
|
624 |
// ---------------------------------------------------------------------------
|
|
625 |
//
|
|
626 |
void CSwtSortedList::DoPaint(const TRect& aRect) const
|
|
627 |
{
|
|
628 |
CSwtListBase::DoPaint(aRect);
|
|
629 |
|
|
630 |
// The filter is orphaned to force its editor to draw CAknSearchField's
|
|
631 |
// background instead of our Shell's background. Therefore drawing must
|
|
632 |
// be done 'manually'.
|
|
633 |
if (iSearchField)
|
|
634 |
{
|
|
635 |
CWindowGc& gc = SystemGc();
|
|
636 |
iSearchField->SetGc(&gc); // required by effects
|
|
637 |
iSearchField->DrawBackground(aRect);
|
|
638 |
iSearchField->DrawForeground(aRect);
|
|
639 |
DrawComponentControls(*iSearchField, aRect, gc, EFalse);
|
|
640 |
}
|
|
641 |
}
|
|
642 |
|
|
643 |
// ---------------------------------------------------------------------------
|
|
644 |
// CSwtSortedList::ComputeTrim
|
|
645 |
// From MSwtScrollable
|
|
646 |
// ---------------------------------------------------------------------------
|
|
647 |
//
|
|
648 |
void CSwtSortedList::ComputeTrim(TRect& aRect) const
|
|
649 |
{
|
|
650 |
// Add list rect with scroll bars
|
|
651 |
TRect outerRect(SbOuterRect(aRect));
|
|
652 |
aRect.SetRect(outerRect.iTl, outerRect.Size());
|
|
653 |
|
|
654 |
// Add the search field rect
|
|
655 |
if (iSearchField != NULL)
|
|
656 |
{
|
|
657 |
TSize searchFieldMinSize(TSize(0, SearchFieldHeight()));
|
|
658 |
TInt addWidth = searchFieldMinSize.iWidth - aRect.Width();
|
|
659 |
aRect.Resize(addWidth>0 ? addWidth:0, searchFieldMinSize.iHeight);
|
|
660 |
}
|
|
661 |
|
|
662 |
// Add the borders
|
|
663 |
TRect borderOuterRect(BorderOuterRect(aRect));
|
|
664 |
aRect.SetRect(borderOuterRect.iTl, borderOuterRect.Size());
|
|
665 |
}
|
|
666 |
|
|
667 |
// ---------------------------------------------------------------------------
|
|
668 |
// CSwtSortedList::AppendL
|
|
669 |
// From MSwtSortedList
|
|
670 |
// ---------------------------------------------------------------------------
|
|
671 |
//
|
|
672 |
void CSwtSortedList::AppendL(const TDesC& aPtr)
|
|
673 |
{
|
|
674 |
ASSERT(iTextItems);
|
|
675 |
|
|
676 |
CPtrCArray* selectedItemArray = GetSelectionLC();
|
|
677 |
|
|
678 |
InsertItemL(aPtr, STATIC_CAST(CDesCArray*, iList->Model()->ItemTextArray()));
|
|
679 |
|
|
680 |
SetSelectionL(selectedItemArray);
|
|
681 |
CleanupStack::PopAndDestroy(selectedItemArray);
|
|
682 |
|
|
683 |
HandleItemAdditionL(iTextItems->Count()-1);
|
|
684 |
}
|
|
685 |
|
|
686 |
// ---------------------------------------------------------------------------
|
|
687 |
// CSwtSortedList::GetFocusedItem
|
|
688 |
// From MSwtSortedList
|
|
689 |
// ---------------------------------------------------------------------------
|
|
690 |
//
|
|
691 |
void CSwtSortedList::GetFocusedItem(TPtrC& aItem) const
|
|
692 |
{
|
|
693 |
if (iList->Model()->NumberOfItems() == 0)
|
|
694 |
{
|
|
695 |
return;
|
|
696 |
}
|
|
697 |
|
|
698 |
// Get focused item index
|
|
699 |
TInt focusedItem = GetFocusIndex();
|
|
700 |
|
|
701 |
// If filter is active, it is neccessary to recalculate index
|
|
702 |
if (iSearchField)
|
|
703 |
{
|
|
704 |
CAknListBoxFilterItems* filter = Filter();
|
|
705 |
ASSERT(filter);
|
|
706 |
// At least one filtered item is visible
|
|
707 |
if (filter->FilteredNumberOfItems() > 0)
|
|
708 |
{
|
|
709 |
// Update index and get item string
|
|
710 |
focusedItem = filter->FilteredItemIndex(focusedItem);
|
|
711 |
aItem.Set((*iTextItems)[focusedItem]);
|
|
712 |
}
|
|
713 |
else
|
|
714 |
{
|
|
715 |
// When nothing is selected, function returns null-string
|
|
716 |
aItem.Set(KNullDesC);
|
|
717 |
}
|
|
718 |
}
|
|
719 |
else
|
|
720 |
{
|
|
721 |
// Get focused item string
|
|
722 |
aItem.Set((*iTextItems)[focusedItem]);
|
|
723 |
}
|
|
724 |
}
|
|
725 |
|
|
726 |
// ---------------------------------------------------------------------------
|
|
727 |
// CSwtSortedList::GetItemHeight
|
|
728 |
// From MSwtSortedList
|
|
729 |
// ---------------------------------------------------------------------------
|
|
730 |
//
|
|
731 |
TInt CSwtSortedList::GetItemHeight() const
|
|
732 |
{
|
|
733 |
return iList->ItemHeight();
|
|
734 |
}
|
|
735 |
|
|
736 |
// ---------------------------------------------------------------------------
|
|
737 |
// CSwtSortedList::GetSelectionCount
|
|
738 |
// From MSwtSortedList
|
|
739 |
// ---------------------------------------------------------------------------
|
|
740 |
//
|
|
741 |
TInt CSwtSortedList::GetSelectionCount() const
|
|
742 |
{
|
|
743 |
return CSwtListBase::GetSelectionCount();
|
|
744 |
}
|
|
745 |
|
|
746 |
// ---------------------------------------------------------------------------
|
|
747 |
// CSwtSortedList::GetSelectionL
|
|
748 |
// From MSwtSortedList
|
|
749 |
// ---------------------------------------------------------------------------
|
|
750 |
//
|
|
751 |
CPtrCArray* CSwtSortedList::GetSelectionL() const
|
|
752 |
{
|
|
753 |
CPtrCArray* selectedItemArray = GetSelectionLC();
|
|
754 |
CleanupStack::Pop(selectedItemArray);
|
|
755 |
return selectedItemArray;
|
|
756 |
}
|
|
757 |
|
|
758 |
// ---------------------------------------------------------------------------
|
|
759 |
// CSwtSortedList::RemoveAllL
|
|
760 |
// From MSwtSortedList
|
|
761 |
// ---------------------------------------------------------------------------
|
|
762 |
//
|
|
763 |
void CSwtSortedList::RemoveAllL()
|
|
764 |
{
|
|
765 |
if (iTextItems->Count() == 0)
|
|
766 |
{
|
|
767 |
return;
|
|
768 |
}
|
|
769 |
|
|
770 |
CDesCArray* itemTextArray = static_cast<CDesCArray*>(iList->Model()->ItemTextArray());
|
|
771 |
itemTextArray->Reset();
|
|
772 |
iTextItems->Reset();
|
|
773 |
|
|
774 |
if (iRemovedItemIndices.Count() > 0)
|
|
775 |
{
|
|
776 |
iRemovedItemIndices.Reset();
|
|
777 |
}
|
|
778 |
HandleItemRemovalL(iRemovedItemIndices, 0);
|
|
779 |
iRemovedItemIndices.Reset();
|
|
780 |
}
|
|
781 |
|
|
782 |
// ---------------------------------------------------------------------------
|
|
783 |
// CSwtSortedList::RemoveL
|
|
784 |
// From MSwtSortedList
|
|
785 |
// ---------------------------------------------------------------------------
|
|
786 |
//
|
|
787 |
TBool CSwtSortedList::RemoveL(const HBufC& aPtr)
|
|
788 |
{
|
|
789 |
TInt itemPos;
|
|
790 |
TInt res = iTextItems->Find(aPtr, itemPos, ECmpCollated);
|
|
791 |
if (res)
|
|
792 |
{
|
|
793 |
// String not found in list
|
|
794 |
return ETrue;
|
|
795 |
}
|
|
796 |
|
|
797 |
TInt currentItemIndex(iList->CurrentItemIndex());
|
|
798 |
|
|
799 |
CDesCArray* itemTextArray = static_cast<CDesCArray*>(iList->Model()->ItemTextArray());
|
|
800 |
itemTextArray->Delete(itemPos);
|
|
801 |
iTextItems->Delete(itemPos);
|
|
802 |
|
|
803 |
if (iRemovedItemIndices.Count() > 0)
|
|
804 |
{
|
|
805 |
iRemovedItemIndices.Reset();
|
|
806 |
}
|
|
807 |
iRemovedItemIndices.Append(itemPos);
|
|
808 |
HandleItemRemovalL(iRemovedItemIndices, currentItemIndex);
|
|
809 |
iRemovedItemIndices.Reset();
|
|
810 |
return EFalse;
|
|
811 |
}
|
|
812 |
|
|
813 |
// ---------------------------------------------------------------------------
|
|
814 |
// CSwtSortedList::Scrollable
|
|
815 |
// From MSwtSortedList
|
|
816 |
// ---------------------------------------------------------------------------
|
|
817 |
//
|
|
818 |
MSwtScrollable* CSwtSortedList::Scrollable()
|
|
819 |
{
|
|
820 |
return this;
|
|
821 |
}
|
|
822 |
|
|
823 |
// ---------------------------------------------------------------------------
|
|
824 |
// CSwtSortedList::SelectItemL
|
|
825 |
// From MSwtSortedList
|
|
826 |
// ---------------------------------------------------------------------------
|
|
827 |
//
|
|
828 |
TBool CSwtSortedList::SelectItemL(const TDesC* aString)
|
|
829 |
{
|
|
830 |
if (aString == NULL)
|
|
831 |
{
|
|
832 |
if (iList->View()->SelectionIndexes()->Count() > 0)
|
|
833 |
{
|
|
834 |
iList->ClearSelection();
|
|
835 |
UpdateListMskL();
|
|
836 |
return EFalse;
|
|
837 |
}
|
|
838 |
else
|
|
839 |
{
|
|
840 |
return ETrue;
|
|
841 |
}
|
|
842 |
}
|
|
843 |
|
|
844 |
TInt itemPos;
|
|
845 |
TInt res = iTextItems->Find(*aString, itemPos, ECmpCollated);
|
|
846 |
if (res)
|
|
847 |
{
|
|
848 |
// String not found in list
|
|
849 |
return ETrue;
|
|
850 |
}
|
|
851 |
|
|
852 |
if (iSearchField)
|
|
853 |
{
|
|
854 |
CAknListBoxFilterItems* filter = Filter();
|
|
855 |
ASSERT(filter);
|
|
856 |
itemPos = filter->VisibleItemIndex(itemPos);
|
|
857 |
if (itemPos < 0) // Item not visible do nothing
|
|
858 |
{
|
|
859 |
return EFalse;
|
|
860 |
}
|
|
861 |
}
|
|
862 |
|
|
863 |
if (iList->View()->ItemIsSelected(itemPos))
|
|
864 |
{
|
|
865 |
// Already selected
|
|
866 |
return EFalse;
|
|
867 |
}
|
|
868 |
|
|
869 |
if (iStyle & KSwtStyleMulti)
|
|
870 |
{
|
|
871 |
iList->View()->SelectItemL(itemPos);
|
|
872 |
UpdateListMskL();
|
|
873 |
}
|
|
874 |
else
|
|
875 |
{
|
|
876 |
TInt old = iList->CurrentItemIndex();
|
|
877 |
|
|
878 |
// We do not call CEikListBox::SetCurrentItemIndex, because we do not want to scroll.
|
|
879 |
iList->View()->SetCurrentItemIndex(itemPos);
|
|
880 |
iList->View()->UpdateSelectionL(CListBoxView::ESingleSelection);
|
|
881 |
if (old != -1)
|
|
882 |
{
|
|
883 |
iList->View()->DrawItem(old);
|
|
884 |
}
|
|
885 |
}
|
|
886 |
|
|
887 |
return EFalse;
|
|
888 |
}
|
|
889 |
|
|
890 |
// ---------------------------------------------------------------------------
|
|
891 |
// CSwtSortedList::SetItemsL
|
|
892 |
// From MSwtSortedList
|
|
893 |
// ---------------------------------------------------------------------------
|
|
894 |
//
|
|
895 |
void CSwtSortedList::SetItemsL(MDesCArray* aStringArray)
|
|
896 |
{
|
|
897 |
if (iList)
|
|
898 |
{
|
|
899 |
ASSERT(aStringArray);
|
|
900 |
|
|
901 |
// We remove the old selection
|
|
902 |
iList->ClearSelection();
|
|
903 |
|
|
904 |
// Reset the text items
|
|
905 |
iTextItems->Reset();
|
|
906 |
|
|
907 |
CDesCArray* itemArray = new(ELeave) CDesCArrayFlat(aStringArray->MdcaCount());
|
|
908 |
CleanupStack::PushL(itemArray);
|
|
909 |
|
|
910 |
for (TInt i = 0; i < aStringArray->MdcaCount(); ++i)
|
|
911 |
{
|
|
912 |
// The item is inserted in both iTextItems and itemArray
|
|
913 |
InsertItemL(aStringArray->MdcaPoint(i), itemArray);
|
|
914 |
}
|
|
915 |
|
|
916 |
iList->Model()->SetItemTextArray(itemArray);
|
|
917 |
CleanupStack::Pop(itemArray);
|
|
918 |
|
|
919 |
HandleItemAdditionL(0);
|
|
920 |
|
|
921 |
Redraw();
|
|
922 |
}
|
|
923 |
}
|
|
924 |
|
|
925 |
// ---------------------------------------------------------------------------
|
|
926 |
// CSwtSortedList::SetModeStyleL
|
|
927 |
// From MSwtSortedList
|
|
928 |
// This function should be called only once.
|
|
929 |
// It creates the filter if the SortedList has the FILTER style.
|
|
930 |
// ---------------------------------------------------------------------------
|
|
931 |
//
|
|
932 |
void CSwtSortedList::SetModeStyleL(TInt aModeStyle)
|
|
933 |
{
|
|
934 |
iModeStyle = aModeStyle;
|
|
935 |
|
|
936 |
if ((iModeStyle & ESwtFilter) != 0)
|
|
937 |
{
|
|
938 |
iSearchField = CAknSearchField::NewL(*this,
|
|
939 |
CAknSearchField::EAdaptiveSearch, NULL, KSwtSearchFieldTextLimit);
|
|
940 |
iSearchField->Editor().AddEdwinObserverL(this);
|
|
941 |
|
|
942 |
// Orphane the filter to force its editor to draw CAknSearchField's
|
|
943 |
// background instead of our Shell's background.
|
|
944 |
iSearchField->SetParent(NULL);
|
|
945 |
|
|
946 |
iSearchField->AddAdaptiveSearchTextObserverL(this);
|
|
947 |
iSearchField->SetComponentsToInheritVisibility(ETrue);
|
|
948 |
|
|
949 |
// Set search field to use only second column to get
|
|
950 |
// item text. Items use \t as column separators, see method
|
|
951 |
// CSwtListBase::CreateItemTextLC() for details.
|
|
952 |
const int KItemTextColumnFlag = 2;
|
|
953 |
iSearchField->SetListColumnFilterFlags(KItemTextColumnFlag);
|
|
954 |
|
|
955 |
CAknFilteredTextListBoxModel* model = STATIC_CAST(
|
|
956 |
CAknFilteredTextListBoxModel*, iList->Model());
|
|
957 |
ASSERT(model);
|
|
958 |
if (!model->Filter())
|
|
959 |
{
|
|
960 |
model->CreateFilterL(iList, iSearchField);
|
|
961 |
}
|
|
962 |
}
|
|
963 |
}
|
|
964 |
|
|
965 |
// ---------------------------------------------------------------------------
|
|
966 |
// CSwtSortedList::SetSelectionL
|
|
967 |
// From MSwtSortedList
|
|
968 |
// ---------------------------------------------------------------------------
|
|
969 |
//
|
|
970 |
void CSwtSortedList::SetSelectionL(MDesCArray* aStringArray)
|
|
971 |
{
|
|
972 |
ASSERT(aStringArray != NULL);
|
|
973 |
|
|
974 |
TInt pos;
|
|
975 |
TInt granularity(KSwtArrayGranularity);
|
|
976 |
TInt nbSelection(aStringArray->MdcaCount());
|
|
977 |
TKeyArrayFix keyArray(0, ECmpTUint);
|
|
978 |
|
|
979 |
if (nbSelection == 0 || iTextItems->Count() == 0)
|
|
980 |
{
|
|
981 |
return;
|
|
982 |
}
|
|
983 |
|
|
984 |
CArrayFixFlat<TInt>* selectionIndexes = new(ELeave) CArrayFixFlat<TInt>(granularity);
|
|
985 |
CleanupStack::PushL(selectionIndexes);
|
|
986 |
CAknListBoxFilterItems* filter = NULL;
|
|
987 |
if (iSearchField)
|
|
988 |
{
|
|
989 |
filter = Filter();
|
|
990 |
}
|
|
991 |
for (TInt numString=0; numString < nbSelection; ++numString)
|
|
992 |
{
|
|
993 |
if (iTextItems->Find(aStringArray->MdcaPoint(numString), pos, ECmpCollated) == 0)
|
|
994 |
{
|
|
995 |
if (iSearchField && filter)
|
|
996 |
{
|
|
997 |
pos = filter->VisibleItemIndex(pos);
|
|
998 |
}
|
|
999 |
if (pos != -1)
|
|
1000 |
{
|
|
1001 |
selectionIndexes->InsertIsqL(pos, keyArray);
|
|
1002 |
}
|
|
1003 |
}
|
|
1004 |
}
|
|
1005 |
|
|
1006 |
iList->ClearSelection();
|
|
1007 |
|
|
1008 |
// No selected index is found, return.
|
|
1009 |
if (selectionIndexes->Count() > 0)
|
|
1010 |
{
|
|
1011 |
TInt old = iList->CurrentItemIndex();
|
|
1012 |
// If more than one index is selected and List is Single-select, return
|
|
1013 |
if (!((iStyle & KSwtStyleSingle) && (selectionIndexes->Count() > 1)))
|
|
1014 |
{
|
|
1015 |
iList->View()->SetSelectionIndexesL(selectionIndexes);
|
|
1016 |
}
|
|
1017 |
iList->SetCurrentItemIndex(selectionIndexes->At(0));
|
|
1018 |
iList->View()->DrawItem(selectionIndexes->At(0));
|
|
1019 |
if (old != -1)
|
|
1020 |
{
|
|
1021 |
iList->View()->DrawItem(old);
|
|
1022 |
}
|
|
1023 |
}
|
|
1024 |
|
|
1025 |
CleanupStack::PopAndDestroy(selectionIndexes);
|
|
1026 |
|
|
1027 |
UpdateListMskL();
|
|
1028 |
}
|
|
1029 |
|
|
1030 |
// ---------------------------------------------------------------------------
|
|
1031 |
// CSwtSortedList::ShowSelection
|
|
1032 |
// From MSwtSortedList
|
|
1033 |
// ---------------------------------------------------------------------------
|
|
1034 |
//
|
|
1035 |
void CSwtSortedList::ShowSelection()
|
|
1036 |
{
|
|
1037 |
CSwtListBase::ShowSelection();
|
|
1038 |
}
|
|
1039 |
|
|
1040 |
// ---------------------------------------------------------------------------
|
|
1041 |
// CSwtSortedList::HandleEdwinEventL
|
|
1042 |
// From MEikEdwinObserver
|
|
1043 |
// ---------------------------------------------------------------------------
|
|
1044 |
//
|
|
1045 |
void CSwtSortedList::HandleEdwinEventL(CEikEdwin* /*aEdwin*/, TEdwinEvent aEventType)
|
|
1046 |
{
|
|
1047 |
if (aEventType == EEventTextUpdate)
|
|
1048 |
{
|
|
1049 |
HandleOfferKeyEventL();
|
|
1050 |
}
|
|
1051 |
}
|
|
1052 |
|
|
1053 |
// ---------------------------------------------------------------------------
|
|
1054 |
// CSwtSortedList::AdaptiveSearchTextChanged
|
|
1055 |
// From MAdaptiveSearchTextObserver
|
|
1056 |
// ---------------------------------------------------------------------------
|
|
1057 |
//
|
|
1058 |
void CSwtSortedList::AdaptiveSearchTextChanged(CAknSearchField* /*aSearchField*/)
|
|
1059 |
{
|
|
1060 |
TRAP_IGNORE(HandleOfferKeyEventL());
|
|
1061 |
}
|
|
1062 |
|