uifw/EikStd/coctlsrc/EikCcpu.cpp
branchRCL_3
changeset 51 fcdfafb36fe7
parent 10 9f56a4e1b8ab
child 55 aecbbf00d063
equal deleted inserted replaced
50:a1caeb42b3a3 51:fcdfafb36fe7
    27 #include <eikdialg.h>
    27 #include <eikdialg.h>
    28 const TInt KLeftSoftkeyIndex = 0;
    28 const TInt KLeftSoftkeyIndex = 0;
    29 const TInt KRightSoftkeyIndex = 2;
    29 const TInt KRightSoftkeyIndex = 2;
    30 const TInt KNullCommandId = -1;
    30 const TInt KNullCommandId = -1;
    31 
    31 
       
    32 // declare the function IsCbaEmbeddedInDialog
       
    33 TBool IsCbaEmbeddedInDialog( const TInt& aFlags );
       
    34 
    32 /**
    35 /**
    33 * Internal extension class for CAknCcpuSupport.
    36 * Internal extension class for CAknCcpuSupport.
    34 *
    37 *
    35 * @since 9.2
    38 * @since 9.2
    36 *
    39 *
   148 			DeleteCBAL();
   151 			DeleteCBAL();
   149 			CEikAppUi* eikAppUi = (CEikAppUi *)CCoeEnv::Static()->AppUi();
   152 			CEikAppUi* eikAppUi = (CEikAppUi *)CCoeEnv::Static()->AppUi();
   150 			if( eikAppUi && eikAppUi->IsDisplayingDialog() && eikAppUi->TopFocusedControl() )
   153 			if( eikAppUi && eikAppUi->IsDisplayingDialog() && eikAppUi->TopFocusedControl() )
   151 				{
   154 				{
   152 				CEikDialog* dlg = eikAppUi->TopFocusedControl()->MopGetObject( dlg );
   155 				CEikDialog* dlg = eikAppUi->TopFocusedControl()->MopGetObject( dlg );
   153 				if ( dlg )
   156 				if ( dlg && IsCbaEmbeddedInDialog( dlg->DialogFlags() ) )
   154 					{
   157 					{
   155 					CEikButtonGroupContainer* currentCba = dlg->MopGetObject( currentCba );
   158 					CEikButtonGroupContainer* currentCba = dlg->MopGetObject( currentCba );
   156 					
   159 					
   157 					if ( currentCba )
   160 					if ( currentCba )
   158 						{
   161 						{
   334                     }
   337                     }
   335                 }
   338                 }
   336             }
   339             }
   337 		}
   340 		}
   338 	}
   341 	}
       
   342 
       
   343 /**
       
   344  * To detect if CBA is embedded in the diaplog.
       
   345  * @param aFlags it should be CEikDialog::DialogFlags()
       
   346  * @return if an CBA is embedded in the dialog return ETrue 
       
   347  *         else return EFalse
       
   348  */
       
   349 TBool IsCbaEmbeddedInDialog( const TInt& aFlags )
       
   350     {
       
   351     return !( aFlags & EEikDialogFlagFillAppClientRect ) &&
       
   352         !( aFlags & EEikDialogFlagFillScreen ) &&
       
   353         !( aFlags & EEikDialogFlagVirtualInput ) &&
       
   354         !( aFlags & EEikDialogFlagNoEmbeddedSoftkeys );
       
   355     }
       
   356 
       
   357