photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp
branchRCL_3
changeset 18 bcb43dc84c44
parent 14 ce1c7ad1f18b
child 25 191387a8b767
equal deleted inserted replaced
14:ce1c7ad1f18b 18:bcb43dc84c44
   187     TShwEventInitialize* init = 
   187     TShwEventInitialize* init = 
   188         dynamic_cast<TShwEventInitialize*>( aEvent );
   188         dynamic_cast<TShwEventInitialize*>( aEvent );
   189     // is it start view
   189     // is it start view
   190     TShwEventStartView* viewEvent = 
   190     TShwEventStartView* viewEvent = 
   191         dynamic_cast<TShwEventStartView*>( aEvent );
   191         dynamic_cast<TShwEventStartView*>( aEvent );
   192     // start transition?
   192     // is it start transition
   193     TShwEventStartTransition* transEvent = 
   193     TShwEventStartTransition* transEvent = 
   194         dynamic_cast<TShwEventStartTransition*>( aEvent );
   194         dynamic_cast<TShwEventStartTransition*>( aEvent );
   195     // was it a pause or resume event?
   195     // was it a pause or resume event
   196     TShwEventPause* pauseEvent = 
   196     TShwEventPause* pauseEvent = 
   197         dynamic_cast<TShwEventPause*>( aEvent );
   197         dynamic_cast<TShwEventPause*>( aEvent );
   198     TShwEventResume* resumeEvent = 
   198     TShwEventResume* resumeEvent = 
   199         dynamic_cast<TShwEventResume*>( aEvent );
   199         dynamic_cast<TShwEventResume*>( aEvent );
   200     // or a navigation event?
   200     // or was it a navigation event
   201     TShwEventNextImage* nextImageEvent = 
   201     TShwEventNextImage* nextImageEvent = 
   202         dynamic_cast< TShwEventNextImage* >( aEvent );
   202         dynamic_cast< TShwEventNextImage* >( aEvent );
   203     TShwEventPreviousImage* previousImageEvent =
   203     TShwEventPreviousImage* previousImageEvent =
   204         dynamic_cast< TShwEventPreviousImage* >( aEvent );
   204         dynamic_cast< TShwEventPreviousImage* >( aEvent );
   205     TShwEventToggleControlUi* toggleControlUiEvent = 
   205     TShwEventToggleControlUi* toggleControlUiEvent = 
   462         {
   462         {
   463         // get the current effect
   463         // get the current effect
   464         MShwEffect* currentEffect = iEffectManager.CurrentEffect();
   464         MShwEffect* currentEffect = iEffectManager.CurrentEffect();
   465         // remove the old layout
   465         // remove the old layout
   466         iSplitter.RemoveLayout( iCurrentVisual );
   466         iSplitter.RemoveLayout( iCurrentVisual );
   467         // was this thumbnail succesfully loaded?
   467         // check if this thumbnail was succesfully loaded
   468 		if ( iFailedThumbnailIndex == currentIndex )
   468 		if ( iFailedThumbnailIndex == currentIndex )
   469 		    {
   469 		    {
   470         	// set the temporary layout for default icon
   470         	// set the temporary layout for default icon
   471         	iSplitter.SetLayoutL( &iDefaultIconLayout, iCurrentVisual );
   471         	iSplitter.SetLayoutL( &iDefaultIconLayout, iCurrentVisual );
   472 		    }
   472 		    }
   543     // get next visual, focus plus 1 modulo itemcount
   543     // get next visual, focus plus 1 modulo itemcount
   544     CAlfVisual* nextVisual = iVisualList.Visual( nextIndex );
   544     CAlfVisual* nextVisual = iVisualList.Visual( nextIndex );
   545 
   545 
   546     // remove old layout
   546     // remove old layout
   547     iSplitter.RemoveLayout( nextVisual );
   547     iSplitter.RemoveLayout( nextVisual );
   548     // was the next thumbnail succesfully loaded?
   548     // Check if the next thumbnail was succesfully loaded
   549 	if ( iFailedThumbnailIndex == nextIndex )
   549 	if ( iFailedThumbnailIndex == nextIndex )
   550 	    {
   550 	    {
   551 		TAlfTimedValue opacity(KMaxOpacity,0);
   551 		TAlfTimedValue opacity(KMaxOpacity,0);
   552 		// Set Opacity to make it visible
   552 		// Set Opacity to make it visible
   553 		nextVisual->SetOpacity(opacity);
   553 		nextVisual->SetOpacity(opacity);
   647         // get the effect and pause it
   647         // get the effect and pause it
   648         effects[ i ]->Resume();
   648         effects[ i ]->Resume();
   649         }
   649         }
   650     CleanupStack::PopAndDestroy( &effects );
   650     CleanupStack::PopAndDestroy( &effects );
   651 
   651 
   652     // did user navigate while paused?
       
   653     if( iUserNavigated )
   652     if( iUserNavigated )
   654         {
   653         { // user navigated while paused
   655         // resume and cancel the transition timer for its next use
   654         // resume and cancel the transition timer for its next use
   656         // if user navigates while pause 
   655         // if user navigates while pause 
   657         // we never continue from transition so we need
   656         // we never continue from transition so we need
   658         // to resume the timer, otherwise it stays paused forever
   657         // to resume the timer, otherwise it stays paused forever
   659         iTransitionTimer->Resume();
   658         iTransitionTimer->Resume();