72 #include "FreestyleEmailUiUtilities.h" |
72 #include "FreestyleEmailUiUtilities.h" |
73 #include "FreestyleEmailUiLayoutData.h" |
73 #include "FreestyleEmailUiLayoutData.h" |
74 #include "FreestyleEmailUiShortcutBinding.h" |
74 #include "FreestyleEmailUiShortcutBinding.h" |
75 #include "ESMailSettingsPlugin.h" |
75 #include "ESMailSettingsPlugin.h" |
76 #include "FreestyleEmailUiStatusIndicator.h" |
76 #include "FreestyleEmailUiStatusIndicator.h" |
|
77 #include <alf/alfborderbrush.h> |
77 |
78 |
78 // Defines the order of the folders in UI |
79 // Defines the order of the folders in UI |
79 enum TFSEmailUiFolderListPriorities |
80 enum TFSEmailUiFolderListPriorities |
80 { |
81 { |
81 EFolderListPriorityInbox = 1, |
82 EFolderListPriorityInbox = 1, |
246 |
247 |
247 TRect mainPaneRect; |
248 TRect mainPaneRect; |
248 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect); |
249 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect); |
249 iFaderLayout = CAlfDeckLayout::AddNewL( *iControl ); |
250 iFaderLayout = CAlfDeckLayout::AddNewL( *iControl ); |
250 iFaderLayout->SetRect( mainPaneRect ); |
251 iFaderLayout->SetRect( mainPaneRect ); |
|
252 // It is not possible to get PointerEvent from iFaderLayout |
|
253 // unless it has got something to draw (even if it is not visible) |
|
254 iFaderLayout->EnableBrushesL(); |
|
255 CAlfBorderBrush* borderfader = CAlfBorderBrush::NewL( iEnv, 1, 1, 1, 1 ); |
|
256 borderfader->SetOpacity(KFSInvisible); |
|
257 iFaderLayout->Brushes()->AppendL( borderfader, EAlfHasOwnership ); |
251 |
258 |
252 iParentLayout = CAlfAnchorLayout::AddNewL( *iControl ); |
259 iParentLayout = CAlfAnchorLayout::AddNewL( *iControl ); |
253 iParentLayout->SetRect( iScreenRect ); |
260 iParentLayout->SetRect( iScreenRect ); |
254 iParentLayout->SetFlags( EAlfVisualFlagManualLayout ); |
261 iParentLayout->SetFlags( EAlfVisualFlagManualLayout ); |
255 |
262 |
594 iBackgroundBrush = |
601 iBackgroundBrush = |
595 CAlfFrameBrush::NewL( iEnv, KAknsIIDQsnFrPopup, 1, 1 ); |
602 CAlfFrameBrush::NewL( iEnv, KAknsIIDQsnFrPopup, 1, 1 ); |
596 TRect outerRect( iScreenRect ); |
603 TRect outerRect( iScreenRect ); |
597 outerRect.Shrink( paddingValue, paddingValue ); |
604 outerRect.Shrink( paddingValue, paddingValue ); |
598 iBackgroundBrush->SetFrameRectsL( outerRect, iScreenRect ); |
605 iBackgroundBrush->SetFrameRectsL( outerRect, iScreenRect ); |
599 } |
606 iParentLayout->Brushes()->AppendL( iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
600 |
607 } |
601 // Append brush if it's not yet appended. Currently this is our only |
608 |
602 // brush so if brush count is more than zero, this brush is already |
|
603 // appended. If other brush(es) are added later, this implementation |
|
604 // need to be changed. |
|
605 if ( iParentLayout->Brushes()->Count() == 0 ) |
|
606 { |
|
607 // Keep the ownership of the brush to avoid unneeded object |
|
608 // deletion / reconstruction |
|
609 iParentLayout->Brushes()->AppendL( iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
|
610 } |
|
611 |
|
612 if( !iShadowBrush ) |
609 if( !iShadowBrush ) |
613 { |
610 { |
614 iShadowBrush = CAlfShadowBorderBrush::NewL( |
611 iShadowBrush = CAlfShadowBorderBrush::NewL( |
615 iEnv, TAlfMetric( KDefaultShadowBorderWidth ) ); |
612 iEnv, TAlfMetric( KDefaultShadowBorderWidth ) ); |
616 iShadowBrush->SetOpacity( KShadowBorderOpacity ); |
613 iShadowBrush->SetOpacity( KShadowBorderOpacity ); |
617 iShadowBrush->SetLayer( EAlfBrushLayerBackground ); |
614 iShadowBrush->SetLayer( EAlfBrushLayerBackground ); |
618 iParentLayout->Brushes()->AppendL( iShadowBrush, |
615 iParentLayout->Brushes()->AppendL( iShadowBrush, |
619 EAlfDoesNotHaveOwnership ); |
616 EAlfDoesNotHaveOwnership ); |
620 } |
617 } |
621 |
618 |
|
619 // Append brush if it's not yet appended. |
|
620 if ( iParentLayout->Brushes()->Count() == 0 ) |
|
621 { |
|
622 // Keep the ownership of the brush to avoid unneeded object deletion / reconstruction |
|
623 iParentLayout->Brushes()->InsertL( 0, iBackgroundBrush, EAlfDoesNotHaveOwnership ); |
|
624 iParentLayout->Brushes()->AppendL( iShadowBrush, EAlfDoesNotHaveOwnership ); |
|
625 } |
|
626 |
622 SetPopupSoftkeysL(); |
627 SetPopupSoftkeysL(); |
623 // SetRect need to be called also here, otherwise the list layout might |
628 // SetRect need to be called also here, otherwise the list layout might |
624 // be wrong in mirrored layout |
629 // be wrong in mirrored layout |
625 iParentLayout->SetRect( iCtrlButtonRect ); |
630 iParentLayout->SetRect( iCtrlButtonRect ); |
626 |
631 |
3095 // --------------------------------------------------------------------------- |
3100 // --------------------------------------------------------------------------- |
3096 // Process a treelist event |
3101 // Process a treelist event |
3097 // --------------------------------------------------------------------------- |
3102 // --------------------------------------------------------------------------- |
3098 // |
3103 // |
3099 void CFSEmailUiFolderListVisualiser::TreeListEventL( const TFsTreeListEvent aEvent, |
3104 void CFSEmailUiFolderListVisualiser::TreeListEventL( const TFsTreeListEvent aEvent, |
3100 const TFsTreeItemId /*aId*/ ) |
3105 const TFsTreeItemId /*aId*/, |
|
3106 const TPoint& /*aPoint*/ ) |
3101 { |
3107 { |
3102 switch (aEvent) |
3108 switch (aEvent) |
3103 { |
3109 { |
3104 case EFsTreeListItemTouchAction: |
3110 case EFsTreeListItemTouchAction: |
3105 { |
3111 { |