uifw/AvKon/aknhlist/src/aknsinglecolumnstylecoredatarow.cpp
branchRCL_3
changeset 15 08e69e956a8c
parent 0 2f259fa3e83a
child 55 aecbbf00d063
equal deleted inserted replaced
10:9f56a4e1b8ab 15:08e69e956a8c
    21 #include <aknlayoutscalable_avkon.cdl.h>
    21 #include <aknlayoutscalable_avkon.cdl.h>
    22 
    22 
    23 #include "akntree.h"
    23 #include "akntree.h"
    24 #include "aknsinglecolumnstylecoredatarow.h"
    24 #include "aknsinglecolumnstylecoredatarow.h"
    25 #include "akntreelistinternalconstants.h"
    25 #include "akntreelistinternalconstants.h"
       
    26 #include "akntrace.h"
    26 
    27 
    27 using AknTreeListIconID::KDefault;
    28 using AknTreeListIconID::KDefault;
    28 using AknTreeListIconID::KNone;
    29 using AknTreeListIconID::KNone;
    29 
    30 
    30 
    31 
   455 // ---------------------------------------------------------------------------
   456 // ---------------------------------------------------------------------------
   456 //
   457 //
   457 void CAknSingleColumnStyleCoreDataRow::Draw( CWindowGc& aGc,
   458 void CAknSingleColumnStyleCoreDataRow::Draw( CWindowGc& aGc,
   458     const TRect& aItemRect, const TRect& /*aRect*/, TBool aFocused ) const
   459     const TRect& aItemRect, const TRect& /*aRect*/, TBool aFocused ) const
   459     {
   460     {
       
   461     _AKNTRACE_FUNC_ENTER;
   460     CAknTree* root = Root();
   462     CAknTree* root = Root();
   461     __ASSERT_DEBUG( root, User::Invariant() );
   463     __ASSERT_DEBUG( root, User::Invariant() );
   462 
   464 
   463     // Icon.
   465     // Icon.
   464     TInt iconVariety = 4; // Arbitrary value!
   466     TInt iconVariety = 4; // Arbitrary value!
   491         layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon::
   493         layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon::
   492             list_single_2heading_msg_pane_t2( textVariety ).LayoutLine() );
   494             list_single_2heading_msg_pane_t2( textVariety ).LayoutLine() );
   493             
   495             
   494         if ( iFirstColumn )
   496         if ( iFirstColumn )
   495             {
   497             {
       
   498             if ( Flags() & EFirstColumnSmiley )
       
   499                 {
       
   500                 root->DrawSmiley( aGc, aItemRect, AknLayoutScalable_Avkon::
       
   501                                   list_single_2heading_msg_pane_t2( textVariety), 
       
   502                                   *iFirstColumn, NULL, aFocused );
       
   503                 }
       
   504             else
       
   505                 {
   496             root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon::
   506             root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon::
   497                 list_single_2heading_msg_pane_t2( textVariety ),
   507                 list_single_2heading_msg_pane_t2( textVariety ),
   498                 *iFirstColumn, NULL, this, aFocused, EFalse );
   508                                 *iFirstColumn, NULL, this, aFocused, ETrue );
       
   509                 }
   499             }        
   510             }        
   500         }
   511         }
   501 
   512 
   502     // Second text column.
   513     // Second text column.
   503     textVariety = TextVariety( 1, optIconId1, optIconId2, threeColumns );
   514     textVariety = TextVariety( 1, optIconId1, optIconId2, threeColumns );
   505         {
   516         {
   506         layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon::
   517         layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon::
   507             list_single_2heading_msg_pane_t3( textVariety ).LayoutLine() );
   518             list_single_2heading_msg_pane_t3( textVariety ).LayoutLine() );
   508         if ( iSecondColumn )
   519         if ( iSecondColumn )
   509             {
   520             {
       
   521             if ( Flags() & ESecondColumnSmiley )
       
   522                 {
       
   523                 _AKNTRACE("Draw Smiley");
       
   524                 root->DrawSmiley( aGc, aItemRect, AknLayoutScalable_Avkon::
       
   525                                   list_single_2heading_msg_pane_t3(textVariety),
       
   526                                   *iSecondColumn, NULL, aFocused );
       
   527                 }
       
   528             else
       
   529                 {
       
   530                 _AKNTRACE("Draw Text ");
   510             root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon::
   531             root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon::
   511                 list_single_2heading_msg_pane_t3( textVariety ),
   532                 list_single_2heading_msg_pane_t3( textVariety ),
   512                 *iSecondColumn, NULL, this, aFocused, EFalse );
   533                                 *iSecondColumn, NULL, this, aFocused, ETrue );
       
   534                 }
   513             }        
   535             }        
   514         }
   536         }
   515 
   537 
   516     // Third text column.
   538     // Third text column.
   517     textVariety = TextVariety( 2, optIconId1, optIconId2, threeColumns );
   539     textVariety = TextVariety( 2, optIconId1, optIconId2, threeColumns );
   544     if ( optIconId2 != KNone  )
   566     if ( optIconId2 != KNone  )
   545         {
   567         {
   546         root->DrawIcon( optIconId2, optIconRect2.Size(), aGc,
   568         root->DrawIcon( optIconId2, optIconRect2.Size(), aGc,
   547             optIconRect2.iTl, optIconRect2.Size() );
   569             optIconRect2.iTl, optIconRect2.Size() );
   548         }    
   570         }    
       
   571     _AKNTRACE_FUNC_EXIT;
   549     }
   572     }
   550 
   573 
   551 
   574 
   552 // ---------------------------------------------------------------------------
   575 // ---------------------------------------------------------------------------
   553 // From class CAknTreeItem.
   576 // From class CAknTreeItem.