126 // ----------------------------------------------------------------------------- |
126 // ----------------------------------------------------------------------------- |
127 // |
127 // |
128 void CMmListBoxItemDrawer::InvalidateCache() |
128 void CMmListBoxItemDrawer::InvalidateCache() |
129 { |
129 { |
130 iItemsDataCache->Invalidate(); |
130 iItemsDataCache->Invalidate(); |
|
131 // this is needed to get iColors initialized on first use: |
131 } |
132 } |
132 |
133 |
133 // ----------------------------------------------------------------------------- |
134 // ----------------------------------------------------------------------------- |
134 // |
135 // |
135 // ----------------------------------------------------------------------------- |
136 // ----------------------------------------------------------------------------- |
298 if ( iFloatingItems[i].IsFloatingItemValid() ) |
299 if ( iFloatingItems[i].IsFloatingItemValid() ) |
299 { |
300 { |
300 TInt drawnItemIndex = iFloatingItems[i].GetDrawnItemIndex(); |
301 TInt drawnItemIndex = iFloatingItems[i].GetDrawnItemIndex(); |
301 TSize size = iWidget->View()->ItemSize( drawnItemIndex ); |
302 TSize size = iWidget->View()->ItemSize( drawnItemIndex ); |
302 TRect rect( iFloatingItems[i].GetItemPosition(), iFloatingItems[i].GetItemPosition() + size); |
303 TRect rect( iFloatingItems[i].GetItemPosition(), iFloatingItems[i].GetItemPosition() + size); |
303 |
304 |
304 if (rect.Intersects(currentlyDrawnRect)) |
305 if (rect.Intersects(currentlyDrawnRect)) |
305 { |
306 { |
306 TInt tempZoomIconIndex = iZoomIconIndex; |
307 TInt tempZoomIconIndex = iZoomIconIndex; |
307 TInt tempZoomRatio = iIconAnimationZoomRatio; |
308 TInt tempZoomRatio = iIconAnimationZoomRatio; |
308 |
309 |
312 if ( ItemHasFloatingType( drawnItemIndex, EDrag) || |
313 if ( ItemHasFloatingType( drawnItemIndex, EDrag) || |
313 ItemHasFloatingType( drawnItemIndex, EDragTransition) ) |
314 ItemHasFloatingType( drawnItemIndex, EDragTransition) ) |
314 { |
315 { |
315 ClearFlags( CListItemDrawer::EPressedDownState ); |
316 ClearFlags( CListItemDrawer::EPressedDownState ); |
316 } |
317 } |
317 |
318 |
318 DrawActualItem( drawnItemIndex, rect, ETrue, EFalse, EFalse, EFalse ); |
319 DrawActualItem( drawnItemIndex, rect, ETrue, EFalse, EFalse, EFalse ); |
319 iIconAnimationZoomRatio = tempZoomRatio; |
320 iIconAnimationZoomRatio = tempZoomRatio; |
320 iZoomIconIndex = tempZoomIconIndex; |
321 iZoomIconIndex = tempZoomIconIndex; |
321 } |
322 } |
322 } |
323 } |
442 |
443 |
443 if ( IsRedrawItemBackgroundEnabled() ) |
444 if ( IsRedrawItemBackgroundEnabled() ) |
444 { |
445 { |
445 DrawBackgroundAndSeparatorLines( aItemTextRect ); |
446 DrawBackgroundAndSeparatorLines( aItemTextRect ); |
446 } |
447 } |
447 |
448 |
448 if ( !iUseCache || !cache->IsValid() ) |
449 if ( !iUseCache || !cache->IsValid() ) |
449 { |
450 { |
450 SetupSubCellsL( aItemIsCurrent, aItemIndex ); |
451 SetupSubCellsL( aItemIsCurrent, aItemIndex ); |
451 } |
452 } |
452 __ASSERT_DEBUG( cache->IsValid(), User::Invariant() ); |
453 __ASSERT_DEBUG( cache->IsValid(), User::Invariant() ); |
453 |
454 |
454 FormattedCellData()->SetIconArray( cache->GetIconListL() ); |
455 FormattedCellData()->SetIconArray( cache->GetIconListL() ); |
455 |
456 |
456 TBool isFloating = !iUseCache && IsFloating( aItemIndex ); |
457 TBool isFloating = !iUseCache && IsFloating( aItemIndex ); |
457 if ( !!isFloating != !!iLastDrawnItemWasFloating ) // Ex-OR |
458 if ( !!isFloating != !!iLastDrawnItemWasFloating ) // Ex-OR |
458 { |
459 { |
460 iColors = SetupColors( isFloating ); |
461 iColors = SetupColors( isFloating ); |
461 } |
462 } |
462 |
463 |
463 CFormattedCellListBoxData* data = static_cast<CFormattedCellListBoxData*>(iData); |
464 CFormattedCellListBoxData* data = static_cast<CFormattedCellListBoxData*>(iData); |
464 data->EnableMarqueeL( EFalse ); |
465 data->EnableMarqueeL( EFalse ); |
465 |
466 |
466 TBool highlightShown = ETrue; |
467 TBool highlightShown = ETrue; |
467 if (FormattedCellData()->RespectFocus() && !aViewIsEmphasized) |
468 if (FormattedCellData()->RespectFocus() && !aViewIsEmphasized) |
468 { |
469 { |
469 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
470 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
470 MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); |
471 MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( iGc ); |
666 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
667 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
667 |
668 |
668 if ( !aDragged ) |
669 if ( !aDragged ) |
669 { |
670 { |
670 AknsUtils::GetCachedColor( skin, colors.iText, KAknsIIDQsnTextColors, |
671 AknsUtils::GetCachedColor( skin, colors.iText, KAknsIIDQsnTextColors, |
671 EAknsCIQsnTextColorsCG6 ); |
672 EAknsCIQsnTextColorsCG9 ); |
672 AknsUtils::GetCachedColor( skin, colors.iBack , KAknsIIDQsnTextColors, |
673 AknsUtils::GetCachedColor( skin, colors.iBack , KAknsIIDQsnTextColors, |
673 EAknsCIQsnOtherColorsCG9 ); |
674 EAknsCIQsnOtherColorsCG6 ); |
674 AknsUtils::GetCachedColor( skin, colors.iHighlightedText, |
675 AknsUtils::GetCachedColor( skin, colors.iHighlightedText, |
675 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 ); |
676 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ); |
676 AknsUtils::GetCachedColor( skin, colors.iHighlightedBack, |
677 AknsUtils::GetCachedColor( skin, colors.iHighlightedBack, |
677 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); |
678 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); |
678 } |
679 } |
679 else |
680 else |
680 { |
681 { |
681 AknsUtils::GetCachedColor( skin, colors.iText, KAknsIIDQsnTextColors, |
682 AknsUtils::GetCachedColor( skin, colors.iText, KAknsIIDQsnTextColors, |
682 EAknsCIQsnTextColorsCG10 ); |
683 EAknsCIQsnTextColorsCG11 ); |
683 AknsUtils::GetCachedColor( skin, colors.iBack , KAknsIIDQsnTextColors, |
684 AknsUtils::GetCachedColor( skin, colors.iBack , KAknsIIDQsnTextColors, |
684 EAknsCIQsnTextColorsCG6 ); |
685 EAknsCIQsnTextColorsCG6 ); |
685 AknsUtils::GetCachedColor( skin, colors.iHighlightedText, |
686 AknsUtils::GetCachedColor( skin, colors.iHighlightedText, |
686 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 ); |
687 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ); |
687 AknsUtils::GetCachedColor( skin, colors.iHighlightedBack, |
688 AknsUtils::GetCachedColor( skin, colors.iHighlightedBack, |
688 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); |
689 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); |
689 } |
690 } |
690 |
691 |
691 return colors; |
692 return colors; |
776 { |
777 { |
777 if ( aItemIndex < 0 ) |
778 if ( aItemIndex < 0 ) |
778 { |
779 { |
779 return TSize( 1, 1 ); |
780 return TSize( 1, 1 ); |
780 } |
781 } |
781 |
782 |
782 TSize size; |
783 TSize size; |
783 |
784 |
784 CMmCacheForItem* cache = NULL; |
785 CMmCacheForItem* cache = NULL; |
785 TRAPD( cacheError, cache = iItemsDataCache->GetItemCacheL( aItemIndex ) ); |
786 TRAPD( cacheError, cache = iItemsDataCache->GetItemCacheL( aItemIndex ) ); |
786 if ( cacheError != KErrNone ) |
787 if ( cacheError != KErrNone ) |
787 { |
788 { |
788 cache = NULL; |
789 cache = NULL; |
789 } |
790 } |
790 |
791 |
791 if ( cache ) |
792 if ( cache ) |
792 { |
793 { |
793 cache->InvalidateIfCacheMayNotBeUsed( |
794 cache->InvalidateIfCacheMayNotBeUsed( |
794 aItemIsCurrent, iLastSubcellsSetupCode ); |
795 aItemIsCurrent, iLastSubcellsSetupCode ); |
795 } |
796 } |
796 |
797 |
797 if ( !iUseCache || !cache || !cache->IsValid() ) |
798 if ( !iUseCache || !cache || !cache->IsValid() ) |
798 { |
799 { |
799 const TDesC8& mm_template = iMmModel->GetAttributeAsText (aItemIndex, |
800 const TDesC8& mm_template = iMmModel->GetAttributeAsText (aItemIndex, |
800 KMmTemplate8); |
801 KMmTemplate8); |
801 TRect viewRect = iWidget->View()->ViewRect(); |
802 TRect viewRect = iWidget->View()->ViewRect(); |
802 |
803 |
803 TBool landscapeOrientation = viewRect.Width() > viewRect.Height(); |
804 TBool landscapeOrientation = viewRect.Width() > viewRect.Height(); |
804 // Layout_Meta_Data::IsLandscapeOrientation cannot be used here because it |
805 // Layout_Meta_Data::IsLandscapeOrientation cannot be used here because it |
805 // might happen that GetSize (this method) gets called immediately after |
806 // might happen that GetSize (this method) gets called immediately after |
806 // layout change but before AppUi calls SetRect on the container of iWidget |
807 // layout change but before AppUi calls SetRect on the container of iWidget |
807 // (Layout_Meta_Data::IsLandscapeOrientation always reflects the current state, |
808 // (Layout_Meta_Data::IsLandscapeOrientation always reflects the current state, |
808 // whereas ViewRect might sometimes be out of date). |
809 // whereas ViewRect might sometimes be out of date). |
809 // In such situation iTemplateLibrary->GetSize (called just below) would |
810 // In such situation iTemplateLibrary->GetSize (called just below) would |
810 // cause the template library to fill the internal cache for landscape mode |
811 // cause the template library to fill the internal cache for landscape mode |
811 // with parameters calculated according to the outdated ViewRect. |
812 // with parameters calculated according to the outdated ViewRect. |
812 |
813 |
813 |
814 |
814 if ( iTemplateLibrary->GetSize( size, iWidgetType, mm_template, |
815 if ( iTemplateLibrary->GetSize( size, iWidgetType, mm_template, |
815 landscapeOrientation, aItemIsCurrent, viewRect ) |
816 landscapeOrientation, aItemIsCurrent, viewRect ) |
816 != KErrNone ) |
817 != KErrNone ) |
817 { |
818 { |
818 size = TSize( 1, 1 ); |
819 size = TSize( 1, 1 ); |
971 { |
972 { |
972 TMmFloatingItem floatingItem( aDraggedItemIndex, aPoint, EDrag, |
973 TMmFloatingItem floatingItem( aDraggedItemIndex, aPoint, EDrag, |
973 MmEffects::KNoAnimationFramesCount, iWidget->View() ); |
974 MmEffects::KNoAnimationFramesCount, iWidget->View() ); |
974 floatingItem.SetManualDelete( ETrue ); |
975 floatingItem.SetManualDelete( ETrue ); |
975 AddFloatingItemL(floatingItem, 0); |
976 AddFloatingItemL(floatingItem, 0); |
976 |
977 |
977 ClearFlags( CListItemDrawer::EPressedDownState ); |
978 ClearFlags( CListItemDrawer::EPressedDownState ); |
978 } |
979 } |
979 |
980 |
980 iAnimator->Trigger(); |
981 iAnimator->Trigger(); |
981 } |
982 } |
1042 { |
1043 { |
1043 if ( iDrawMoveIndicators ) |
1044 if ( iDrawMoveIndicators ) |
1044 { |
1045 { |
1045 iIsIndicatorItem = ETrue; |
1046 iIsIndicatorItem = ETrue; |
1046 SetRedrawItemBackground( EFalse ); |
1047 SetRedrawItemBackground( EFalse ); |
1047 |
1048 |
1048 DrawActualItem( aItemIndex, AdjustItemRect( aItemIndex ) , EFalse, EFalse, EFalse, EFalse); |
1049 DrawActualItem( aItemIndex, AdjustItemRect( aItemIndex ) , EFalse, EFalse, EFalse, EFalse); |
1049 |
1050 |
1050 SetRedrawItemBackground( ETrue ); |
1051 SetRedrawItemBackground( ETrue ); |
1051 iIsIndicatorItem = EFalse; |
1052 iIsIndicatorItem = EFalse; |
1052 } |
1053 } |
1338 void CMmListBoxItemDrawer::SetupSubCellsL( TBool aItemIsCurrent, |
1339 void CMmListBoxItemDrawer::SetupSubCellsL( TBool aItemIsCurrent, |
1339 TInt aItemIndex ) const |
1340 TInt aItemIndex ) const |
1340 { |
1341 { |
1341 CMmCacheForItem* cache = iItemsDataCache->GetItemCacheL( aItemIndex ); |
1342 CMmCacheForItem* cache = iItemsDataCache->GetItemCacheL( aItemIndex ); |
1342 cache->SetValidL( EFalse ); |
1343 cache->SetValidL( EFalse ); |
1343 |
1344 |
1344 const TDesC8& mmTemplate = iMmModel->GetAttributeAsText( aItemIndex, KMmTemplate8 ); |
1345 const TDesC8& mmTemplate = iMmModel->GetAttributeAsText( aItemIndex, KMmTemplate8 ); |
1345 if ( !mmTemplate.Compare( KNullDesC8 ) || !mmTemplate.Compare( KEmpty8 ) ) |
1346 if ( !mmTemplate.Compare( KNullDesC8 ) || !mmTemplate.Compare( KEmpty8 ) ) |
1346 { |
1347 { |
1347 User::Leave( KErrNotFound ); |
1348 User::Leave( KErrNotFound ); |
1348 } |
1349 } |
1349 cache->SetTemplateL( mmTemplate ); |
1350 cache->SetTemplateL( mmTemplate ); |
1350 |
1351 |
1351 cache->ClearIconArray(); |
1352 cache->ClearIconArray(); |
1352 cache->SetCurrent( aItemIsCurrent ); |
1353 cache->SetCurrent( aItemIsCurrent ); |
1353 |
1354 |
1354 TBool landscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation(); |
1355 TBool landscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation(); |
1355 |
1356 |
1356 RBuf& itemText = cache->GetItemTextForModifications(); |
1357 RBuf& itemText = cache->GetItemTextForModifications(); |
1357 itemText.Close(); |
1358 itemText.Close(); |
1358 itemText.CreateL( MmTemplateContants::KItemSubCellsText ); |
1359 itemText.CreateL( MmTemplateContants::KItemSubCellsText ); |
1359 |
1360 |
1360 RArray<TTemplateChild> templateChildArray; |
1361 RArray<TTemplateChild> templateChildArray; |
1367 else if ( !AknLayoutUtils::PenEnabled() ) |
1368 else if ( !AknLayoutUtils::PenEnabled() ) |
1368 { |
1369 { |
1369 iTemplateLibrary->GetMoveIndicatorChildrenL( iWidgetType, templateChildArray, |
1370 iTemplateLibrary->GetMoveIndicatorChildrenL( iWidgetType, templateChildArray, |
1370 mmTemplate, landscapeOrientation, aItemIsCurrent ); |
1371 mmTemplate, landscapeOrientation, aItemIsCurrent ); |
1371 } |
1372 } |
1372 |
1373 |
1373 iLastSubcellsSetupCode.Clear(); |
1374 iLastSubcellsSetupCode.Clear(); |
1374 |
1375 |
1375 //Backdrop icon as first element to draw |
1376 //Backdrop icon as first element to draw |
1376 TInt subcellIncrement( 0 ); |
1377 TInt subcellIncrement( 0 ); |
1377 if ( GetBackdropVisibility( aItemIndex, aItemIsCurrent ) ) |
1378 if ( GetBackdropVisibility( aItemIndex, aItemIsCurrent ) ) |
1378 { |
1379 { |
1379 SetupBackdropSubcellL( templateChildArray, aItemIndex, itemText, subcellIncrement ); |
1380 SetupBackdropSubcellL( templateChildArray, aItemIndex, itemText, subcellIncrement ); |
1380 iItemHasBackdrop = ETrue; |
1381 iItemHasBackdrop = ETrue; |
1381 } |
1382 } |
1382 else |
1383 else |
1383 { |
1384 { |
1384 iItemHasBackdrop = EFalse; |
1385 iItemHasBackdrop = EFalse; |
1385 } |
1386 } |
1386 |
1387 |
1387 for ( TInt i( 0 ) ; i < templateChildArray.Count() && !iLeftOverAreaUnderAnimatedItem; i++ ) |
1388 for ( TInt i( 0 ) ; i < templateChildArray.Count() && !iLeftOverAreaUnderAnimatedItem; i++ ) |
1407 |
1408 |
1408 for ( TInt i = subcellIncrement; i < iCurrentNumberOfSubcellsSet; i++ ) |
1409 for ( TInt i = subcellIncrement; i < iCurrentNumberOfSubcellsSet; i++ ) |
1409 { |
1410 { |
1410 SetupSubNoCellL( i, aItemIndex ); |
1411 SetupSubNoCellL( i, aItemIndex ); |
1411 } |
1412 } |
1412 |
1413 |
1413 iLastSubcellsSetupCode.AddTemplateInfo( |
1414 iLastSubcellsSetupCode.AddTemplateInfo( |
1414 iItemsDataCache->GetTemplateIdentifierL( mmTemplate ) ); |
1415 iItemsDataCache->GetTemplateIdentifierL( mmTemplate ) ); |
1415 iLastSubcellsSetupCode.AddIsCurrentInfo( aItemIsCurrent ); |
1416 iLastSubcellsSetupCode.AddIsCurrentInfo( aItemIsCurrent ); |
1416 |
1417 |
1417 CleanupStack::PopAndDestroy( &templateChildArray ); |
1418 CleanupStack::PopAndDestroy( &templateChildArray ); |
1418 |
1419 |
1419 cache->SetSubcellsSetupCode( iLastSubcellsSetupCode ); |
1420 cache->SetSubcellsSetupCode( iLastSubcellsSetupCode ); |
1420 // the line below is here only to make the cached information complete |
1421 // the line below is here only to make the cached information complete |
1421 GetItemSize( aItemIndex, aItemIsCurrent ); |
1422 GetItemSize( aItemIndex, aItemIsCurrent ); |
1422 cache->SetValidL( ETrue ); |
1423 cache->SetValidL( ETrue ); |
1423 } |
1424 } |
1469 |
1470 |
1470 // ----------------------------------------------------------------------------- |
1471 // ----------------------------------------------------------------------------- |
1471 // |
1472 // |
1472 // ----------------------------------------------------------------------------- |
1473 // ----------------------------------------------------------------------------- |
1473 // |
1474 // |
1474 void CMmListBoxItemDrawer::DrawActualItem(TInt aItemIndex, |
1475 void CMmListBoxItemDrawer::DrawActualItem(TInt aItemIndex, |
1475 const TRect& aActualItemRect, TBool aItemIsCurrent, |
1476 const TRect& aActualItemRect, TBool aItemIsCurrent, |
1476 TBool aViewIsEmphasized, TBool /*aViewIsDimmed*/, |
1477 TBool aViewIsEmphasized, TBool /*aViewIsDimmed*/, |
1477 TBool aItemIsSelected) const |
1478 TBool aItemIsSelected) const |
1478 { |
1479 { |
1479 if (Properties(aItemIndex).IsSelectionHidden()) |
1480 if (Properties(aItemIndex).IsSelectionHidden()) |
1480 { |
1481 { |
1481 aItemIsSelected = EFalse; |
1482 aItemIsSelected = EFalse; |
1482 } |
1483 } |
1483 DrawItemText(aItemIndex,aActualItemRect,aItemIsCurrent, |
1484 DrawItemText(aItemIndex,aActualItemRect,aItemIsCurrent, |
1484 aViewIsEmphasized,aItemIsSelected); |
1485 aViewIsEmphasized,aItemIsSelected); |
1485 } |
1486 } |
1486 |
1487 |
1487 // ----------------------------------------------------------------------------- |
1488 // ----------------------------------------------------------------------------- |
1488 // |
1489 // |
1489 // ----------------------------------------------------------------------------- |
1490 // ----------------------------------------------------------------------------- |
1490 // |
1491 // |
1491 TBool CMmListBoxItemDrawer::GetHighlightVisibility( TInt aItemIndex, |
1492 TBool CMmListBoxItemDrawer::GetHighlightVisibility( TInt aItemIndex, |
1492 TBool aItemIsCurrent, TBool aAllowHighlightForNonDraggedItem ) const |
1493 TBool aItemIsCurrent, TBool aAllowHighlightForNonDraggedItem ) const |
1493 { |
1494 { |
1494 TBool highlightVisibility(EFalse); |
1495 TBool highlightVisibility(EFalse); |
1495 if (!iItemHasBackdrop && !iLeftOverAreaUnderAnimatedItem ) //never draw highlight when item has backdrop or when left over area under animated item |
1496 if (!iItemHasBackdrop && !iLeftOverAreaUnderAnimatedItem ) //never draw highlight when item has backdrop or when left over area under animated item |
1496 { |
1497 { |
1497 TBool currentlyDraggedItem = |
1498 TBool currentlyDraggedItem = |
1498 ItemHasFloatingType( aItemIndex, EDrag ) || |
1499 ItemHasFloatingType( aItemIndex, EDrag ) || |
1499 ItemHasFloatingType( aItemIndex, EDragTransition ); |
1500 ItemHasFloatingType( aItemIndex, EDragTransition ); |
1500 |
1501 |
1501 if ( ( STATIC_CAST(CMmWidgetContainer*,Widget()->Parent())->IsHighlightVisible() |
1502 if ( ( STATIC_CAST(CMmWidgetContainer*,Widget()->Parent())->IsHighlightVisible() |
1502 && aItemIsCurrent && aAllowHighlightForNonDraggedItem ) |
1503 && aItemIsCurrent && aAllowHighlightForNonDraggedItem ) |
1503 || currentlyDraggedItem ) |
1504 || currentlyDraggedItem ) |
1504 { |
1505 { |
1505 highlightVisibility = ETrue; |
1506 highlightVisibility = ETrue; |
1510 |
1511 |
1511 // ----------------------------------------------------------------------------- |
1512 // ----------------------------------------------------------------------------- |
1512 // |
1513 // |
1513 // ----------------------------------------------------------------------------- |
1514 // ----------------------------------------------------------------------------- |
1514 // |
1515 // |
1515 TBool CMmListBoxItemDrawer::GetBackdropVisibility( TInt aItemIndex, |
1516 TBool CMmListBoxItemDrawer::GetBackdropVisibility( TInt aItemIndex, |
1516 TBool aItemIsCurrent ) const |
1517 TBool aItemIsCurrent ) const |
1517 { |
1518 { |
1518 TBool currentlyDraggedItem = |
1519 TBool currentlyDraggedItem = |
1519 ItemHasFloatingType( aItemIndex, EDrag ) || |
1520 ItemHasFloatingType( aItemIndex, EDrag ) || |
1520 ItemHasFloatingType( aItemIndex, EDragTransition ); |
1521 ItemHasFloatingType( aItemIndex, EDragTransition ); |
1521 |
1522 |
1522 return IsEditMode() /* draw the backdrop only in edit mode */ |
1523 return IsEditMode() /* draw the backdrop only in edit mode */ |
1523 && !currentlyDraggedItem /* backdrop is disabled for dragged items */ |
1524 && !currentlyDraggedItem /* backdrop is disabled for dragged items */ |
1524 && !iIsIndicatorItem /* in non-touch backdrop is not drawn, just "move indicators" */ |
1525 && !iIsIndicatorItem /* in non-touch backdrop is not drawn, just "move indicators" */ |
1525 && !iLeftOverAreaUnderAnimatedItem /* is the currently drawn item the area left over behind dragged item*/ |
1526 && !iLeftOverAreaUnderAnimatedItem /* is the currently drawn item the area left over behind dragged item*/ |
1526 && !( STATIC_CAST( CMmWidgetContainer*,Widget()->Parent() )->IsHighlightVisible() |
1527 && !( STATIC_CAST( CMmWidgetContainer*,Widget()->Parent() )->IsHighlightVisible() |
1527 && aItemIsCurrent );/*if the timer is active then we want to draw highlight (not backdrop) on the current index*/ |
1528 && aItemIsCurrent );/*if the timer is active then we want to draw highlight (not backdrop) on the current index*/ |
1528 } |
1529 } |
1529 |
1530 |
1530 // ----------------------------------------------------------------------------- |
1531 // ----------------------------------------------------------------------------- |
1531 // |
1532 // |
1532 // ----------------------------------------------------------------------------- |
1533 // ----------------------------------------------------------------------------- |
1533 // |
1534 // |
1534 TBool CMmListBoxItemDrawer::ItemHasFloatingType( TInt aItemIndex, |
1535 TBool CMmListBoxItemDrawer::ItemHasFloatingType( TInt aItemIndex, |
1535 TMmFloatingItemType aFloatingType) const |
1536 TMmFloatingItemType aFloatingType) const |
1536 { |
1537 { |
1537 TBool hasFloatingType( EFalse ); |
1538 TBool hasFloatingType( EFalse ); |
1538 for ( TInt i = iFloatingItems.Count() - 1 ; i >= 0; i-- ) |
1539 for ( TInt i = iFloatingItems.Count() - 1 ; i >= 0; i-- ) |
1539 { |
1540 { |