uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp
branchRCL_3
changeset 72 a5e7a4f63858
parent 64 85902f042028
equal deleted inserted replaced
64:85902f042028 72:a5e7a4f63858
   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         HidePreviewPopup();
   429         if ( iPreviewPopup )
       
   430             {
       
   431             iPreviewPopup->HidePopUp();
       
   432             }
       
   433         if ( iController )
       
   434             {
       
   435             iController->HidePopUp();
       
   436             }
   430 
   437 
   431         if ( iMenuObserver )
   438         if ( iMenuObserver )
   432             {
   439             {
   433             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   440             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   434 
   441 
   454 
   461 
   455         StartControllerIdleL();
   462         StartControllerIdleL();
   456         }
   463         }
   457     else if ( aControl && aEventType == EEventRequestExit )
   464     else if ( aControl && aEventType == EEventRequestExit )
   458         {
   465         {
   459         HidePreviewPopup();
   466         if ( iPreviewPopup )
       
   467             {
       
   468             iPreviewPopup->HidePopUp();
       
   469             }
       
   470 
       
   471         if ( iController )
       
   472             {
       
   473             iController->HidePopUp();
       
   474             }      
   460 
   475 
   461         StartControllerIdleL();
   476         StartControllerIdleL();
   462         }
   477         }
   463     else if ( aControl && aEventType == EEventRequestCancel )
   478     else if ( aControl && aEventType == EEventRequestCancel )
   464         {
   479         {
   465         HidePreviewPopup();
       
   466 
       
   467         if ( iMenuObserver )
   480         if ( iMenuObserver )
   468             {
   481             {
   469             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   482             TBool isAlreadySet = iFlags.IsSet( EIdleDisabled );
   470 
   483 
   471             iFlags.Set( EIdleDisabled );
   484             iFlags.Set( EIdleDisabled );
   504         {
   517         {
   505         iController->UpdateContentSize();
   518         iController->UpdateContentSize();
   506         }
   519         }
   507     }
   520     }
   508 
   521 
   509 
       
   510 // ---------------------------------------------------------------------------
       
   511 // CAknStylusPopUpMenu::HideMenu
       
   512 // ---------------------------------------------------------------------------
       
   513 //
       
   514 void CAknStylusPopUpMenu::HideMenu()
       
   515     {
       
   516     if ( iController )
       
   517         {
       
   518         iController->HidePopUp();
       
   519         }
       
   520     }
       
   521 
       
   522 
       
   523 // -----------------------------------------------------------------------------
   522 // -----------------------------------------------------------------------------
   524 // CAknStylusPopUpMenu::StartControllerIdleL
   523 // CAknStylusPopUpMenu::StartControllerIdleL
   525 // -----------------------------------------------------------------------------
   524 // -----------------------------------------------------------------------------
   526 //
   525 //
   527 void CAknStylusPopUpMenu::StartControllerIdleL()
   526 void CAknStylusPopUpMenu::StartControllerIdleL()
   572 //
   571 //
   573 void CAknStylusPopUpMenu::CleanLocalRef( TAny* aParam )
   572 void CAknStylusPopUpMenu::CleanLocalRef( TAny* aParam )
   574     {
   573     {
   575     static_cast<CAknStylusPopUpMenu*>( aParam )->iIsDeleted = NULL;
   574     static_cast<CAknStylusPopUpMenu*>( aParam )->iIsDeleted = NULL;
   576     }
   575     }
   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     }