equal
deleted
inserted
replaced
78 if ( diff & KAknTreeListMarkable ) |
78 if ( diff & KAknTreeListMarkable ) |
79 { |
79 { |
80 View().EnableMarking( aFlags & KAknTreeListMarkable ); |
80 View().EnableMarking( aFlags & KAknTreeListMarkable ); |
81 } |
81 } |
82 |
82 |
|
83 if ( diff & KAknTreeListSmiley && !AknLayoutUtils::LayoutMirrored() ) |
|
84 { |
|
85 Tree().InitSmiley(); |
|
86 } |
|
87 |
83 iFlags = aFlags; |
88 iFlags = aFlags; |
84 } |
89 } |
85 |
90 |
86 |
91 |
87 // --------------------------------------------------------------------------- |
92 // --------------------------------------------------------------------------- |
388 Tree().SetMarked( aItem, aMarked, aDrawNow ); |
393 Tree().SetMarked( aItem, aMarked, aDrawNow ); |
389 } |
394 } |
390 else if ( aDrawNow ) |
395 else if ( aDrawNow ) |
391 { |
396 { |
392 Window().Invalidate( View().Rect() ); |
397 Window().Invalidate( View().Rect() ); |
|
398 } |
|
399 |
|
400 // Update the marking of upper level node |
|
401 CAknTreeItem* item = Tree().Item( aItem ); |
|
402 if ( item && item->Parent() && item->Parent()->IsNode() ) |
|
403 { |
|
404 CAknTreeNode* node = item->Parent()->Node(); |
|
405 if (node) |
|
406 { |
|
407 TBool wasMarked = node->IsMarked(); |
|
408 |
|
409 if (node->IsMarkable()) |
|
410 { |
|
411 if (node->AllChildrenMarked()) |
|
412 { |
|
413 node->SetMarked(ETrue); |
|
414 } |
|
415 else |
|
416 { |
|
417 node->SetMarked(EFalse); |
|
418 } |
|
419 } |
|
420 |
|
421 if (wasMarked != node->IsMarked()) |
|
422 { |
|
423 Window().Invalidate(View().Rect()); |
|
424 } |
|
425 } |
393 } |
426 } |
394 } |
427 } |
395 |
428 |
396 |
429 |
397 // --------------------------------------------------------------------------- |
430 // --------------------------------------------------------------------------- |
626 // |
659 // |
627 EXPORT_C void CAknTreeList::SetEmptyTextL(const TDesC& aText) |
660 EXPORT_C void CAknTreeList::SetEmptyTextL(const TDesC& aText) |
628 { |
661 { |
629 View().SetEmptyTextL( aText ); |
662 View().SetEmptyTextL( aText ); |
630 } |
663 } |
|
664 |
|
665 |
|
666 // --------------------------------------------------------------------------- |
|
667 // CAknTreeList::SetMarkingModeObserver |
|
668 // --------------------------------------------------------------------------- |
|
669 // |
|
670 EXPORT_C void CAknTreeList::SetMarkingModeObserver( |
|
671 MAknMarkingModeObserver* aObserver ) |
|
672 { |
|
673 iMarkingModeObserver = aObserver; |
|
674 } |
631 |
675 |
632 |
676 |
633 // --------------------------------------------------------------------------- |
677 // --------------------------------------------------------------------------- |
634 // Handles key events by mediating them to the view. |
678 // Handles key events by mediating them to the view. |
635 // --------------------------------------------------------------------------- |
679 // --------------------------------------------------------------------------- |
889 return CAknControl::MopSupplyObject( aId ); |
933 return CAknControl::MopSupplyObject( aId ); |
890 } |
934 } |
891 |
935 |
892 |
936 |
893 // --------------------------------------------------------------------------- |
937 // --------------------------------------------------------------------------- |
|
938 // Marking mode observer |
|
939 // --------------------------------------------------------------------------- |
|
940 // |
|
941 MAknMarkingModeObserver* CAknTreeList::MarkingModeObserver() |
|
942 { |
|
943 return iMarkingModeObserver; |
|
944 } |
|
945 |
|
946 |
|
947 // --------------------------------------------------------------------------- |
894 // Does nothing, the draw request is mediated to the view through component |
948 // Does nothing, the draw request is mediated to the view through component |
895 // control structure. |
949 // control structure. |
896 // --------------------------------------------------------------------------- |
950 // --------------------------------------------------------------------------- |
897 // |
951 // |
898 void CAknTreeList::Draw( const TRect& /*aRect*/ ) const |
952 void CAknTreeList::Draw( const TRect& /*aRect*/ ) const |