equal
deleted
inserted
replaced
28 #include <aknbutton.h> |
28 #include <aknbutton.h> |
29 #include <vwsdef.h> |
29 #include <vwsdef.h> |
30 #include <aknview.h> |
30 #include <aknview.h> |
31 #include <apgwgnam.h> |
31 #include <apgwgnam.h> |
32 #include <aknlayoutscalable_avkon.cdl.h> |
32 #include <aknlayoutscalable_avkon.cdl.h> |
33 |
33 #include <akntransitionutils.h> |
34 #include <AknTasHook.h> // for testability hooks |
34 #include <AknTasHook.h> // for testability hooks |
35 #include <touchfeedback.h> |
35 #include <touchfeedback.h> |
36 #include <gfxtranseffect/gfxtranseffect.h> |
36 #include <gfxtranseffect/gfxtranseffect.h> |
|
37 #include <akntranseffect.h> |
37 #include <akntransitionutils.h> |
38 #include <akntransitionutils.h> |
38 const TInt KWindowPosition = 1000; // window's position |
39 const TInt KWindowPosition = 1000; // window's position |
39 |
40 |
40 // ============================ MEMBER FUNCTIONS =============================== |
41 // ============================ MEMBER FUNCTIONS =============================== |
41 |
42 |
571 // All other events outside popup's rect (mainly down) |
572 // All other events outside popup's rect (mainly down) |
572 // hides the popup |
573 // hides the popup |
573 |
574 |
574 if ( aPointerEvent.iType != TPointerEvent::EButton1Up ) |
575 if ( aPointerEvent.iType != TPointerEvent::EButton1Up ) |
575 { |
576 { |
|
577 // popup will be hiden when EButton1Down comes. |
576 MTouchFeedback* feedback = MTouchFeedback::Instance(); |
578 MTouchFeedback* feedback = MTouchFeedback::Instance(); |
577 if ( feedback ) |
579 if ( feedback ) |
578 { |
580 { |
579 feedback->InstantFeedback( ETouchFeedbackPopUp ); |
581 TTouchLogicalFeedback feedbackType = ETouchFeedbackPopUp; |
|
582 if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) ) |
|
583 { |
|
584 feedbackType = ETouchFeedbackOptionsMenuClosed; |
|
585 } |
|
586 feedback->InstantFeedback( feedbackType ); |
580 } |
587 } |
581 iCloseMenu = ETrue; |
588 iCloseMenu = ETrue; |
582 iController.HidePopUp(); |
589 iController.HidePopUp(); |
583 } |
590 } |
584 else if ( IsVisible() ) |
591 else if ( IsVisible() ) |
598 ETouchFeedbackVibra, |
605 ETouchFeedbackVibra, |
599 aPointerEvent ); |
606 aPointerEvent ); |
600 } |
607 } |
601 else |
608 else |
602 { |
609 { |
|
610 // popup will be hiden when EButton1Down comes. |
|
611 TTouchLogicalFeedback feedbackType = ETouchFeedbackPopUp; |
|
612 if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) ) |
|
613 { |
|
614 feedbackType = ETouchFeedbackOptionsMenuClosed; |
|
615 } |
603 feedback->InstantFeedback( this, |
616 feedback->InstantFeedback( this, |
604 ETouchFeedbackPopUp, |
617 feedbackType, |
605 aPointerEvent ); |
618 aPointerEvent ); |
606 } |
619 } |
607 } |
620 } |
608 iCloseMenu = ETrue; |
621 iCloseMenu = ETrue; |
609 iController.HidePopUp(); |
622 iController.HidePopUp(); |
610 } |
623 } |
611 } |
624 } |
612 |
625 |
613 // If EDontClose flag is on, also button up is forwarded for base class |
626 // If EDontClose flag is on, also button up is forwarded for base class |
614 if ( iFlags & CAknPreviewPopUpController::EDontClose ) |
627 if ( iFlags & CAknPreviewPopUpController::EDontClose ) |