phonebookui/Phonebook2/UIControls/src/cpbk2contactviewcustomlistboxitemdrawer.cpp
branchRCL_3
changeset 8 5586b4d2ec3e
parent 3 04ab22b956c2
child 11 2828b4d142c0
equal deleted inserted replaced
7:b3431bff8c19 8:5586b4d2ec3e
   168 void CPbk2ContactViewCustomListBoxItemDrawer::DrawItemMark(TBool /*aItemIsSelected*/, TBool /*aViewIsDimmed*/, const TPoint& /*aMarkPos*/) const
   168 void CPbk2ContactViewCustomListBoxItemDrawer::DrawItemMark(TBool /*aItemIsSelected*/, TBool /*aViewIsDimmed*/, const TPoint& /*aMarkPos*/) const
   169     {
   169     {
   170     // not used in S60
   170     // not used in S60
   171     }
   171     }
   172 
   172 
   173 inline void DrawSeparator( 
       
   174     CGraphicsContext& aGc, 
       
   175     const TRect& aRect, const TRgb& aColor )
       
   176     {
       
   177     aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
       
   178     aGc.SetPenStyle( CGraphicsContext::ESolidPen );
       
   179     TRgb color( aColor );
       
   180     color.SetAlpha( 32 );
       
   181     aGc.SetPenColor( color );
       
   182     TRect lineRect( aRect );
       
   183     TInt gap = AknLayoutScalable_Avkon::listscroll_gen_pane( 0 ).LayoutLine().it; 
       
   184     lineRect.Shrink( gap, 0 );
       
   185     lineRect.Move( 0, -1 );
       
   186     aGc.DrawLine( TPoint( lineRect.iTl.iX, lineRect.iBr.iY ), 
       
   187                   TPoint( lineRect.iBr.iX, lineRect.iBr.iY ) );
       
   188     }
       
   189 
       
   190 
       
   191 void CPbk2ContactViewCustomListBoxItemDrawer::DrawItemText( TInt aItemIndex,
   173 void CPbk2ContactViewCustomListBoxItemDrawer::DrawItemText( TInt aItemIndex,
   192                                              const TRect& aItemTextRect,
   174                                              const TRect& aItemTextRect,
   193                                              TBool aItemIsCurrent,
   175                                              TBool aItemIsCurrent,
   194                                              TBool /*aViewIsEmphasized*/,
   176                                              TBool /*aViewIsEmphasized*/,
   195                                              TBool aItemIsSelected ) const
   177                                              TBool aItemIsSelected ) const
   260         ColumnData()->ResetMarquee();
   242         ColumnData()->ResetMarquee();
   261         ColumnData()->SetCurrentMarqueeItemIndex(aItemIndex);
   243         ColumnData()->SetCurrentMarqueeItemIndex(aItemIndex);
   262         }
   244         }
   263     ColumnData()->SetCurrentItemIndex(aItemIndex);
   245     ColumnData()->SetCurrentItemIndex(aItemIndex);
   264     ColumnData()->Draw(Properties(aItemIndex), *iGc,&des,aItemTextRect,(aItemIsCurrent /*|| aViewIsEmphasized*/),colors, aItemIndex);
   246     ColumnData()->Draw(Properties(aItemIndex), *iGc,&des,aItemTextRect,(aItemIsCurrent /*|| aViewIsEmphasized*/),colors, aItemIndex);
   265 
       
   266     const TInt itemCount(iModel->NumberOfItems());
       
   267     if( itemCount - 1 > aItemIndex  )
       
   268         {
       
   269         DrawSeparator( *iGc, aItemTextRect, iTextColor );
       
   270         }
       
   271 
       
   272     
   247     
   273 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   248 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   274     if ( transApi )
   249     if ( transApi )
   275         {
   250         {
   276         transApi->StartDrawing( MAknListBoxTfxInternal::EListNotSpecified );
   251         transApi->StartDrawing( MAknListBoxTfxInternal::EListNotSpecified );