uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp
branchRCL_3
changeset 64 85902f042028
parent 56 d48ab3b357f1
child 72 a5e7a4f63858
equal deleted inserted replaced
59:978afdc0236f 64:85902f042028
   424 EXPORT_C void CAknStylusPopUpMenu::HandleControlEventL( CCoeControl* aControl,
   424 EXPORT_C void CAknStylusPopUpMenu::HandleControlEventL( CCoeControl* aControl,
   425                                                         TCoeEvent aEventType )
   425                                                         TCoeEvent aEventType )
   426     {
   426     {
   427     if ( aControl && aEventType == EEventStateChanged )
   427     if ( aControl && aEventType == EEventStateChanged )
   428         {
   428         {
   429         if ( iPreviewPopup )
   429         HidePreviewPopup();
   430             {
       
   431             iPreviewPopup->HidePopUp();
       
   432             }
       
   433         if ( iController )
       
   434             {
       
   435             iController->HidePopUp();
       
   436             }
       
   437 
   430 
   438         if ( iMenuObserver )
   431         if ( iMenuObserver )
   439             {
   432             {
   440             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   433             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   441 
   434 
   461 
   454 
   462         StartControllerIdleL();
   455         StartControllerIdleL();
   463         }
   456         }
   464     else if ( aControl && aEventType == EEventRequestExit )
   457     else if ( aControl && aEventType == EEventRequestExit )
   465         {
   458         {
   466         if ( iPreviewPopup )
   459         HidePreviewPopup();
   467             {
       
   468             iPreviewPopup->HidePopUp();
       
   469             }
       
   470 
       
   471         if ( iController )
       
   472             {
       
   473             iController->HidePopUp();
       
   474             }      
       
   475 
   460 
   476         StartControllerIdleL();
   461         StartControllerIdleL();
   477         }
   462         }
   478     else if ( aControl && aEventType == EEventRequestCancel )
   463     else if ( aControl && aEventType == EEventRequestCancel )
   479         {
   464         {
       
   465         HidePreviewPopup();
       
   466 
   480         if ( iMenuObserver )
   467         if ( iMenuObserver )
   481             {
   468             {
   482             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   469             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   483 
   470 
   484             iFlags.Set( EIdleDisabled );
   471             iFlags.Set( EIdleDisabled );
   585 //
   572 //
   586 void CAknStylusPopUpMenu::CleanLocalRef( TAny* aParam )
   573 void CAknStylusPopUpMenu::CleanLocalRef( TAny* aParam )
   587     {
   574     {
   588     static_cast<CAknStylusPopUpMenu*>( aParam )->iIsDeleted = NULL;
   575     static_cast<CAknStylusPopUpMenu*>( aParam )->iIsDeleted = NULL;
   589     }
   576     }
       
   577 
       
   578 // -----------------------------------------------------------------------------
       
   579 // Hide Preview Popups
       
   580 // -----------------------------------------------------------------------------
       
   581 //
       
   582 void CAknStylusPopUpMenu::HidePreviewPopup()
       
   583     {
       
   584     if ( iPreviewPopup )
       
   585         {
       
   586         iPreviewPopup->HidePopUp();
       
   587         }
       
   588 
       
   589     if ( iController )
       
   590         {
       
   591         iController->HidePopUp();
       
   592         }
       
   593     }