photosgallery/viewframework/views/cloudview/src/glxcloudviewimp.cpp
branchRCL_3
changeset 26 5b3385a43d68
child 27 34937ec34dac
equal deleted inserted replaced
25:8e5f6eea9c9f 26:5b3385a43d68
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Implementation of Cloud view
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "glxcloudviewimp.h" //header file
       
    23 
       
    24 //ALF headers
       
    25 #include <alf/alfcontrolgroup.h> //for Alfcontrolgroup
       
    26 #include <alf/alfwidgetcontrol.h> //for alfwidget controls
       
    27 #include <alf/alfgridlayout.h> // For CAlfGridLayout
       
    28 #include <alf/ialflayoutmanager.h> // For CAlfLAyoutManager
       
    29 #include <alf/ialfscrollbarmodel.h> // For CAlfScrollBarModel
       
    30 #include <alf/ialfscrollbardefaultbaseelement.h> // For CAlfScrollBarDefaultBaseelement
       
    31 #include <alf/alfwidgetenvextension.h>
       
    32 #include <glxuiutility.h>
       
    33 #include <glxresourceutilities.h>  // for CGlxResourceUtilities
       
    34 #include <glxcollectionplugintags.hrh>
       
    35 #include <glxfiltergeneraldefs.h>
       
    36 
       
    37 #include <mpxcollectionutility.h>
       
    38 #include <mpxcollectionpath.h>
       
    39 #include <glxtracer.h>	
       
    40 #include <glxlog.h>					// For Logs
       
    41 #include <glxsetappstate.h> // For view state
       
    42 #include <mglxmedialist.h> //medialist
       
    43 #include <data_caging_path_literals.hrh> // For directory paths 
       
    44 
       
    45 #include <aknlayoutscalable_uiaccel.cdl.h>
       
    46 #include <glxtagsbrowserview.rsg>               // For resources
       
    47 
       
    48 #include "glxcloudviewcontrol.h"//cloud view control
       
    49 
       
    50 // For transition effects
       
    51 #include <akntranseffect.h>                             
       
    52 #include <gfxtranseffect/gfxtranseffect.h>
       
    53 #include "glxgfxtranseffect.h"  // For transition effects
       
    54 #include <akntransitionutils.h> //For CAknTransitionUtils
       
    55 
       
    56 const TInt KViewId = 0x200071B7;
       
    57 
       
    58 //Transition animation used for Cloud view activation
       
    59 _LIT( KTfxResourceActivate , "z:\\resource\\effects\\photos_gridview_appear.fxml");
       
    60 _LIT( KTfxResourceNoEffect, "");
       
    61 
       
    62 using namespace Alf;
       
    63 // ======== MEMBER FUNCTIONS ========
       
    64 
       
    65 // ---------------------------------------------------------------------------
       
    66 // Two-phased constructor.
       
    67 // ---------------------------------------------------------------------------
       
    68 // 
       
    69 EXPORT_C CGlxCloudViewImp *CGlxCloudViewImp::NewL(MGlxMediaListFactory
       
    70 		*aMediaListFactory, const TDesC &aFileName, TInt aViewResId, 
       
    71 		TInt aEmptyListResId, TInt aSoftKeyResId, TInt aSoftkeyMskDisabledId)
       
    72 	{
       
    73 	TRACER("GLX_CLOUD::CGlxCloudViewImp::NewL");
       
    74 	CGlxCloudViewImp *self = CGlxCloudViewImp::NewLC(aMediaListFactory,
       
    75 		aFileName, aViewResId, aEmptyListResId, aSoftKeyResId
       
    76 		, aSoftkeyMskDisabledId);
       
    77 	CleanupStack::Pop(self);
       
    78 	return self;
       
    79 	}
       
    80 
       
    81 // ---------------------------------------------------------------------------
       
    82 // Two-phased constructor.
       
    83 // ---------------------------------------------------------------------------
       
    84 //
       
    85 EXPORT_C CGlxCloudViewImp *CGlxCloudViewImp::NewLC(MGlxMediaListFactory
       
    86 		*aMediaListFactory, const TDesC &aFileName, TInt aViewResId,
       
    87 		TInt aEmptyListResId, TInt aSoftKeyResId, TInt aSoftkeyMskDisabledId)
       
    88     {
       
    89     TRACER("GLX_CLOUD::CGlxCloudViewImp::NewLC");
       
    90     CGlxCloudViewImp *self = new(ELeave)CGlxCloudViewImp(aSoftKeyResId,aSoftkeyMskDisabledId);
       
    91     CleanupStack::PushL(self);
       
    92     self->ConstructL(aMediaListFactory, aFileName, aViewResId, aEmptyListResId, aSoftKeyResId);
       
    93     return self;
       
    94     }
       
    95 
       
    96 // ---------------------------------------------------------------------------
       
    97 // C++ default constructor can NOT contain any code, that
       
    98 // might leave.
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 CGlxCloudViewImp::CGlxCloudViewImp(TInt aSoftKeyResId,
       
   102 		TInt aSoftkeyMskDisabledId) :
       
   103 	         iSoftKeyResId(aSoftKeyResId), iSoftkeyMskDisabledId(aSoftkeyMskDisabledId)
       
   104 	{
       
   105 	TRACER("GLX_CLOUD::CGlxCloudViewImp::CGlxCloudViewImp");
       
   106 	}
       
   107 
       
   108 // ---------------------------------------------------------------------------
       
   109 // Symbian 2nd phase constructor can leave.
       
   110 // ---------------------------------------------------------------------------
       
   111 // 
       
   112 void CGlxCloudViewImp::ConstructL(MGlxMediaListFactory *aMediaListFactory,
       
   113 		const TDesC &aFileName, TInt aViewResId, TInt aEmptyListResId,
       
   114 		TInt /*aSoftKeyResId*/)
       
   115 
       
   116 	{
       
   117 	TRACER("GLX_CLOUD::CGlxCloudViewImp::ConstructL");
       
   118 	
       
   119 	TFileName resourceFile(KDC_APP_RESOURCE_DIR);
       
   120 	resourceFile.Append (aFileName);
       
   121 	CGlxResourceUtilities::GetResourceFilenameL (resourceFile);
       
   122 	iResourceOffset = iCoeEnv->AddResourceFileL (resourceFile);
       
   123 	BaseConstructL (aViewResId);
       
   124 	ViewBaseConstructL ();
       
   125 	MLViewBaseConstructL (aMediaListFactory);
       
   126 	
       
   127 	//Register the view to recieve toolbar events. ViewBase handles the events    
       
   128 	SetToolbarObserver(this);
       
   129 	ShowToolbarOnViewActivation(ETrue);
       
   130 	
       
   131 	iEmptyListText = iEikonEnv->AllocReadResourceL(aEmptyListResId);
       
   132 	iDisplay = iUiUtility->Display ();
       
   133 	CAknToolbar* toolbar = Toolbar();
       
   134 	if(toolbar)
       
   135         {
       
   136         toolbar->DisableToolbarL(ETrue);  
       
   137         }
       
   138 	}
       
   139 
       
   140 // ---------------------------------------------------------------------------
       
   141 // Destructor
       
   142 // ---------------------------------------------------------------------------
       
   143 //
       
   144 CGlxCloudViewImp::~CGlxCloudViewImp()
       
   145     {
       
   146     TRACER("GLX_CLOUD::CGlxCloudViewImp::~CGlxCloudViewImp");
       
   147     if(iAlfEffectObs)
       
   148 		{
       
   149 		delete iAlfEffectObs;
       
   150 		}  
       
   151     
       
   152     CleanupVisuals ();
       
   153     delete iEmptyListText;
       
   154     if ( iResourceOffset )
       
   155         {
       
   156         CCoeEnv::Static()->DeleteResourceFile (iResourceOffset);
       
   157         }    
       
   158     }
       
   159 
       
   160 // ---------------------------------------------------------------------------
       
   161 // From CAknView
       
   162 // Returns views id.
       
   163 // ---------------------------------------------------------------------------
       
   164 //
       
   165 TUid CGlxCloudViewImp::Id()const
       
   166 	{
       
   167 	TRACER("GLX_CLOUD::CGlxCloudViewImp::Id()");
       
   168 	return TUid::Uid (KViewId);
       
   169 	}
       
   170 
       
   171 // ---------------------------------------------------------------------------
       
   172 // HandleViewCommandL
       
   173 // ---------------------------------------------------------------------------
       
   174 //
       
   175 TBool CGlxCloudViewImp::HandleViewCommandL(TInt aCommand)
       
   176 	{
       
   177 	TRACER("GLX_CLOUD::CGlxCloudViewImp::HandleViewCommandL");
       
   178 	
       
   179 	TBool consumed = EFalse;
       
   180 	switch (aCommand)
       
   181 		{
       
   182 		case EAknCmdOpen:
       
   183 		case EKeyEnter:
       
   184 			{
       
   185             // Processing of this Command depends on Medialist Count ( > 0 tags Available) 
       
   186             if (iMediaList->Count())
       
   187                 {
       
   188                 // There can be no selection in cloud view, so assume that path contains focused item
       
   189                 iUiUtility->SetViewNavigationDirection(EGlxNavigationForwards);
       
   190                 CMPXCollectionPath* path = iMediaList->PathLC(
       
   191                         NGlxListDefs::EPathFocusOrSelection);
       
   192                 // When a collection is opened for browsing, 
       
   193                 // there are two queries executed with similar filter. 
       
   194                 // First query to open the collection from list / cloud view.
       
   195                 // Second one from grid view construction. To improve the grid opening
       
   196                 // performance, the first query will be completed with empty Id list.
       
   197                 RArray<TMPXAttribute> attributeArray;
       
   198                 CleanupClosePushL(attributeArray);
       
   199                 attributeArray.AppendL(KGlxFilterGeneralNavigationalStateOnly);
       
   200                 iCollectionUtility->Collection().OpenL(*path,
       
   201                         attributeArray.Array());
       
   202                 CleanupStack::PopAndDestroy(&attributeArray);
       
   203                 CleanupStack::PopAndDestroy(path);
       
   204                 consumed = ETrue;
       
   205                 }
       
   206             break;
       
   207             }
       
   208 		}
       
   209 		
       
   210 	return consumed;
       
   211 	}
       
   212 
       
   213 
       
   214 // ---------------------------------------------------------------------------
       
   215 // From CAknView
       
   216 // Handles a view activation.
       
   217 // ---------------------------------------------------------------------------
       
   218 //
       
   219 void CGlxCloudViewImp::DoMLViewActivateL(const TVwsViewId & /* aPrevViewId */,
       
   220 		TUid /* aCustomMessageId */, const TDesC8 & /* aCustomMessage */)
       
   221     {
       
   222     TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL");
       
   223         
       
   224     if(StatusPane())
       
   225         {
       
   226         StatusPane()->MakeVisible(ETrue);
       
   227         }
       
   228     
       
   229     ConstructCloudControlL();
       
   230     GLX_LOG_INFO("CGlxCloudViewImp::DoMLViewActivateL Cloud View Control Created" );  
       
   231     
       
   232     // set app state to tag-browser view
       
   233     GlxSetAppState::SetState (EGlxInTagBrowserView);
       
   234     iMMCNotifier = CGlxMMCNotifier::NewL(*this);
       
   235     
       
   236     //Set the ALF animation effect to CAlfAnchorLayout since the animation
       
   237     //does not work for both avkon and alf together.
       
   238     //Check if the transitions are enabled from themes
       
   239     if (CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EFullScreenTransitionsOff ))
       
   240 		{
       
   241 		if(!iAlfEffectObs)
       
   242 			{
       
   243 			iAlfEffectObs = CAlfEffectObserver::NewL();
       
   244 			}
       
   245 		
       
   246 		iAnchorlayout->SetEffectL( KTfxResourceActivate );
       
   247 		iEffectHandle = iAnchorlayout->Identifier();
       
   248 		iAlfEffectObs->SubscribeCallbackL(this,iEffectHandle);
       
   249 		}
       
   250 
       
   251     }
       
   252 
       
   253 // ---------------------------------------------------------------------------
       
   254 // From CAknView
       
   255 // View deactivation function.
       
   256 // ---------------------------------------------------------------------------
       
   257 //
       
   258 void CGlxCloudViewImp::DoMLViewDeactivate()
       
   259 	{
       
   260 	TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewDeactivate");
       
   261 	
       
   262 	delete iMMCNotifier;
       
   263 	iMMCNotifier = NULL;
       
   264 	
       
   265 	//Hide softkeys and toolbar upon view de-activation.
       
   266 	iViewWidget->enableControlPane(EFalse);
       
   267 	if ( EGlxNavigationForwards == iUiUtility->ViewNavigationDirection() )
       
   268         {
       
   269         iViewWidget->enableStatusPane(EFalse);    
       
   270         }
       
   271 	CleanupVisuals ();
       
   272 	}
       
   273 
       
   274 // ---------------------------------------------------------------------------
       
   275 // HandleMskChangedL().
       
   276 // ---------------------------------------------------------------------------
       
   277 //
       
   278 void CGlxCloudViewImp::HandleMskChangedL(TBool aMskEnabled)
       
   279     {
       
   280     TRACER("GLX_CLOUD ::CGlxCloudViewImp::HandleMskChangedL");
       
   281     GLX_LOG_INFO1("GLX_CLOUD ::GLX_CLOUD ::CGlxCloudViewImp::HandleMskChangedL MSk State  %d ",
       
   282         aMskEnabled);
       
   283 	 }
       
   284 
       
   285 // ---------------------------------------------------------------------------
       
   286 // HandleLayoutChanged().
       
   287 // ---------------------------------------------------------------------------
       
   288 //
       
   289 void CGlxCloudViewImp::HandleLayoutChanged()
       
   290     {	
       
   291     iViewWidget->setRect( ClientRect() );
       
   292     SetScrollBarRect();   
       
   293     }
       
   294 
       
   295 // --------------------------------------------------------------------------- 
       
   296 //ControlGroupId()
       
   297 // ---------------------------------------------------------------------------
       
   298 //
       
   299 TInt CGlxCloudViewImp::ControlGroupId()const
       
   300 	{
       
   301 	TRACER("GLX_CLOUD::CGlxCloudViewImp::ControlGroupId");
       
   302 	return reinterpret_cast < TInt > (this);
       
   303 	}
       
   304 	
       
   305 // ---------------------------------------------------------------------------
       
   306 // CleanupVisuals
       
   307 // ---------------------------------------------------------------------------
       
   308 //
       
   309 void CGlxCloudViewImp::CleanupVisuals()
       
   310     {
       
   311     TRACER("GLX_CLOUD::CGlxCloudViewImp::CleanupVisuals()");
       
   312     if( iViewWidget )
       
   313         {        
       
   314         iViewWidget->show(false); 
       
   315         }  
       
   316 
       
   317     if(iScrollWidget)
       
   318         {
       
   319         iScrollWidget->control()->removeEventHandler(*iCloudControl);
       
   320         iScrollWidget =  NULL;
       
   321         }
       
   322     if( iUiUtility )
       
   323         {
       
   324 		IAlfWidgetFactory& widgetFactory = AlfWidgetEnvExtension::widgetFactory(*(iUiUtility->Env ())); 
       
   325         widgetFactory.destroyWidget(iViewWidget);
       
   326         }
       
   327     iViewWidget = NULL; 
       
   328     iScrollbarDefaultBaseElement = NULL;
       
   329     }
       
   330 
       
   331 // ---------------------------------------------------------------------------
       
   332 // HandleEnterKeyEventL
       
   333 // ---------------------------------------------------------------------------
       
   334 //
       
   335 void CGlxCloudViewImp::HandleEnterKeyEventL(TInt aCommand)
       
   336     {
       
   337     HandleViewCommandL(aCommand);
       
   338     }
       
   339 
       
   340 // ---------------------------------------------------------------------------
       
   341 // HandleEnterKeyEventL
       
   342 // ---------------------------------------------------------------------------
       
   343 //
       
   344 void CGlxCloudViewImp::ConstructCloudControlL()
       
   345     {
       
   346    	const char* KScrollBarWidget("scrollbarwidget");
       
   347 	const char* KVerScrollbarWidgetName("alfscrollbarwidget_ver");
       
   348 	const char* KScrollBarModel(/*"mulmodel"*/"scrollbarmodel");
       
   349 
       
   350 	IAlfWidgetFactory& widgetFactory = AlfWidgetEnvExtension::widgetFactory(*(iUiUtility->Env ())); 
       
   351 
       
   352     iViewWidget = widgetFactory.createViewWidget("viewwidget", 0, 0, iDisplay);
       
   353 	iViewWidget->setRect(ClientRect());
       
   354 	iViewWidget->show(true);
       
   355 
       
   356 	IAlfLayoutManager* layoutmanager = IAlfInterfaceBase::makeInterface<
       
   357 			IAlfLayoutManager>(iViewWidget->control());
       
   358 	iViewWidget->setRect(ClientRect());
       
   359    
       
   360     // parent layout handle for scrollbar
       
   361     iScrollPaneHandle = AknLayoutScalable_UiAccel::aa_scroll_pane(0).LayoutLine();
       
   362 
       
   363     iAnchorlayout = &((CAlfAnchorLayout&)layoutmanager->getLayout());
       
   364 
       
   365     iAnchorlayout->SetFlag(EAlfVisualFlagLayoutUpdateNotification);
       
   366     iAnchorlayout->SetFlag(EAlfVisualFlagAutomaticLocaleMirroringEnabled);
       
   367     
       
   368     iCloudControl = CGlxCloudViewControl::NewL (*iDisplay, *iUiUtility->Env (), *iMediaList,
       
   369                *iEmptyListText, *this,*this,iAnchorlayout,*this,*this); 
       
   370     
       
   371     CAlfControlGroup * ctrlGroup = iUiUtility->Env ()->FindControlGroup(0);
       
   372     if(ctrlGroup)
       
   373         {
       
   374         ctrlGroup->AppendL(iCloudControl);
       
   375         }
       
   376    iScrollWidget = widgetFactory.createWidget<IAlfScrollBarWidget>
       
   377     	( KScrollBarWidget, KVerScrollbarWidgetName, *iViewWidget, 0 );
       
   378     	
       
   379     IAlfScrollBarModel* verScrollModel = widgetFactory.createModel<IAlfScrollBarModel> (KScrollBarModel);
       
   380         
       
   381     iScrollWidget->setModel( verScrollModel );
       
   382     
       
   383     IAlfElement* vertBaseElement =(iScrollWidget->control()->findElement ("BaseElement"));
       
   384 
       
   385     iScrollbarDefaultBaseElement=static_cast<IAlfScrollBarDefaultBaseElement*> (
       
   386         vertBaseElement->makeInterface (IAlfScrollBarDefaultBaseElement::type() ) );
       
   387   
       
   388 	if(iScrollWidget) 
       
   389 		{		
       
   390         if(iScrollbarDefaultBaseElement)
       
   391 	        {
       
   392 			iCloudControl->InitializeScrollBar(iScrollWidget);    
       
   393 	        }
       
   394         (iScrollWidget->control())->addEventHandler (iCloudControl);
       
   395 		}		
       
   396 
       
   397     SetScrollBarRect();
       
   398     
       
   399      //acquire the focus so as to get events to your control instead of widgets
       
   400     iCloudControl->AcquireFocus();
       
   401     }
       
   402 	
       
   403 // ---------------------------------------------------------------------------
       
   404 // SetScrollBarRect()
       
   405 // ---------------------------------------------------------------------------
       
   406 //
       
   407 void CGlxCloudViewImp::SetScrollBarRect()
       
   408     {
       
   409     TRect rct  = ClientRect();
       
   410     rct.iBr.iX = rct.iBr.iX - iScrollPaneHandle.iW;
       
   411     // anchor points for cloud control
       
   412     iAnchorlayout->SetAnchor(
       
   413             EAlfAnchorTopLeft, 
       
   414             0,
       
   415             EAlfAnchorOriginLeft,
       
   416             EAlfAnchorOriginTop,
       
   417             EAlfAnchorMetricAbsolute,
       
   418             EAlfAnchorMetricAbsolute,
       
   419             TAlfTimedPoint(0,0));
       
   420 
       
   421     iAnchorlayout->SetAnchor(
       
   422             EAlfAnchorBottomRight, 
       
   423             0,
       
   424             EAlfAnchorOriginLeft,
       
   425             EAlfAnchorOriginTop,
       
   426             EAlfAnchorMetricAbsolute,
       
   427             EAlfAnchorMetricAbsolute,
       
   428             TAlfTimedPoint(ClientRect().iBr.iX - iScrollPaneHandle.iW,(ClientRect().iBr.iY  - ClientRect().iTl.iY)));
       
   429 
       
   430     // anchor points for scrollbar widget
       
   431     iAnchorlayout->SetAnchor(
       
   432             EAlfAnchorTopLeft, 
       
   433             1,
       
   434             EAlfAnchorOriginLeft,
       
   435             EAlfAnchorOriginTop,
       
   436             EAlfAnchorMetricAbsolute,
       
   437             EAlfAnchorMetricAbsolute,
       
   438             TAlfTimedPoint(ClientRect().iBr.iX - iScrollPaneHandle.iW,0));
       
   439 
       
   440     iAnchorlayout->SetAnchor(
       
   441             EAlfAnchorBottomRight, 
       
   442             1,
       
   443             EAlfAnchorOriginLeft,
       
   444             EAlfAnchorOriginTop,
       
   445             EAlfAnchorMetricAbsolute,
       
   446             EAlfAnchorMetricAbsolute,
       
   447             TAlfTimedPoint(ClientRect().iBr.iX ,(ClientRect().iBr.iY  - ClientRect().iTl.iY)));
       
   448 
       
   449     iAnchorlayout->UpdateChildrenLayout(0);
       
   450     }
       
   451     
       
   452 // ---------------------------------------------------------------------------
       
   453 // HandleGridMenuListL()
       
   454 // ---------------------------------------------------------------------------
       
   455 //
       
   456 void CGlxCloudViewImp::HandleGridMenuListL(TInt aCommand)
       
   457     {
       
   458     TRACER("GLX_CLOUD::CGlxCloudViewImp::HandleGridMenuListL");
       
   459     ProcessCommandL(aCommand);
       
   460     }
       
   461 
       
   462 // ----------------------------------------------------------------------------
       
   463 // ViewDynInitMenuPaneL
       
   464 // ----------------------------------------------------------------------------
       
   465 // 
       
   466 void CGlxCloudViewImp::ViewDynInitMenuPaneL(TInt aMenuId, CEikMenuPane* /*aMenuPane*/)
       
   467     {
       
   468     TRACER("GLX_CLOUD::CGlxCloudViewImp::ViewDynInitMenuPaneL");
       
   469     if( aMenuId == R_TAGSBROWSER_MENU)
       
   470         {
       
   471         iCloudControl->ShowContextItemMenuL(EFalse);
       
   472         }
       
   473     }
       
   474 
       
   475 // ---------------------------------------------------------------------------
       
   476 // HandleMMCInsertionL
       
   477 // 
       
   478 // ---------------------------------------------------------------------------
       
   479 void CGlxCloudViewImp::HandleMMCInsertionL()
       
   480     {
       
   481     TRACER("CGlxCloudViewImp::HandleMMCInsertionL()");
       
   482     iMMCState = ETrue;
       
   483     ProcessCommandL(EAknSoftkeyClose);
       
   484     }
       
   485 
       
   486 // ---------------------------------------------------------------------------
       
   487 // HandleMMCRemovalL
       
   488 // 
       
   489 // ---------------------------------------------------------------------------
       
   490 void CGlxCloudViewImp::HandleMMCRemovalL()
       
   491     {
       
   492     TRACER("CGlxCloudViewImp::HandleMMCRemovalL()");
       
   493     ProcessCommandL(EAknSoftkeyExit);
       
   494     }
       
   495 
       
   496 // ---------------------------------------------------------------------------
       
   497 // Foreground event handling function.
       
   498 // ---------------------------------------------------------------------------
       
   499 //
       
   500 void CGlxCloudViewImp::HandleForegroundEventL(TBool aForeground)
       
   501     {
       
   502     TRACER("CGlxCloudViewImp::HandleForegroundEventL");
       
   503     CAknView::HandleForegroundEventL(aForeground);
       
   504     if(iMMCState)
       
   505         {
       
   506         iMMCState = EFalse;
       
   507         ProcessCommandL(EAknSoftkeyClose);
       
   508         }
       
   509     }
       
   510 
       
   511 // ---------------------------------------------------------------------------
       
   512 // HandleEffectCallback
       
   513 // 
       
   514 // ---------------------------------------------------------------------------
       
   515 //
       
   516 void CGlxCloudViewImp::HandleEffectCallback(TInt aType, TInt aHandle, TInt /*aStatus*/)
       
   517     {
       
   518     TRACER("CGlxCloudViewImp::HandleEffectCallback()");
       
   519     if (aHandle == iEffectHandle && aType == EAlfEffectComplete
       
   520 			&& iAnchorlayout)
       
   521         {
       
   522         TRAP_IGNORE(iAnchorlayout->SetEffectL(KTfxResourceNoEffect));
       
   523         }
       
   524     }
       
   525