|
1 /* |
|
2 * Copyright (c) 2002 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: CCalenWeekListbox is the class that customizes drawing |
|
15 * part of CEikFormattedCellListBox. |
|
16 * |
|
17 */ |
|
18 |
|
19 //debug |
|
20 #include "calendarui_debug.h" |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "calenweeklistbox.h" |
|
24 |
|
25 #include "calendrawutils.h" |
|
26 #include <calenagendautils.h> |
|
27 #include "calenweekcallback.h" |
|
28 #include "calenweekcontainer.h" |
|
29 #include "calenweekdata.h" |
|
30 #include "calenweeklistboxdata.h" |
|
31 #include "calenweeklistboxitemdrawer.h" |
|
32 #include "calenweeklistboxview.h" |
|
33 #include "calenweeklistboxlayout.h" |
|
34 |
|
35 #include <AknLayoutFont.h> |
|
36 #include <aknlists.h> |
|
37 #include <AknIconUtils.h> |
|
38 #include <AknsControlContext.h> |
|
39 #include <AknsDrawUtils.h> |
|
40 #include <AknUtils.h> |
|
41 #include <gulicon.h> |
|
42 #include <calenviewutils.h> |
|
43 #include <aknlayoutscalable_apps.cdl.h> |
|
44 |
|
45 // ======== LOCAL FUNCTIONS ======== |
|
46 |
|
47 // --------------------------------------------------------- |
|
48 // SetupWeekHourCellL |
|
49 // Sets subcell properties for week hour cell |
|
50 // --------------------------------------------------------- |
|
51 // |
|
52 static void SetupWeekHourCellL( CFormattedCellListBoxItemDrawer* aItemDrawer, TWeekListBoxLayout& aWeekLayout) |
|
53 { |
|
54 TRACE_ENTRY_POINT; |
|
55 |
|
56 TInt KSubCell = 0; // hour cell is first subcell |
|
57 |
|
58 TAknLayoutText hourTextLayout = aWeekLayout.HourTextLayout(); |
|
59 TRect subCellRect = aWeekLayout.HourSubCellRect_in_ListItemRect(); |
|
60 // We use text rect from layout as subcell rect, so margins are zero! |
|
61 TMargins margins = { 0, 0, 0, 0 }; |
|
62 |
|
63 const CFont* font = hourTextLayout.Font(); |
|
64 // Baseline calculation idea is copied fromTAknLayoutText::LayoutText |
|
65 const CAknLayoutFont* layoutFont = CAknLayoutFont::AsCAknLayoutFontOrNull( font ); |
|
66 TInt baseline = 0; |
|
67 if ( layoutFont ) |
|
68 { |
|
69 baseline = layoutFont->TextPaneTopToBaseline(); |
|
70 } |
|
71 else |
|
72 { |
|
73 baseline = font->AscentInPixels(); |
|
74 } |
|
75 |
|
76 // Set subcell properties |
|
77 aItemDrawer->FormattedCellData()->SetSubCellFontL( KSubCell, font ); |
|
78 aItemDrawer->FormattedCellData()->SetSubCellMarginsL( KSubCell, margins ); |
|
79 aItemDrawer->FormattedCellData()->SetSubCellAlignmentL( KSubCell, hourTextLayout.Align() ); |
|
80 aItemDrawer->FormattedCellData()->SetSubCellPositionL( KSubCell, subCellRect.iTl ); |
|
81 aItemDrawer->FormattedCellData()->SetSubCellSizeL( KSubCell, subCellRect.Size() ); |
|
82 aItemDrawer->FormattedCellData()->SetSubCellBaselinePosL(KSubCell, baseline ); |
|
83 |
|
84 // Set colors |
|
85 TRgb textColor = hourTextLayout.Color(); |
|
86 |
|
87 AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), textColor, |
|
88 KAknsIIDQsnTextColors, |
|
89 EAknsCIQsnTextColorsCG23); |
|
90 |
|
91 CFormattedCellListBoxData::TColors colors; |
|
92 |
|
93 //FIXME: this is hack for extended skinning. It seems to be difficult to pass and use |
|
94 // correct colors in LBItemDrawer and LBData. |
|
95 aItemDrawer->SetTextColor( textColor ); |
|
96 |
|
97 colors.iText = textColor; |
|
98 colors.iBack = aItemDrawer->BackColor(); |
|
99 colors.iHighlightedText = aItemDrawer->HighlightedTextColor(); |
|
100 colors.iHighlightedBack = aItemDrawer->HighlightedBackColor(); |
|
101 aItemDrawer->FormattedCellData()->SetSubCellColorsL( KSubCell, colors ); |
|
102 |
|
103 TRACE_EXIT_POINT; |
|
104 } |
|
105 |
|
106 |
|
107 // --------------------------------------------------------- |
|
108 // SetupWeekGridCellL |
|
109 // Sets subcell properties for week grid cells |
|
110 // --------------------------------------------------------- |
|
111 // |
|
112 static void SetupWeekGridCellL(CFormattedCellListBoxData* aListboxData, |
|
113 TInt aSubcellIndex, // Subcell index |
|
114 TRect aSubcellRect // subcell rect relative to list item |
|
115 ) |
|
116 { |
|
117 TRACE_ENTRY_POINT; |
|
118 |
|
119 // As week grid subcell doesn't have margins, it is easy to setup |
|
120 TMargins margins = { 0, 0, 0, 0 }; |
|
121 aListboxData->SetSubCellMarginsL( aSubcellIndex, margins); |
|
122 aListboxData->SetGraphicsSubCellL( aSubcellIndex, ETrue); |
|
123 aListboxData->SetSubCellPositionL( aSubcellIndex, aSubcellRect.iTl); |
|
124 aListboxData->SetSubCellSizeL( aSubcellIndex, aSubcellRect.Size()); |
|
125 aListboxData->SetSubCellAlignmentL(aSubcellIndex, CGraphicsContext::ECenter); |
|
126 |
|
127 TRACE_EXIT_POINT; |
|
128 } |
|
129 |
|
130 |
|
131 // ================= MEMBER FUNCTIONS ======================= |
|
132 |
|
133 // C++ default constructor can NOT contain any code, that |
|
134 // might leave. |
|
135 // |
|
136 CCalenWeekListbox::CCalenWeekListbox(CCalenWeekContainer& aWeekContainer) |
|
137 : iWeekContainer( aWeekContainer ) |
|
138 { |
|
139 TRACE_ENTRY_POINT; |
|
140 TRACE_EXIT_POINT; |
|
141 } |
|
142 |
|
143 // Symbian OS default constructor can leave. |
|
144 void CCalenWeekListbox::ConstructL( |
|
145 const CCoeControl* aParent |
|
146 ) |
|
147 { |
|
148 TRACE_ENTRY_POINT; |
|
149 |
|
150 CEikFormattedCellListBox::ConstructL(aParent, 0); |
|
151 CCalenWeekLBData* data = |
|
152 static_cast<CCalenWeekLBData*>( ItemDrawer()->FormattedCellData() ); |
|
153 data->SetHighlightAnimBackgroundDrawer( static_cast<CCalenWeekLBView*>(iView) ); |
|
154 |
|
155 TRACE_EXIT_POINT; |
|
156 } |
|
157 |
|
158 |
|
159 // Destructor |
|
160 CCalenWeekListbox::~CCalenWeekListbox() |
|
161 { |
|
162 TRACE_ENTRY_POINT; |
|
163 TRACE_EXIT_POINT; |
|
164 } |
|
165 |
|
166 // --------------------------------------------------------- |
|
167 // CCalenWeekListbox::SetCursorObserver |
|
168 // Set cursor handling class |
|
169 // (other items were commented in a header). |
|
170 // --------------------------------------------------------- |
|
171 // |
|
172 void CCalenWeekListbox::SetCursorObserver |
|
173 (MCalenWeekCursorObserver* aCursorObsever) // A observer pointer |
|
174 { |
|
175 TRACE_ENTRY_POINT; |
|
176 |
|
177 iCursorObsever = aCursorObsever; |
|
178 |
|
179 TRACE_EXIT_POINT; |
|
180 } |
|
181 |
|
182 // --------------------------------------------------------- |
|
183 // CCalenWeekListbox::SetStartDay |
|
184 // Set the start of a week |
|
185 // (other items were commented in a header). |
|
186 // --------------------------------------------------------- |
|
187 // |
|
188 void CCalenWeekListbox::SetStartDay(TTime aStartDay) |
|
189 { |
|
190 TRACE_ENTRY_POINT; |
|
191 |
|
192 iStartDay = aStartDay; |
|
193 |
|
194 TRACE_EXIT_POINT; |
|
195 } |
|
196 |
|
197 // --------------------------------------------------------- |
|
198 // CCalenWeekListbox::OfferKeyEventL |
|
199 // handles key events. |
|
200 // (other items were commented in a header). |
|
201 // --------------------------------------------------------- |
|
202 // |
|
203 TKeyResponse CCalenWeekListbox::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) |
|
204 { |
|
205 TRACE_ENTRY_POINT; |
|
206 |
|
207 TKeyResponse res(EKeyWasNotConsumed); |
|
208 TBool mirrored(AknLayoutUtils::LayoutMirrored()); |
|
209 |
|
210 if (aType == EEventKey) |
|
211 { |
|
212 switch(aKeyEvent.iCode) |
|
213 { |
|
214 case EKeyLeftArrow: |
|
215 if (mirrored) |
|
216 { |
|
217 HandleRightArrowKeyL(CListBoxView::ENoSelection); |
|
218 } |
|
219 else |
|
220 { |
|
221 HandleLeftArrowKeyL(CListBoxView::ENoSelection); |
|
222 } |
|
223 res = EKeyWasConsumed; |
|
224 break; |
|
225 case EKeyRightArrow: |
|
226 if (mirrored) |
|
227 { |
|
228 HandleLeftArrowKeyL(CListBoxView::ENoSelection); |
|
229 } |
|
230 else |
|
231 { |
|
232 HandleRightArrowKeyL(CListBoxView::ENoSelection); |
|
233 } |
|
234 res = EKeyWasConsumed; |
|
235 break; |
|
236 case EKeyUpArrow: |
|
237 #ifdef SUPPORT_NAVISCROLL_EVENTS |
|
238 case EKeyPrevious: |
|
239 #endif |
|
240 res = CEikListBox::OfferKeyEventL(aKeyEvent, aType); |
|
241 if (iCursorObsever) |
|
242 { |
|
243 iCursorObsever->CursorMovedL( |
|
244 MCalenWeekCursorObserver::ECalenUp); |
|
245 } |
|
246 break; |
|
247 case EKeyDownArrow: |
|
248 #ifdef SUPPORT_NAVISCROLL_EVENTS |
|
249 case EKeyNext: |
|
250 #endif |
|
251 res = CEikListBox::OfferKeyEventL(aKeyEvent, aType); |
|
252 if (iCursorObsever) |
|
253 { |
|
254 iCursorObsever->CursorMovedL( |
|
255 MCalenWeekCursorObserver::ECalenDown); |
|
256 } |
|
257 break; |
|
258 default: |
|
259 res = CEikListBox::OfferKeyEventL(aKeyEvent, aType); |
|
260 break; |
|
261 } |
|
262 } |
|
263 |
|
264 TRACE_EXIT_POINT; |
|
265 return res; |
|
266 } |
|
267 |
|
268 TTypeUid::Ptr CCalenWeekListbox::MopSupplyObject(TTypeUid aId) |
|
269 { |
|
270 TRACE_ENTRY_POINT; |
|
271 |
|
272 // FormattedCellListBox function skipped intentioanlly as it intercepts |
|
273 // background contexts (and we want to provide our own BG context). |
|
274 if( aId.iUid == MAknsControlContext::ETypeId ) |
|
275 { |
|
276 MAknsControlContext* cc = AknsDrawUtils::ControlContextOfParent( this ); |
|
277 if ( cc ) |
|
278 { |
|
279 TRACE_EXIT_POINT; |
|
280 return MAknsControlContext::SupplyMopObject( aId, cc ); |
|
281 } |
|
282 } |
|
283 |
|
284 TRACE_EXIT_POINT; |
|
285 return CCoeControl::MopSupplyObject( aId ); |
|
286 } |
|
287 |
|
288 // --------------------------------------------------------- |
|
289 // CCalenWeekListbox::SetupLayoutL |
|
290 // Set all cell data |
|
291 // (other items were commented in a header). |
|
292 // --------------------------------------------------------- |
|
293 // |
|
294 void CCalenWeekListbox::SetupLayoutL() |
|
295 { |
|
296 TRACE_ENTRY_POINT; |
|
297 |
|
298 TRect rect = iWeekContainer.ReducePreview( iWeekContainer.Rect() ); |
|
299 TWeekListBoxLayout lay( iWeekContainer.UseInfobar(), |
|
300 iWeekContainer.UseToolbar(), |
|
301 iWeekContainer.UsePreview(), |
|
302 rect |
|
303 ); |
|
304 |
|
305 SetItemHeightL( lay.ListItemHeight() ); |
|
306 |
|
307 // Hour subcell layout |
|
308 SetupWeekHourCellL( ItemDrawer(), lay ); |
|
309 |
|
310 // Grid subcell layouts |
|
311 CFormattedCellListBoxData* listBoxData = ItemDrawer()->FormattedCellData(); |
|
312 for (TInt loop(1); loop < KCalenDaysInWeek + 1; ++loop) |
|
313 { |
|
314 TRect gridCellRect = lay.GridSubCellRect_in_ListItemRect(loop - 1); |
|
315 SetupWeekGridCellL( listBoxData, loop, gridCellRect ); |
|
316 } |
|
317 |
|
318 // Icon sizes |
|
319 TInt KFirst = 0; // just fetch layout for first item |
|
320 TRect firstCellRect = lay.GridSubCellRect_in_ListItemRect(KFirst); |
|
321 TAknLayoutRect iconLayout; |
|
322 TInt layoutVariant = lay.LayoutVariantIndex(TWeekListBoxLayout::ECellCaleWeekPaneG2); |
|
323 iconLayout.LayoutRect( firstCellRect /*P:cell_cale_week_pane*/, |
|
324 AknLayoutScalable_Apps::cell_cale_week_pane_g2(layoutVariant).LayoutLine() ); |
|
325 CalenDrawUtils::SetIconSizes( |
|
326 iconLayout, ItemDrawer()->FormattedCellData()->IconArray()); |
|
327 |
|
328 // Colors and misc stuff |
|
329 SetSubcellColorsL(); |
|
330 |
|
331 CCalenWeekLBData* celData = static_cast<CCalenWeekLBData*>( ItemDrawer()->FormattedCellData() ); |
|
332 celData->SetCelCount( KCalenDaysInWeek + 1 ); |
|
333 celData->SetVariantIndex(layoutVariant); |
|
334 |
|
335 TRACE_EXIT_POINT; |
|
336 } |
|
337 |
|
338 // --------------------------------------------------------- |
|
339 // CCalenWeekListbox::SetSubcellColorsL |
|
340 // Set a Background color for all subcells |
|
341 // (other items were commented in a header). |
|
342 // --------------------------------------------------------- |
|
343 // |
|
344 void CCalenWeekListbox::SetSubcellColorsL() const |
|
345 { |
|
346 TRACE_ENTRY_POINT; |
|
347 |
|
348 // FIXME: investigate, if this is needed anymore at all. |
|
349 for (TInt loop(0); loop < KCalenDaysInWeek; ++loop) |
|
350 { |
|
351 CFormattedCellListBoxItemDrawer* itemDrawer = ItemDrawer(); |
|
352 CFormattedCellListBoxData::TColors colors; |
|
353 colors.iText = itemDrawer->TextColor(); |
|
354 colors.iBack = itemDrawer->BackColor(); |
|
355 colors.iHighlightedText = itemDrawer->HighlightedTextColor(); |
|
356 colors.iHighlightedBack = itemDrawer->HighlightedBackColor(); |
|
357 itemDrawer->FormattedCellData()->SetSubCellColorsL(loop + 1, colors); |
|
358 } |
|
359 |
|
360 TRACE_EXIT_POINT; |
|
361 } |
|
362 |
|
363 // --------------------------------------------------------- |
|
364 // CCalenWeekListbox::CreateItemDrawerL |
|
365 // Create CColumnListBoxData and CColumnListBoxItemDrawer. |
|
366 // (other items were commented in a header). |
|
367 // --------------------------------------------------------- |
|
368 // |
|
369 void CCalenWeekListbox::CreateItemDrawerL() |
|
370 { |
|
371 TRACE_ENTRY_POINT; |
|
372 |
|
373 CCalenWeekLBData* listboxData = CCalenWeekLBData::NewL(); |
|
374 CleanupStack::PushL( listboxData ); |
|
375 iItemDrawer = new(ELeave) CCalenWeekListBoxItemDrawer( |
|
376 Model(), |
|
377 iEikonEnv->NormalFont(), |
|
378 listboxData); |
|
379 CleanupStack::Pop(); // listboxData |
|
380 |
|
381 TRACE_EXIT_POINT; |
|
382 } |
|
383 |
|
384 // --------------------------------------------------------- |
|
385 // CCalenWeekListbox::MakeViewClassInstanceL |
|
386 // Create ListBoxView class |
|
387 // (other items were commented in a header). |
|
388 // --------------------------------------------------------- |
|
389 // |
|
390 CListBoxView* CCalenWeekListbox::MakeViewClassInstanceL() |
|
391 { |
|
392 TRACE_ENTRY_POINT; |
|
393 |
|
394 TRACE_EXIT_POINT; |
|
395 return (new(ELeave) CCalenWeekLBView); |
|
396 } |
|
397 |
|
398 // --------------------------------------------------------- |
|
399 // CCalenWeekListbox::HandleLeftArrowKeyL |
|
400 // Called when Left arrow key was pressed |
|
401 // (other items were commented in a header). |
|
402 // --------------------------------------------------------- |
|
403 // |
|
404 void CCalenWeekListbox::HandleLeftArrowKeyL(CListBoxView::TSelectionMode aSelectionMode) |
|
405 { |
|
406 TRACE_ENTRY_POINT; |
|
407 |
|
408 TKeyResponse res(EKeyWasNotConsumed); |
|
409 if (iCursorObsever) |
|
410 { |
|
411 res = iCursorObsever->CursorMovedL(MCalenWeekCursorObserver::ECalenLeft); |
|
412 } |
|
413 if (res == EKeyWasNotConsumed) |
|
414 { |
|
415 iView->MoveCursorL(CListBoxView::ECursorPreviousColumn, |
|
416 aSelectionMode); |
|
417 ClearMatchBuffer(); |
|
418 } |
|
419 |
|
420 TRACE_EXIT_POINT; |
|
421 } |
|
422 |
|
423 // --------------------------------------------------------- |
|
424 // CCalenWeekListbox::HandleRightArrowKeyL |
|
425 // Called when Right arrow key was pressed |
|
426 // (other items were commented in a header). |
|
427 // --------------------------------------------------------- |
|
428 // |
|
429 void CCalenWeekListbox::HandleRightArrowKeyL(CListBoxView::TSelectionMode aSelectionMode) |
|
430 { |
|
431 TRACE_ENTRY_POINT; |
|
432 |
|
433 TKeyResponse res(EKeyWasNotConsumed); |
|
434 if (iCursorObsever) |
|
435 { |
|
436 res = iCursorObsever->CursorMovedL(MCalenWeekCursorObserver::ECalenRight); |
|
437 } |
|
438 if (res == EKeyWasNotConsumed) |
|
439 { |
|
440 iView->MoveCursorL(CListBoxView::ECursorNextColumn, aSelectionMode); |
|
441 ClearMatchBuffer(); |
|
442 } |
|
443 |
|
444 TRACE_EXIT_POINT; |
|
445 } |
|
446 |
|
447 // --------------------------------------------------------- |
|
448 // CCalenWeekListbox::SizeChanged |
|
449 // Initilizes ListBox cell |
|
450 // (other items were commented in a header). |
|
451 // --------------------------------------------------------- |
|
452 // |
|
453 void CCalenWeekListbox::SizeChanged() |
|
454 { |
|
455 TRACE_ENTRY_POINT; |
|
456 |
|
457 AknListBoxLayouts::SetupStandardFormListbox( ItemDrawer() ); |
|
458 |
|
459 PIM_TRAPD_HANDLE( SetupLayoutL() ); |
|
460 |
|
461 CEikFormattedCellListBox::SizeChanged(); |
|
462 |
|
463 TRACE_EXIT_POINT; |
|
464 } |
|
465 |
|
466 // --------------------------------------------------------- |
|
467 // CCalenWeekListbox::SetBgContext |
|
468 // |
|
469 // (other items were commented in a header). |
|
470 // --------------------------------------------------------- |
|
471 // |
|
472 void CCalenWeekListbox::SetBgContext(MAknsControlContext* aCc) |
|
473 { |
|
474 TRACE_ENTRY_POINT; |
|
475 |
|
476 iBgContext = aCc; |
|
477 |
|
478 TRACE_EXIT_POINT; |
|
479 } |
|
480 |
|
481 TRect CCalenWeekListbox::LayoutRect() const |
|
482 { |
|
483 TRACE_ENTRY_POINT; |
|
484 |
|
485 TRect rect = iWeekContainer.ReducePreview( iWeekContainer.Rect() ); |
|
486 TWeekListBoxLayout weekLayout( iWeekContainer.UseInfobar(), |
|
487 iWeekContainer.UseToolbar(), |
|
488 iWeekContainer.UsePreview(), |
|
489 rect ); |
|
490 |
|
491 TRACE_EXIT_POINT; |
|
492 return weekLayout.ListBoxRect(); |
|
493 } |
|
494 |
|
495 |
|
496 // --------------------------------------------------------- |
|
497 // CCalenWeekListbox::IsValidPointer |
|
498 // Checks if pointer event happened in valid area |
|
499 // (other items were commented in a header). |
|
500 // --------------------------------------------------------- |
|
501 // |
|
502 TBool CCalenWeekListbox::IsValidPointer(TPoint aPos) |
|
503 { |
|
504 TRACE_ENTRY_POINT; |
|
505 |
|
506 TWeekListBoxLayout lay( iWeekContainer.UseInfobar(), |
|
507 iWeekContainer.UseToolbar(), |
|
508 iWeekContainer.UsePreview(), |
|
509 // iWeekContainer.Rect() |
|
510 iWeekContainer.ReducePreview(iWeekContainer.Rect())); |
|
511 |
|
512 TRACE_EXIT_POINT; |
|
513 return lay.WeekGridRect().Contains(aPos); |
|
514 } |
|
515 |
|
516 // --------------------------------------------------------- |
|
517 // CCalenWeekListbox::PointerEventColumn |
|
518 // Calculates new column from pointer event (touch ui) |
|
519 // (other items were commented in a header). |
|
520 // --------------------------------------------------------- |
|
521 // |
|
522 TInt CCalenWeekListbox::PointerEventColumn(TPoint aPos) |
|
523 { |
|
524 TRACE_ENTRY_POINT; |
|
525 |
|
526 TRect rect = iWeekContainer.ReducePreview( iWeekContainer.Rect() ); |
|
527 TWeekListBoxLayout lay( iWeekContainer.UseInfobar(), |
|
528 iWeekContainer.UseToolbar(), |
|
529 iWeekContainer.UsePreview(), |
|
530 rect ); |
|
531 |
|
532 TInt cellWidth(lay.WeekGridRect().Width() / KCalenDaysInWeek); |
|
533 if((lay.WeekGridRect().Width() % KCalenDaysInWeek) > KCalenDaysInWeek/2) |
|
534 { |
|
535 ++cellWidth; |
|
536 } |
|
537 |
|
538 TRACE_EXIT_POINT; |
|
539 return ((aPos.iX - lay.WeekGridRect().iTl.iX) / cellWidth); |
|
540 } |
|
541 |
|
542 // --------------------------------------------------------- |
|
543 // CCalenWeekListbox::HandlePointerEventL |
|
544 // (other items were commented in a header). |
|
545 // --------------------------------------------------------- |
|
546 // |
|
547 void CCalenWeekListbox::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
|
548 { |
|
549 TRACE_ENTRY_POINT; |
|
550 |
|
551 if(AknLayoutUtils::PenEnabled()) |
|
552 { |
|
553 TInt newColumn = PointerEventColumn(aPointerEvent.iPosition); |
|
554 TInt pointerIndex(-1); |
|
555 TBool isItem (View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex)); |
|
556 |
|
557 if(!isItem) // to handle scroll if drag out side of listbox |
|
558 CEikListBox::HandlePointerEventL(aPointerEvent); |
|
559 else if(newColumn >= 0 && newColumn < KCalenDaysInWeek) |
|
560 { |
|
561 iCursorObsever->PointerMovedL(newColumn); |
|
562 CEikListBox::HandlePointerEventL(aPointerEvent); |
|
563 } |
|
564 } |
|
565 |
|
566 TRACE_EXIT_POINT; |
|
567 } |
|
568 |
|
569 |
|
570 // End of File |