610 iMarqueeAdapter->StopMarqueeDrawing(); |
610 iMarqueeAdapter->StopMarqueeDrawing(); |
611 } |
611 } |
612 |
612 |
613 TInt index = KErrNotFound; |
613 TInt index = KErrNotFound; |
614 TBool itemExists = iWidget->View()->XYPosToItemIndex( aPointerEvent.iPosition, index ); |
614 TBool itemExists = iWidget->View()->XYPosToItemIndex( aPointerEvent.iPosition, index ); |
615 |
615 |
616 if ( iLongTapDetector ) |
616 if ( iLongTapDetector ) |
617 { |
617 { |
618 if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) |
618 if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) |
619 { |
619 { |
620 iLongTapDetector->EnableLongTapAnimation( itemExists && |
620 iLongTapDetector->EnableLongTapAnimation( itemExists && |
731 // |
731 // |
732 EXPORT_C void CMmWidgetContainer::SetHighlightVisibilityL( TBool aEnable ) |
732 EXPORT_C void CMmWidgetContainer::SetHighlightVisibilityL( TBool aEnable ) |
733 { |
733 { |
734 // activate the model |
734 // activate the model |
735 CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); |
735 CHnSuiteModel* suiteModel = GetMmModel()->GetSuiteModel(); |
736 |
|
737 if ( suiteModel ) |
736 if ( suiteModel ) |
738 { |
737 { |
739 suiteModel->SetActiveL( aEnable ); |
738 suiteModel->SetActiveL( aEnable ); |
740 } |
739 } |
|
740 |
|
741 if ( ( !!aEnable != !!iPreviousHighlightVisibility ) // Ex-OR |
|
742 || ( !!aEnable != !!IsHighlightVisible() ) ) // Ex-OR |
|
743 { |
741 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
744 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
742 MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( |
745 MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( |
743 iDrawer->Gc() ); |
746 iDrawer->Gc() ); |
744 #endif |
747 #endif |
745 if ( !aEnable ) |
748 if ( !aEnable ) |
746 { |
749 { |
747 iWidget->View()->ItemDrawer()->SetFlags( |
750 iWidget->View()->ItemDrawer()->SetFlags( |
748 CListItemDrawer::ESingleClickDisabledHighlight ); |
751 CListItemDrawer::ESingleClickDisabledHighlight ); |
749 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
752 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
750 if ( transApi ) |
753 if ( transApi ) |
751 { |
754 { |
752 transApi->Remove( MAknListBoxTfxInternal::EListHighlight ); |
755 transApi->Remove( MAknListBoxTfxInternal::EListHighlight ); |
753 } |
756 } |
754 #endif |
757 #endif |
755 } |
758 } |
756 else |
759 else |
757 { |
760 { |
758 iWidget->View()->ItemDrawer()->ClearFlags( |
761 iWidget->View()->ItemDrawer()->ClearFlags( |
759 CListItemDrawer::ESingleClickDisabledHighlight ); |
762 CListItemDrawer::ESingleClickDisabledHighlight ); |
760 } |
763 } |
761 |
764 |
762 if ( IsVisible() ) |
765 if ( IsVisible() ) |
763 { |
766 { |
764 TInt highlight = GetHighlight(); |
767 TInt highlight = GetHighlight(); |
765 CListBoxView* view = Widget()->View(); |
768 CListBoxView* view = Widget()->View(); |
766 Widget()->DrawNow( TRect( view->ItemPos( highlight ), |
769 Widget()->DrawNow( TRect( view->ItemPos( highlight ), |
767 view->ItemSize( highlight ) ) ); |
770 view->ItemSize( highlight ) ) ); |
|
771 } |
|
772 iPreviousHighlightVisibility = aEnable; |
768 } |
773 } |
769 } |
774 } |
770 |
775 |
771 // ----------------------------------------------------------------------------- |
776 // ----------------------------------------------------------------------------- |
772 // |
777 // |
773 // ---------------------------------------------------------------------------- |
778 // ---------------------------------------------------------------------------- |
774 // |
779 // |
775 EXPORT_C TBool CMmWidgetContainer::IsHighlightVisible() |
780 EXPORT_C TBool CMmWidgetContainer::IsHighlightVisible() |
776 { |
781 { |
777 return !( iWidget->View()->ItemDrawer()->Flags() & |
782 return !( iWidget->View()->ItemDrawer()->Flags() & |
778 CListItemDrawer::ESingleClickDisabledHighlight ); |
783 CListItemDrawer::ESingleClickDisabledHighlight ); |
779 } |
784 } |
780 |
785 |
781 // ----------------------------------------------------------------------------- |
786 // ----------------------------------------------------------------------------- |
782 // |
787 // |