uifw/EikStd/dlgsrc/EIKDIALG.CPP
branchRCL_3
changeset 13 a8834a2e9a96
parent 12 941195f2d488
child 15 c52421ed5f07
equal deleted inserted replaced
12:941195f2d488 13:a8834a2e9a96
   298 
   298 
   299     // At this point CBA's rect should be correctly set. If it isn't, then
   299     // At this point CBA's rect should be correctly set. If it isn't, then
   300     // assume that dialog didn't properly call CEikDialog::SizeChanged thus 
   300     // assume that dialog didn't properly call CEikDialog::SizeChanged thus 
   301     // embedded softkeys won't work.
   301     // embedded softkeys won't work.
   302     // In that case softkeys are deleted and re-created as a window-owning
   302     // In that case softkeys are deleted and re-created as a window-owning
   303     // component in "legacy" way.    
   303     // component in "legacy" way.
   304     if ( checkCba && extension->iDeleteEmbeddedCba 
   304     if (checkCba && extension->iButtonGroupResourceId != 0 &&
   305 	        && extension->iButtonGroupResourceId != 0 )
   305         (extension->iDeleteEmbeddedCba || Size().iWidth <= 0))
   306         {
   306         {
   307         delete iButtonGroupContainer;
   307         delete iButtonGroupContainer;
   308         iButtonGroupContainer = NULL;
   308         iButtonGroupContainer = NULL;
   309         iButtonGroupContainer = CEikButtonGroupContainer::NewL(
   309         iButtonGroupContainer = CEikButtonGroupContainer::NewL(
   310                 CEikButtonGroupContainer::ECba,
   310                 CEikButtonGroupContainer::ECba,
  1654 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS
  1654 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS
  1655 		GfxTransEffect::NotifyExternalState(EInternalHandleSequence, (const TDesC8*)this);
  1655 		GfxTransEffect::NotifyExternalState(EInternalHandleSequence, (const TDesC8*)this);
  1656 #endif
  1656 #endif
  1657 		GfxTransEffect::Begin(this, KGfxControlAppearAction);
  1657 		GfxTransEffect::Begin(this, KGfxControlAppearAction);
  1658         MTouchFeedback* feedback = NULL;
  1658         MTouchFeedback* feedback = NULL;
  1659 		if(AknLayoutUtils::PenEnabled())
  1659         if( AknLayoutUtils::PenEnabled() )
  1660 		    {
  1660             {
  1661             feedback = static_cast<MTouchFeedback*>(ExtensionInterface(KExIfTactileFeedbackUid));
  1661             feedback = static_cast<MTouchFeedback*>( ExtensionInterface( KExIfTactileFeedbackUid ) );
  1662 		    }
  1662             }
  1663 		if(feedback && CAknTransitionUtils::TransitionsEnabled(AknTransEffect::EComponentTransitionsOff ))
  1663         if( feedback )
  1664 		    {
  1664             {
  1665             feedback->InstantFeedback(this, ETouchFeedbackIncreasingPopUp,
  1665             if( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
  1666                                         ETouchFeedbackVibra, TPointerEvent());
  1666                 {
  1667 		    }
  1667                 feedback->InstantFeedback( this, ETouchFeedbackIncreasingPopUp,
       
  1668                                             ETouchFeedbackVibra, TPointerEvent() );
       
  1669                 }
       
  1670             else
       
  1671                 {
       
  1672                 feedback->InstantFeedback( this, ETouchFeedbackPopUp,
       
  1673                                             ETouchFeedbackVibra, TPointerEvent() );
       
  1674                 }
       
  1675             }
  1668 		GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
  1676 		GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
  1669 		
  1677 		
  1670 		TRect demarcation;
  1678 		TRect demarcation;
  1671 		CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
  1679 		CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
  1672 		GfxTransEffect::SetDemarcation(this, demarcation);
  1680 		GfxTransEffect::SetDemarcation(this, demarcation);
  1675         CAknTransitionUtils::MakeVisibleSubComponents( this,
  1683         CAknTransitionUtils::MakeVisibleSubComponents( this,
  1676                                         CAknTransitionUtils::EAppearVisible );
  1684                                         CAknTransitionUtils::EAppearVisible );
  1677 
  1685 
  1678 		GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this);
  1686 		GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this);
  1679 		GfxTransEffect::End(this);
  1687 		GfxTransEffect::End(this);
  1680 		if(feedback)
       
  1681 		    {
       
  1682             feedback->InstantFeedback(this, ETouchFeedbackPopUp,
       
  1683                                         ETouchFeedbackVibra, TPointerEvent());
       
  1684 		    }
       
  1685 		}
  1688 		}
  1686 	else
  1689 	else
  1687 		{
  1690 		{
  1688 		FadeBehindPopup(ETrue);
  1691 		FadeBehindPopup(ETrue);
  1689 		}
  1692 		}
  2430         if (IsVisible())
  2433         if (IsVisible())
  2431 			DoResourceChangeLayout();
  2434 			DoResourceChangeLayout();
  2432         else if (iExtension)
  2435         else if (iExtension)
  2433         	iExtension->iFlags.Set(CEikDialogExtension::ELayoutChangeWhileInvisible);
  2436         	iExtension->iFlags.Set(CEikDialogExtension::ELayoutChangeWhileInvisible);
  2434 
  2437 
  2435         CCoeControl::HandleResourceChange(aType);
  2438         TBool isForm = ( iPageSelector && iPageSelector->IsForm() );
       
  2439 
       
  2440         if ( !isForm )
       
  2441             {
       
  2442             CCoeControl::HandleResourceChange( aType );
       
  2443             }
       
  2444 
  2436         _AKNTRACE_FUNC_EXIT;
  2445         _AKNTRACE_FUNC_EXIT;
  2437         return;
  2446         return;
  2438         }
  2447         }
  2439     else
  2448     else
  2440     	{
  2449     	{
  2452 	{
  2461 	{
  2453     // Layout must be forced through - bypass optimisations
  2462     // Layout must be forced through - bypass optimisations
  2454     // Must work through all pages
  2463     // Must work through all pages
  2455 	_AKNTRACE_FUNC_ENTER;
  2464 	_AKNTRACE_FUNC_ENTER;
  2456     Layout();
  2465     Layout();
  2457     SizeChanged();
  2466     
  2458     
  2467     TBool isForm = ( iPageSelector && iPageSelector->IsForm() );
  2459     TInt lastPage =  ( iPageSelector->PageContainer()->NumPages() - 1 );
  2468     
  2460     TInt pageIndex = 0;
  2469     if ( !isForm )
  2461     CEikDialogPage* page;
  2470         {
  2462 
  2471         SizeChanged();
  2463     while ( pageIndex++ <= lastPage )
  2472     
  2464         {
  2473         TInt lastPage =  ( iPageSelector->PageContainer()->NumPages() - 1 );
  2465         page = iPageSelector->PageContainer()->Page( pageIndex );
  2474         TInt pageIndex = 0;
  2466         page->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
  2475         CEikDialogPage* page;
       
  2476     
       
  2477         while ( pageIndex++ <= lastPage )
       
  2478             {
       
  2479             page = iPageSelector->PageContainer()->Page( pageIndex );
       
  2480             page->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
       
  2481             }
  2467         }
  2482         }
  2468 
  2483 
  2469    	if (iExtension)
  2484    	if (iExtension)
  2470    		iExtension->iFlags.Clear(CEikDialogExtension::ELayoutChangeWhileInvisible);
  2485    		iExtension->iFlags.Clear(CEikDialogExtension::ELayoutChangeWhileInvisible);
  2471    	_AKNTRACE_FUNC_EXIT;
  2486    	_AKNTRACE_FUNC_EXIT;