783 } |
783 } |
784 |
784 |
785 EXPORT_C TKeyResponse CEikMenuBar::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) |
785 EXPORT_C TKeyResponse CEikMenuBar::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) |
786 { |
786 { |
787 const TInt code=aKeyEvent.iCode; |
787 const TInt code=aKeyEvent.iCode; |
788 |
788 //Filter msk event from dialog page. |
|
789 if ( aKeyEvent.iCode == EKeyOK && aKeyEvent.iModifiers & EModifierSpecial ) |
|
790 { |
|
791 return EKeyWasConsumed; |
|
792 } |
|
793 |
789 if (MenuHasPane()) |
794 if (MenuHasPane()) |
790 { |
795 { |
791 iMenuPane->OfferKeyEventL(aKeyEvent, aType); |
796 iMenuPane->OfferKeyEventL(aKeyEvent, aType); |
792 return (aKeyEvent.iScanCode == EStdKeyYes ? EKeyWasNotConsumed : EKeyWasConsumed); |
797 return (aKeyEvent.iScanCode == EStdKeyYes ? EKeyWasNotConsumed : EKeyWasConsumed); |
793 } |
798 } |
1137 if(AknLayoutUtils::PenEnabled()) |
1142 if(AknLayoutUtils::PenEnabled()) |
1138 { |
1143 { |
1139 // menu pane captures all pointer events, and forwards them to CBA if neccessary |
1144 // menu pane captures all pointer events, and forwards them to CBA if neccessary |
1140 iMenuPane->SetGloballyCapturing(ETrue); |
1145 iMenuPane->SetGloballyCapturing(ETrue); |
1141 iMenuPane->SetPointerCapture(ETrue); |
1146 iMenuPane->SetPointerCapture(ETrue); |
|
1147 if ( feedback ) |
|
1148 { |
|
1149 TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp; |
|
1150 if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) ) |
|
1151 { |
|
1152 if( iExt->iMenuType == EMenuContext || iExt->iMenuType == EMenuEdit ) |
|
1153 { |
|
1154 fbLogicalType = ETouchFeedbackIncreasingPopUp; |
|
1155 } |
|
1156 else |
|
1157 { |
|
1158 fbLogicalType = ETouchFeedbackOptionsMenuOpened; |
|
1159 } |
|
1160 } |
|
1161 feedback->InstantFeedback( |
|
1162 this, |
|
1163 fbLogicalType, |
|
1164 ETouchFeedbackVibra, |
|
1165 TPointerEvent() ); |
|
1166 } |
1142 } |
1167 } |
1143 |
1168 |
1144 iMenuPane->MakeVisible( EFalse ); |
1169 iMenuPane->MakeVisible( EFalse ); |
1145 |
1170 |
1146 // options menu launch animation |
1171 // options menu launch animation |
1147 TBool optMenuFg = iAvkonAppUi->IsForeground(); |
1172 TBool optMenuFg = iAvkonAppUi->IsForeground(); |
1148 |
1173 |
1149 if( optMenuFg ) |
1174 if( optMenuFg ) |
1150 { |
1175 { |
1151 GfxTransEffect::Begin( iMenuPane, KGfxControlAppearAction ); |
1176 GfxTransEffect::Begin( iMenuPane, KGfxControlAppearAction ); |
1152 if( feedback && CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff )) |
|
1153 { |
|
1154 TTouchLogicalFeedback fbLogicalType = ETouchFeedbackOptionsMenuOpened; |
|
1155 if( iExt->iMenuType == EMenuContext || iExt->iMenuType == EMenuEdit ) |
|
1156 { |
|
1157 fbLogicalType = ETouchFeedbackIncreasingPopUp; |
|
1158 } |
|
1159 feedback->InstantFeedback( this, fbLogicalType, |
|
1160 ETouchFeedbackVibra, TPointerEvent() ); |
|
1161 } |
|
1162 } |
1177 } |
1163 |
1178 |
1164 iMenuPane->StartDisplayingMenuPane(NULL, menuPosition, NULL, screenSize.iWidth, EPopupTargetBottomLeft); |
1179 iMenuPane->StartDisplayingMenuPane(NULL, menuPosition, NULL, screenSize.iWidth, EPopupTargetBottomLeft); |
1165 iMenuCba->ActivateL(); |
1180 iMenuCba->ActivateL(); |
1166 |
1181 |
1173 TRect demarcation; |
1188 TRect demarcation; |
1174 CAknTransitionUtils::GetDemarcation( CAknTransitionUtils::EOptionsMenu, |
1189 CAknTransitionUtils::GetDemarcation( CAknTransitionUtils::EOptionsMenu, |
1175 demarcation ); |
1190 demarcation ); |
1176 GfxTransEffect::SetDemarcation( iMenuPane, demarcation ); |
1191 GfxTransEffect::SetDemarcation( iMenuPane, demarcation ); |
1177 GfxTransEffect::End( iMenuPane ); |
1192 GfxTransEffect::End( iMenuPane ); |
1178 } |
|
1179 if( feedback ) |
|
1180 { |
|
1181 feedback->InstantFeedback( this, ETouchFeedbackPopUp, |
|
1182 ETouchFeedbackVibra, TPointerEvent() ); |
|
1183 } |
1193 } |
1184 _AKNTRACE_FUNC_EXIT; |
1194 _AKNTRACE_FUNC_EXIT; |
1185 } |
1195 } |
1186 |
1196 |
1187 |
1197 |