emailuis/uicomponents/src/fstreeplainonelineitemvisualizer.cpp
branchRCL_3
changeset 18 6b8f3b30d0ec
parent 17 67369d1b217f
child 20 efd4f1afd43e
equal deleted inserted replaced
17:67369d1b217f 18:6b8f3b30d0ec
   538 
   538 
   539                 iTextVisual->EnableShadow(iFlags & KFsTreeListItemTextShadow);
   539                 iTextVisual->EnableShadow(iFlags & KFsTreeListItemTextShadow);
   540                 iTextVisual->SetColor( textColor );
   540                 iTextVisual->SetColor( textColor );
   541                 iTextVisual->SetTextStyle( styleId );
   541                 iTextVisual->SetTextStyle( styleId );
   542 
   542 
   543 //                iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapManual);
   543                 if ( iManualWrapper )
       
   544                 	{
       
   545                 	iTextVisual->SetWrapping( CAlfTextVisual::ELineWrapManual );
       
   546                 	}
       
   547                 else
       
   548                 	{
       
   549 					iTextVisual->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
       
   550                 	}
   544 
   551 
   545                 TAlfAlignHorizontal currTextAlign( EAlfAlignHLocale );
   552                 TAlfAlignHorizontal currTextAlign( EAlfAlignHLocale );
   546                 currTextAlign = CurrentTextAlignmentL( iTextAlign, &data->Data(), iTextVisual );
   553                 currTextAlign = CurrentTextAlignmentL( iTextAlign, &data->Data(), iTextVisual );
   547                 iTextVisual->SetAlign( currTextAlign, EAlfAlignVCenter );
   554                 iTextVisual->SetAlign( currTextAlign, EAlfAlignVCenter );
   548 
       
   549                 iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapTruncate);
       
   550 
   555 
   551                 if ( currTextAlign == EAlfAlignHRight )
   556                 if ( currTextAlign == EAlfAlignHRight )
   552                     {
   557                     {
   553                     iTextMarquee->SetScrollDirection( TFsMarqueeClet::EScrollFromLeft );
   558                     iTextMarquee->SetScrollDirection( TFsMarqueeClet::EScrollFromLeft );
   554                     }
   559                     }
   578 
   583 
   579             iTextMarquee->StopScrolling();    
   584             iTextMarquee->StopScrolling();    
   580             
   585             
   581             if ( iTextVisual )
   586             if ( iTextVisual )
   582             	{
   587             	{
   583             	iTextVisual->SetWrapping(CAlfTextVisual::ELineWrapTruncate);
   588 				if ( iManualWrapper )
       
   589 					{
       
   590 					iTextVisual->SetWrapping( CAlfTextVisual::ELineWrapManual );
       
   591 					}
       
   592 				else
       
   593 					{
       
   594 					iTextVisual->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
       
   595 					}
   584             	}
   596             	}
   585             }
   597             
   586         }
   598             iManualWrapper = EFalse;
   587     }
   599             }
       
   600         }
       
   601     }
       
   602 
       
   603 // ---------------------------------------------------------------------------
       
   604 //  From MFsTreeItemVisualizer.
       
   605 //  This method sets flag disable wrapping the text item.
       
   606 // ---------------------------------------------------------------------------
       
   607 //
       
   608 void CFsTreePlainOneLineItemVisualizer::OffWrapping()
       
   609 	{
       
   610 	iManualWrapper = ETrue;
       
   611 	}
   588 
   612 
   589 // ---------------------------------------------------------------------------
   613 // ---------------------------------------------------------------------------
   590 // From class MFsTreeItemVisualizer.
   614 // From class MFsTreeItemVisualizer.
   591 // A call to this function means that the item goes out of the visible items
   615 // A call to this function means that the item goes out of the visible items
   592 // scope.
   616 // scope.
   685         iTextVisual->Env().Send( cmd, aMarqueeStartDelay );
   709         iTextVisual->Env().Send( cmd, aMarqueeStartDelay );
   686         }
   710         }
   687     }
   711     }
   688 
   712 
   689 
   713 
       
   714 
   690 // ---------------------------------------------------------------------------
   715 // ---------------------------------------------------------------------------
   691 //  Handles custom Alf event. Used with text marquee.
   716 //  Handles custom Alf event. Used with text marquee.
   692 // ---------------------------------------------------------------------------
   717 // ---------------------------------------------------------------------------
   693 //
   718 //
   694 TBool CFsTreePlainOneLineItemVisualizer::OfferEventL(const TAlfEvent& aEvent)
   719 TBool CFsTreePlainOneLineItemVisualizer::OfferEventL(const TAlfEvent& aEvent)
   716 CFsTreePlainOneLineItemVisualizer::CFsTreePlainOneLineItemVisualizer
   741 CFsTreePlainOneLineItemVisualizer::CFsTreePlainOneLineItemVisualizer
   717                                                 ( CAlfControl& aOwnerControl )
   742                                                 ( CAlfControl& aOwnerControl )
   718     : CFsTreeItemVisualizerBase( aOwnerControl )
   743     : CFsTreeItemVisualizerBase( aOwnerControl )
   719     {
   744     {
   720     FUNC_LOG;
   745     FUNC_LOG;
       
   746     
       
   747     iManualWrapper = EFalse;
   721 
   748 
   722     }
   749     }
   723 
   750 
   724 
   751 
   725 // ---------------------------------------------------------------------------
   752 // ---------------------------------------------------------------------------