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" |
|
27 |
26 |
28 using AknTreeListIconID::KDefault; |
27 using AknTreeListIconID::KDefault; |
29 using AknTreeListIconID::KNone; |
28 using AknTreeListIconID::KNone; |
30 |
29 |
31 |
30 |
456 // --------------------------------------------------------------------------- |
455 // --------------------------------------------------------------------------- |
457 // |
456 // |
458 void CAknSingleColumnStyleCoreDataRow::Draw( CWindowGc& aGc, |
457 void CAknSingleColumnStyleCoreDataRow::Draw( CWindowGc& aGc, |
459 const TRect& aItemRect, const TRect& /*aRect*/, TBool aFocused ) const |
458 const TRect& aItemRect, const TRect& /*aRect*/, TBool aFocused ) const |
460 { |
459 { |
461 _AKNTRACE_FUNC_ENTER; |
|
462 CAknTree* root = Root(); |
460 CAknTree* root = Root(); |
463 __ASSERT_DEBUG( root, User::Invariant() ); |
461 __ASSERT_DEBUG( root, User::Invariant() ); |
464 |
462 |
465 // Icon. |
463 // Icon. |
466 TInt iconVariety = 4; // Arbitrary value! |
464 TInt iconVariety = 4; // Arbitrary value! |
493 layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon:: |
491 layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon:: |
494 list_single_2heading_msg_pane_t2( textVariety ).LayoutLine() ); |
492 list_single_2heading_msg_pane_t2( textVariety ).LayoutLine() ); |
495 |
493 |
496 if ( iFirstColumn ) |
494 if ( iFirstColumn ) |
497 { |
495 { |
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 { |
|
506 root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: |
496 root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: |
507 list_single_2heading_msg_pane_t2( textVariety ), |
497 list_single_2heading_msg_pane_t2( textVariety ), |
508 *iFirstColumn, NULL, this, aFocused, ETrue ); |
498 *iFirstColumn, NULL, this, aFocused, EFalse ); |
509 } |
|
510 } |
499 } |
511 } |
500 } |
512 |
501 |
513 // Second text column. |
502 // Second text column. |
514 textVariety = TextVariety( 1, optIconId1, optIconId2, threeColumns ); |
503 textVariety = TextVariety( 1, optIconId1, optIconId2, threeColumns ); |
516 { |
505 { |
517 layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon:: |
506 layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon:: |
518 list_single_2heading_msg_pane_t3( textVariety ).LayoutLine() ); |
507 list_single_2heading_msg_pane_t3( textVariety ).LayoutLine() ); |
519 if ( iSecondColumn ) |
508 if ( iSecondColumn ) |
520 { |
509 { |
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 "); |
|
531 root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: |
510 root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: |
532 list_single_2heading_msg_pane_t3( textVariety ), |
511 list_single_2heading_msg_pane_t3( textVariety ), |
533 *iSecondColumn, NULL, this, aFocused, ETrue ); |
512 *iSecondColumn, NULL, this, aFocused, EFalse ); |
534 } |
|
535 } |
513 } |
536 } |
514 } |
537 |
515 |
538 // Third text column. |
516 // Third text column. |
539 textVariety = TextVariety( 2, optIconId1, optIconId2, threeColumns ); |
517 textVariety = TextVariety( 2, optIconId1, optIconId2, threeColumns ); |
566 if ( optIconId2 != KNone ) |
544 if ( optIconId2 != KNone ) |
567 { |
545 { |
568 root->DrawIcon( optIconId2, optIconRect2.Size(), aGc, |
546 root->DrawIcon( optIconId2, optIconRect2.Size(), aGc, |
569 optIconRect2.iTl, optIconRect2.Size() ); |
547 optIconRect2.iTl, optIconRect2.Size() ); |
570 } |
548 } |
571 _AKNTRACE_FUNC_EXIT; |
|
572 } |
549 } |
573 |
550 |
574 |
551 |
575 // --------------------------------------------------------------------------- |
552 // --------------------------------------------------------------------------- |
576 // From class CAknTreeItem. |
553 // From class CAknTreeItem. |