equal
deleted
inserted
replaced
850 iHighlightTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
850 iHighlightTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
851 } |
851 } |
852 iItemsInSingleLine = 1; |
852 iItemsInSingleLine = 1; |
853 iFeedback = MTouchFeedback::Instance(); |
853 iFeedback = MTouchFeedback::Instance(); |
854 |
854 |
855 iItemActionMenu = CAknItemActionMenu::RegisterCollectionL( *this ); |
855 iItemActionMenu = CAknItemActionMenu::RegisterCollectionL( *this, &iListBox ); |
856 |
856 |
857 if ( !( iListBox.iListBoxFlags & CEikListBox::EDisableItemSpecificMenu ) |
857 if ( !( iListBox.iListBoxFlags & CEikListBox::EDisableItemSpecificMenu ) |
858 && iItemActionMenu ) |
858 && iItemActionMenu ) |
859 { |
859 { |
860 iLongTapDetector = CAknLongTapDetector::NewL( this ); |
860 iLongTapDetector = CAknLongTapDetector::NewL( this ); |
1077 // |
1077 // |
1078 void CListBoxExt::LongTapPointerEventL( const TPointerEvent& aPointerEvent ) |
1078 void CListBoxExt::LongTapPointerEventL( const TPointerEvent& aPointerEvent ) |
1079 { |
1079 { |
1080 if ( iSingleClickEnabled && iLongTapDetector && iItemActionMenu ) |
1080 if ( iSingleClickEnabled && iLongTapDetector && iItemActionMenu ) |
1081 { |
1081 { |
1082 // Send event on down only if item specific items were found |
1082 // Send event on down only if item specific items were found and current |
1083 if ( aPointerEvent.iType != TPointerEvent::EButton1Down |
1083 // item is marked if there are marked items |
1084 || iItemActionMenu->InitMenuL() ) |
1084 if ( !( MarkedItems() && |
|
1085 !iListBox.View()->ItemIsSelected( iListBox.CurrentItemIndex() ) ) |
|
1086 && ( aPointerEvent.iType != TPointerEvent::EButton1Down |
|
1087 || iItemActionMenu->InitMenuL() ) ) |
1085 { |
1088 { |
1086 iLongTapDetector->PointerEventL ( aPointerEvent ); |
1089 iLongTapDetector->PointerEventL ( aPointerEvent ); |
1087 } |
1090 } |
1088 } |
1091 } |
1089 } |
1092 } |
1719 // |
1722 // |
1720 TBool CListBoxExt::FeedbackEnabledOnUpEvent() |
1723 TBool CListBoxExt::FeedbackEnabledOnUpEvent() |
1721 { |
1724 { |
1722 _AKNTRACE_FUNC_ENTER; |
1725 _AKNTRACE_FUNC_ENTER; |
1723 TBool enabled( EFalse ); |
1726 TBool enabled( EFalse ); |
1724 if ( ( iListBox.iItemDrawer->Flags() & CListItemDrawer::EPressedDownState ) && |
1727 |
1725 !iFlickStopped ) |
1728 if ( ( iListBox.iItemDrawer->Flags() & CListItemDrawer::EPressedDownState |
|
1729 || iSingleClickEnabled ) && !iFlickStopped ) |
1726 { |
1730 { |
1727 enabled = ETrue; |
1731 enabled = ETrue; |
1728 } |
1732 } |
1729 _AKNTRACE_FUNC_EXIT; |
1733 _AKNTRACE_FUNC_EXIT; |
1730 return enabled; |
1734 return enabled; |
4684 iListBoxExt->EnableHighlight( EFalse ); |
4688 iListBoxExt->EnableHighlight( EFalse ); |
4685 iView->DrawItem( iView->CurrentItemIndex() ); |
4689 iView->DrawItem( iView->CurrentItemIndex() ); |
4686 } |
4690 } |
4687 |
4691 |
4688 iListBoxExt->iFeedbackType = ETouchFeedbackList; |
4692 iListBoxExt->iFeedbackType = ETouchFeedbackList; |
4689 |
4693 |
4690 if ( itemIndex != iView->CurrentItemIndex() || |
4694 if ( iListBoxFlags & ES60StyleMultiselection || |
4691 iListBoxFlags & ES60StyleMultiselection ) |
4695 ( !iListBoxExt->iSingleClickEnabled && |
|
4696 itemIndex != iView->CurrentItemIndex() ) ) |
4692 { |
4697 { |
4693 iListBoxExt->iFeedbackType = ETouchFeedbackSensitiveList; |
4698 iListBoxExt->iFeedbackType = ETouchFeedbackSensitiveList; |
4694 } |
4699 } |
4695 |
4700 |
4696 if ( iListBoxExt->iPhysics && |
4701 if ( iListBoxExt->iPhysics && |
4830 { |
4835 { |
4831 iListBoxExt->EnableHighlight( ETrue, ETrue ); |
4836 iListBoxExt->EnableHighlight( ETrue, ETrue ); |
4832 UpdateHighlightL( itemIndex ); |
4837 UpdateHighlightL( itemIndex ); |
4833 CCoeEnv::Static()->WsSession().Finish(); |
4838 CCoeEnv::Static()->WsSession().Finish(); |
4834 } |
4839 } |
4835 if ( itemIndex != oldCurrentItemIndex ) |
4840 |
4836 { |
4841 iListBoxExt->ImmediateFeedback( |
4837 iListBoxExt->ImmediateFeedback( |
4842 iListBoxExt->iFeedbackType, |
4838 iListBoxExt->iFeedbackType, |
4843 TTouchFeedbackType( ETouchFeedbackVibra | |
4839 TTouchFeedbackType( ETouchFeedbackVibra | |
4844 ETouchFeedbackAudio ), |
4840 ETouchFeedbackAudio ), |
4845 aPointerEvent ); |
4841 aPointerEvent ); |
4846 |
4842 } |
|
4843 if ( !wasFlicking ) |
4847 if ( !wasFlicking ) |
4844 { |
4848 { |
4845 ReportListBoxEventL( |
4849 ReportListBoxEventL( |
4846 MEikListBoxObserver::EEventPenDownOnItem ); |
4850 MEikListBoxObserver::EEventPenDownOnItem ); |
4847 iListBoxExt->LongTapPointerEventL( aPointerEvent ); |
4851 iListBoxExt->LongTapPointerEventL( aPointerEvent ); |
6215 // CEikListBox::DisableItemSpecificMenu |
6219 // CEikListBox::DisableItemSpecificMenu |
6216 // --------------------------------------------------------------------------- |
6220 // --------------------------------------------------------------------------- |
6217 // |
6221 // |
6218 EXPORT_C void CEikListBox::DisableItemSpecificMenu() |
6222 EXPORT_C void CEikListBox::DisableItemSpecificMenu() |
6219 { |
6223 { |
|
6224 _AKNTRACE_FUNC_ENTER; |
6220 if ( iListBoxExt ) |
6225 if ( iListBoxExt ) |
6221 { |
6226 { |
6222 iListBoxExt->DisableItemSpecificMenu(); |
6227 iListBoxExt->DisableItemSpecificMenu(); |
6223 } |
6228 } |
6224 } |
6229 _AKNTRACE_FUNC_EXIT; |
6225 |
6230 } |
|
6231 |
|
6232 // --------------------------------------------------------------------------- |
|
6233 // CEikListBox::IsHighlightEnabled |
|
6234 // --------------------------------------------------------------------------- |
|
6235 // |
|
6236 EXPORT_C TBool CEikListBox::IsHighlightEnabled() |
|
6237 { |
|
6238 _AKNTRACE_FUNC_ENTER; |
|
6239 TBool enabled( EFalse ); |
|
6240 if ( !( iItemDrawer->Flags() & CListItemDrawer::EDisableHighlight ) ) |
|
6241 { |
|
6242 if ( iListBoxExt->iSingleClickEnabled ) |
|
6243 { |
|
6244 enabled = !( iItemDrawer->Flags() |
|
6245 & CListItemDrawer::ESingleClickDisabledHighlight ); |
|
6246 } |
|
6247 else |
|
6248 { |
|
6249 enabled = ETrue; |
|
6250 } |
|
6251 } |
|
6252 _AKNTRACE_FUNC_EXIT; |
|
6253 return enabled; |
|
6254 } |
6226 |
6255 |
6227 void CEikListBox::ScrollView( const TInt aOffset, TBool aDrawNow ) |
6256 void CEikListBox::ScrollView( const TInt aOffset, TBool aDrawNow ) |
6228 { |
6257 { |
6229 _AKNTRACE_FUNC_ENTER; |
6258 _AKNTRACE_FUNC_ENTER; |
6230 #ifdef _DEBUG |
6259 #ifdef _DEBUG |