equal
deleted
inserted
replaced
71 |
71 |
72 #include <touchfeedback.h> |
72 #include <touchfeedback.h> |
73 #include <akncollection.h> |
73 #include <akncollection.h> |
74 #include <aknitemactionmenu.h> |
74 #include <aknitemactionmenu.h> |
75 #include <aknlongtapdetector.h> |
75 #include <aknlongtapdetector.h> |
76 #include <aknpriv.hrh> |
76 #include <AknPriv.hrh> |
77 #include "akntrace.h" |
77 #include "akntrace.h" |
78 |
78 |
79 // timeout for long keypress used in markable lists |
79 // timeout for long keypress used in markable lists |
80 const TInt KLongPressInterval = 600000; // 0,6 seconds |
80 const TInt KLongPressInterval = 600000; // 0,6 seconds |
81 const TInt KEikListBoxPointerRepeatInterval = 100000; // in micro conds (= 0.1 secod) |
81 const TInt KEikListBoxPointerRepeatInterval = 100000; // in micro conds (= 0.1 secod) |
2425 CreateViewL(); |
2425 CreateViewL(); |
2426 |
2426 |
2427 if(iItemDrawer && (iItemDrawer->MinimumCellSize().iHeight != 0)) |
2427 if(iItemDrawer && (iItemDrawer->MinimumCellSize().iHeight != 0)) |
2428 iItemHeight = iItemDrawer->MinimumCellSize().iHeight; |
2428 iItemHeight = iItemDrawer->MinimumCellSize().iHeight; |
2429 |
2429 |
2430 CheckCreateExtensionL(); |
|
2431 |
|
2432 if ( iListBoxExt->iLongTapDetector |
2430 if ( iListBoxExt->iLongTapDetector |
2433 && iListBoxFlags & EDisableItemSpecificMenu ) |
2431 && iListBoxFlags & EDisableItemSpecificMenu ) |
2434 { |
2432 { |
2435 delete iListBoxExt->iLongTapDetector; |
2433 delete iListBoxExt->iLongTapDetector; |
2436 iListBoxExt->iLongTapDetector = NULL; |
2434 iListBoxExt->iLongTapDetector = NULL; |
4611 TInt oldCurrentItemIndex; |
4609 TInt oldCurrentItemIndex; |
4612 TBool listEmpty = !ItemExists( iView->TopItemIndex() ); |
4610 TBool listEmpty = !ItemExists( iView->TopItemIndex() ); |
4613 |
4611 |
4614 // Handle empty list area events |
4612 // Handle empty list area events |
4615 if ( aPointerEvent.iType == TPointerEvent::EButton1Up && |
4613 if ( aPointerEvent.iType == TPointerEvent::EButton1Up && |
4616 !iListBoxExt->iScrolling && !iListBoxExt->iIsDownOnItem ) |
4614 !iListBoxExt->iScrolling ) |
4617 { |
4615 { |
4618 if ( listEmpty ) |
4616 if ( listEmpty ) |
4619 { |
4617 { |
4620 // No items, empty list was clicked |
4618 // No items, empty list was clicked |
4621 ReportListBoxEventL( MEikListBoxObserver::EEventEmptyListClicked ); |
4619 ReportListBoxEventL( MEikListBoxObserver::EEventEmptyListClicked ); |
4649 { |
4647 { |
4650 iListBoxExt->EnableHighlight( EFalse ); |
4648 iListBoxExt->EnableHighlight( EFalse ); |
4651 iView->DrawItem( iView->CurrentItemIndex() ); |
4649 iView->DrawItem( iView->CurrentItemIndex() ); |
4652 } |
4650 } |
4653 |
4651 |
4654 iListBoxExt->iFeedbackType = ETouchFeedbackList; |
4652 iListBoxExt->iFeedbackType = ETouchFeedbackBasicItem; |
4655 |
4653 |
4656 if ( itemIndex != iView->CurrentItemIndex() || |
4654 if ( itemIndex != iView->CurrentItemIndex() || |
4657 iListBoxFlags & ES60StyleMultiselection ) |
4655 iListBoxFlags & ES60StyleMultiselection ) |
4658 { |
4656 { |
4659 iListBoxExt->iFeedbackType = ETouchFeedbackSensitiveList; |
4657 iListBoxExt->iFeedbackType = ETouchFeedbackSensitiveItem; |
4660 } |
4658 } |
4661 |
4659 |
4662 if ( iListBoxExt->iPhysics && |
4660 if ( iListBoxExt->iPhysics && |
4663 iListBoxExt->iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking ) |
4661 iListBoxExt->iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking ) |
4664 { |
4662 { |
4665 iListBoxExt->iFeedbackType = ETouchFeedbackList; |
4663 iListBoxExt->iFeedbackType = ETouchFeedbackBasicItem; |
4666 } |
4664 } |
4667 |
4665 |
4668 if ( !iListBoxExt->iPhysics || itemIndex == iView->CurrentItemIndex() ) |
4666 if ( !iListBoxExt->iPhysics || itemIndex == iView->CurrentItemIndex() ) |
4669 { |
4667 { |
4670 iListBoxExt->ImmediateFeedback( iListBoxExt->iFeedbackType, |
4668 iListBoxExt->ImmediateFeedback( iListBoxExt->iFeedbackType, |
4989 |
4987 |
4990 case TPointerEvent::EButton1Up: |
4988 case TPointerEvent::EButton1Up: |
4991 _AKNTRACE("TPointerEvent::EButton1Up"); |
4989 _AKNTRACE("TPointerEvent::EButton1Up"); |
4992 if ( iListBoxExt->FeedbackEnabledOnUpEvent() && iListBoxExt->iClickEventsAllowed ) |
4990 if ( iListBoxExt->FeedbackEnabledOnUpEvent() && iListBoxExt->iClickEventsAllowed ) |
4993 { |
4991 { |
4994 TTouchLogicalFeedback fbType = ETouchFeedbackList; |
4992 TTouchLogicalFeedback fbType = ETouchFeedbackBasicItem; |
4995 if ( iListBoxFlags & ES60StyleMultiselection ) |
4993 if ( iListBoxFlags & ES60StyleMultiselection ) |
4996 { |
4994 { |
4997 fbType = ETouchFeedbackCheckbox; |
4995 fbType = ETouchFeedbackCheckbox; |
4998 } |
4996 } |
4999 iListBoxExt->ImmediateFeedback( fbType, |
4997 iListBoxExt->ImmediateFeedback( fbType, |
6236 ( newListTopPos <= 0 && newListTopPos + viewHeight >= 0 && newListLastItemPos > viewHeight ) ) |
6234 ( newListTopPos <= 0 && newListTopPos + viewHeight >= 0 && newListLastItemPos > viewHeight ) ) |
6237 { |
6235 { |
6238 if ( CAknPhysics::EAknPhysicsActionFlicking == iListBoxExt->iPhysics->OngoingPhysicsAction() || |
6236 if ( CAknPhysics::EAknPhysicsActionFlicking == iListBoxExt->iPhysics->OngoingPhysicsAction() || |
6239 CAknPhysics::EAknPhysicsActionBouncing == iListBoxExt->iPhysics->OngoingPhysicsAction() ) |
6237 CAknPhysics::EAknPhysicsActionBouncing == iListBoxExt->iPhysics->OngoingPhysicsAction() ) |
6240 { |
6238 { |
6241 iListBoxExt->ImmediateFeedback( ETouchFeedbackSensitiveList, |
6239 iListBoxExt->ImmediateFeedback( ETouchFeedbackSensitiveItem, |
6242 TTouchFeedbackType( ETouchFeedbackVibra ), |
6240 TTouchFeedbackType( ETouchFeedbackVibra ), |
6243 TPointerEvent() ); |
6241 TPointerEvent() ); |
6244 } |
6242 } |
6245 else if ( CAknPhysics::EAknPhysicsActionDragging == iListBoxExt->iPhysics->OngoingPhysicsAction() ) |
6243 else if ( CAknPhysics::EAknPhysicsActionDragging == iListBoxExt->iPhysics->OngoingPhysicsAction() ) |
6246 { |
6244 { |
6354 tappedItemIndex ); |
6352 tappedItemIndex ); |
6355 if ( iListBoxExt->iIsDownOnItem ) |
6353 if ( iListBoxExt->iIsDownOnItem ) |
6356 { |
6354 { |
6357 iListBoxExt->iLastDownTappedItem = tappedItemIndex; |
6355 iListBoxExt->iLastDownTappedItem = tappedItemIndex; |
6358 iListBoxExt->iMarkingDisabled = ETrue; |
6356 iListBoxExt->iMarkingDisabled = ETrue; |
6359 iListBoxFlags|=ELeftDownInViewRect; |
|
6360 blockEvent = ETrue; |
6357 blockEvent = ETrue; |
6361 } |
6358 } |
6362 } |
6359 } |
6363 } |
6360 } |
6364 else |
6361 else |