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 |
|
88 iFlags = aFlags; |
83 iFlags = aFlags; |
89 } |
84 } |
90 |
85 |
91 |
86 |
92 // --------------------------------------------------------------------------- |
87 // --------------------------------------------------------------------------- |
393 Tree().SetMarked( aItem, aMarked, aDrawNow ); |
388 Tree().SetMarked( aItem, aMarked, aDrawNow ); |
394 } |
389 } |
395 else if ( aDrawNow ) |
390 else if ( aDrawNow ) |
396 { |
391 { |
397 Window().Invalidate( View().Rect() ); |
392 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 } |
|
426 } |
393 } |
427 } |
394 } |
428 |
395 |
429 |
396 |
430 // --------------------------------------------------------------------------- |
397 // --------------------------------------------------------------------------- |
659 // |
626 // |
660 EXPORT_C void CAknTreeList::SetEmptyTextL(const TDesC& aText) |
627 EXPORT_C void CAknTreeList::SetEmptyTextL(const TDesC& aText) |
661 { |
628 { |
662 View().SetEmptyTextL( aText ); |
629 View().SetEmptyTextL( aText ); |
663 } |
630 } |
664 |
|
665 |
|
666 // --------------------------------------------------------------------------- |
|
667 // CAknTreeList::SetMarkingModeObserver |
|
668 // --------------------------------------------------------------------------- |
|
669 // |
|
670 EXPORT_C void CAknTreeList::SetMarkingModeObserver( |
|
671 MAknMarkingModeObserver* aObserver ) |
|
672 { |
|
673 iMarkingModeObserver = aObserver; |
|
674 } |
|
675 |
631 |
676 |
632 |
677 // --------------------------------------------------------------------------- |
633 // --------------------------------------------------------------------------- |
678 // Handles key events by mediating them to the view. |
634 // Handles key events by mediating them to the view. |
679 // --------------------------------------------------------------------------- |
635 // --------------------------------------------------------------------------- |
933 return CAknControl::MopSupplyObject( aId ); |
889 return CAknControl::MopSupplyObject( aId ); |
934 } |
890 } |
935 |
891 |
936 |
892 |
937 // --------------------------------------------------------------------------- |
893 // --------------------------------------------------------------------------- |
938 // Marking mode observer |
|
939 // --------------------------------------------------------------------------- |
|
940 // |
|
941 MAknMarkingModeObserver* CAknTreeList::MarkingModeObserver() |
|
942 { |
|
943 return iMarkingModeObserver; |
|
944 } |
|
945 |
|
946 |
|
947 // --------------------------------------------------------------------------- |
|
948 // Does nothing, the draw request is mediated to the view through component |
894 // Does nothing, the draw request is mediated to the view through component |
949 // control structure. |
895 // control structure. |
950 // --------------------------------------------------------------------------- |
896 // --------------------------------------------------------------------------- |
951 // |
897 // |
952 void CAknTreeList::Draw( const TRect& /*aRect*/ ) const |
898 void CAknTreeList::Draw( const TRect& /*aRect*/ ) const |