uifw/AvKon/aknhlist/src/akntreelistview.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 23 3d340a0166ff
equal deleted inserted replaced
16:71dd06cfe933 18:0aa5fbdfbc30
  2766 // ---------------------------------------------------------------------------
  2766 // ---------------------------------------------------------------------------
  2767 //
  2767 //
  2768 void CAknTreeListView::DrawItemsWithPhysics( const TRect& aRect ) const
  2768 void CAknTreeListView::DrawItemsWithPhysics( const TRect& aRect ) const
  2769     {
  2769     {
  2770     TBool empty = IsEmpty();
  2770     TBool empty = IsEmpty();
       
  2771     TInt offset = Offset();  
  2771 
  2772 
  2772 #ifdef RD_UI_TRANSITION_EFFECTS_LIST    
  2773 #ifdef RD_UI_TRANSITION_EFFECTS_LIST    
  2773     CWindowGc& gc = iGc && !empty ? *iGc : SystemGc();
  2774     CWindowGc& gc = iGc && !empty ? *iGc : SystemGc();
  2774     TInt offset = Offset();
       
  2775 #else
  2775 #else
  2776     CWindowGc& gc = SystemGc();
  2776     CWindowGc& gc = SystemGc();
  2777 #endif
  2777 #endif
  2778 
  2778 
  2779 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  2779 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  2832             {
  2832             {
  2833             TRect drawRect( iItems[ii].Rect() );
  2833             TRect drawRect( iItems[ii].Rect() );
  2834 
  2834 
  2835             if ( iItems[ii].Item() )
  2835             if ( iItems[ii].Item() )
  2836                 {
  2836                 {
  2837                 if ( !aRect.Intersects(drawRect) )
       
  2838                     {
       
  2839                     //invisible item yet
       
  2840                     continue;
       
  2841                     }
       
  2842 
  2837 
  2843 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  2838 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  2844                 TRect tfxDrawRect( drawRect );
  2839                 TRect tfxDrawRect( drawRect );
  2845                 tfxDrawRect.Move( 0, -offset );
  2840                 tfxDrawRect.Move( 0, -offset );
  2846 
  2841 
  2860                     if ( clippingRect.iBr.iY > viewRect.iBr.iY )
  2855                     if ( clippingRect.iBr.iY > viewRect.iBr.iY )
  2861                         {
  2856                         {
  2862                         clippingRect.iBr.iY = viewRect.iBr.iY;
  2857                         clippingRect.iBr.iY = viewRect.iBr.iY;
  2863                         }
  2858                         }
  2864                     }
  2859                     }
       
  2860                 // Set clipping rect.    
       
  2861                 if ( clippingRect.Intersects( aRect ) )
       
  2862                     {
       
  2863                     clippingRect.Intersection( aRect );
       
  2864                     gc.SetClippingRect( clippingRect );
       
  2865                     }
       
  2866                 else
       
  2867                     {
       
  2868                     //Draw nothing if no overlap between item rectangel and given rect.
       
  2869                     continue;
       
  2870                     }
  2865                 
  2871                 
  2866                 // Set clipping rect.    
       
  2867                 gc.SetClippingRect( clippingRect );
       
  2868 
       
  2869                 if ( transApi )
  2872                 if ( transApi )
  2870                     {
  2873                     {
  2871                     transApi->StopDrawing();
  2874                     transApi->StopDrawing();
  2872                     }
  2875                     }
  2873 #endif
  2876 #endif
  2874                 if ( ii < iBottomIndex )
  2877 
       
  2878                 if ( iItems[ii].Item() != iBottomItem )
  2875                     {
  2879                     {
  2876                     TRect offsetRect( drawRect );
  2880                     TRect offsetRect( drawRect );
  2877                     offsetRect.Move( 0, -offset );
  2881                     offsetRect.Move( 0, -offset );
  2878                     AknListUtils::DrawSeparator( gc, offsetRect, textColor, skin );
  2882                     AknListUtils::DrawSeparator( gc, offsetRect, textColor, skin );
  2879                     }
  2883                     }
  3156 // ---------------------------------------------------------------------------
  3160 // ---------------------------------------------------------------------------
  3157 //
  3161 //
  3158 void CAknTreeListView::LongTapPointerEventL(
  3162 void CAknTreeListView::LongTapPointerEventL(
  3159         const TPointerEvent& aPointerEvent)
  3163         const TPointerEvent& aPointerEvent)
  3160     {
  3164     {
  3161     if ( iLongTapDetector && iItemActionMenu && iItemActionMenu->InitMenuL() )
  3165     if ( iLongTapDetector && iItemActionMenu 
       
  3166             && !( HasMarkedItemsL() && FocusedItem() 
       
  3167             && !FocusedItem()->IsMarked() ) && iItemActionMenu->InitMenuL() )
  3162         {
  3168         {
  3163         iLongTapDetector->PointerEventL( aPointerEvent );
  3169         iLongTapDetector->PointerEventL( aPointerEvent );
  3164         }
  3170         }
  3165     }
  3171     }
  3166 
  3172 
  3244         {
  3250         {
  3245         for (TInt i=iItems.Count()-1; i>=0; i--)
  3251         for (TInt i=iItems.Count()-1; i>=0; i--)
  3246             {
  3252             {
  3247             if (iItems[i].Item())   
  3253             if (iItems[i].Item())   
  3248                 {
  3254                 {
  3249                 iBottomIndex = iTree.VisibleItemIndex(iItems[i].Item());
  3255                 iBottomItem = iItems[i].Item();
       
  3256                 iBottomIndex = iTree.VisibleItemIndex( iBottomItem );
  3250                 break;
  3257                 break;
  3251                 }
  3258                 }
  3252             }
  3259             }
  3253     
  3260     
  3254 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  3261 #ifdef RD_UI_TRANSITION_EFFECTS_LIST