13 * |
13 * |
14 * Description: A visualizer for nodes with plain text. |
14 * Description: A visualizer for nodes with plain text. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
|
19 //<cmail> removed __FS_ALFRED_SUPPORT flag |
|
20 //#include <fsconfig.h> |
|
21 //</cmail> removed __FS_ALFRED_SUPPORT flag |
|
22 |
|
23 #include "emailtrace.h" |
18 #include "emailtrace.h" |
24 #include "fstreeplainonelinenodevisualizer.h" |
19 #include "fstreeplainonelinenodevisualizer.h" |
25 #include "fstreeplainonelinenodedata.h" |
20 #include "fstreeplainonelinenodedata.h" |
26 #include "fsgenericpanic.h" |
21 #include "fsgenericpanic.h" |
27 #include "fstreelist.h" |
22 #include "fstreelist.h" |
28 #include "fslayoutmanager.h" |
23 #include "fslayoutmanager.h" |
29 #include "fsmarqueeclet.h" |
24 #include "fsmarqueeclet.h" |
30 #include <touchlogicalfeedback.h> |
25 #include <touchlogicalfeedback.h> |
31 |
26 |
32 // <cmail> SF |
|
33 #include <alf/alfanchorlayout.h> |
27 #include <alf/alfanchorlayout.h> |
34 #include <alf/alfimagevisual.h> |
28 #include <alf/alfimagevisual.h> |
35 #include <alf/alfviewportlayout.h> |
29 #include <alf/alfviewportlayout.h> |
36 #include <alf/alftextvisual.h> |
30 #include <alf/alftextvisual.h> |
37 #include <alf/alfimage.h> |
31 #include <alf/alfimage.h> |
38 #include <alf/alfenv.h> |
32 #include <alf/alfenv.h> |
39 |
33 |
40 #include <alf/alfevent.h> |
34 #include <alf/alfevent.h> |
41 #include <alf/alfmappingfunctions.h> |
35 #include <alf/alfmappingfunctions.h> |
42 // </cmail> |
|
43 |
36 |
44 // ======== MEMBER FUNCTIONS ======== |
37 // ======== MEMBER FUNCTIONS ======== |
45 |
38 |
46 // --------------------------------------------------------------------------- |
39 // --------------------------------------------------------------------------- |
47 // Two-phased constructor. |
40 // Two-phased constructor. |
191 { |
184 { |
192 FUNC_LOG; |
185 FUNC_LOG; |
193 iFlags &= ~KFsTreeListItemAlwaysExtended; |
186 iFlags &= ~KFsTreeListItemAlwaysExtended; |
194 } |
187 } |
195 |
188 |
|
189 // --------------------------------------------------------------------------- |
|
190 // From MFsTreeItemVisualizer. |
|
191 // |
|
192 // --------------------------------------------------------------------------- |
|
193 // |
|
194 void CFsTreePlainOneLineNodeVisualizer::SetMarkingMode( TBool /*aMarkingMode*/ ) //TEJ_MMD |
|
195 { |
|
196 FUNC_LOG; |
|
197 } |
196 |
198 |
197 // --------------------------------------------------------------------------- |
199 // --------------------------------------------------------------------------- |
198 // From MFsTreeItemVisualizer. |
200 // From MFsTreeItemVisualizer. |
199 // This function returns wether an item is always in extended state. |
201 // This function returns wether an item is always in extended state. |
200 // Node cannot be made always extended. The function always returns EFalse. |
202 // Node cannot be made always extended. The function always returns EFalse. |
585 // --------------------------------------------------------------------------- |
587 // --------------------------------------------------------------------------- |
586 // |
588 // |
587 void CFsTreePlainOneLineNodeVisualizer::UpdateL( const MFsTreeItemData& aData, |
589 void CFsTreePlainOneLineNodeVisualizer::UpdateL( const MFsTreeItemData& aData, |
588 TBool aFocused, |
590 TBool aFocused, |
589 const TUint aLevel, |
591 const TUint aLevel, |
590 CAlfTexture*& aMarkIcon, |
592 CAlfTexture*& aMarkOnIcon, |
|
593 CAlfTexture*& /*aMarkOffIcon*/, |
591 CAlfTexture*& aMenuIcon, |
594 CAlfTexture*& aMenuIcon, |
592 const TUint /*aTimeout*/, |
595 const TUint /*aTimeout*/, |
593 TBool aUpdateData) |
596 TBool aUpdateData) |
594 { |
597 { |
595 FUNC_LOG; |
598 FUNC_LOG; |
620 const CFsTreePlainOneLineNodeData* data = |
623 const CFsTreePlainOneLineNodeData* data = |
621 static_cast<const CFsTreePlainOneLineNodeData*>(&aData); |
624 static_cast<const CFsTreePlainOneLineNodeData*>(&aData); |
622 |
625 |
623 //update the ancors for current item settings |
626 //update the ancors for current item settings |
624 const TInt indent( iTextIndentation * ( aLevel - 1 ) ); |
627 const TInt indent( iTextIndentation * ( aLevel - 1 ) ); |
625 UpdateLayout(data, indent, aMarkIcon, aMenuIcon); |
628 UpdateLayout(data, indent, aMarkOnIcon, aMenuIcon); |
626 |
629 |
627 if (iTextVisual && aUpdateData) |
630 if (iTextVisual && aUpdateData) |
628 { |
631 { |
629 //get text color |
632 //get text color |
630 TRgb textColor; |
633 TRgb textColor; |
693 iIconVisual->SetImage(TAlfImage( data->IconCollapsed())); |
696 iIconVisual->SetImage(TAlfImage( data->IconCollapsed())); |
694 } |
697 } |
695 } |
698 } |
696 } |
699 } |
697 |
700 |
698 if ( IsMarked() && iIconMarked && aMarkIcon ) |
701 if ( IsMarked() && iIconMarked && aMarkOnIcon ) |
699 { |
702 { |
700 iIconMarked->SetImage( *aMarkIcon ); |
703 iIconMarked->SetImage( *aMarkOnIcon ); |
701 } |
704 } |
702 |
705 |
703 if ( (iFlags & KFsTreeListItemHasMenu) && iIconMenu && aMenuIcon ) |
706 if ( (iFlags & KFsTreeListItemHasMenu) && iIconMenu && aMenuIcon ) |
704 { |
707 { |
705 iIconMenu->SetImage( *aMenuIcon ); |
708 iIconMenu->SetImage( *aMenuIcon ); |