# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1274781824 -10800 # Node ID 5e18d8c489d6fa564c9ec04a3f310e70b7f74967 # Parent c8fb4cf7b3ae4bac8cfa530a7d97186cb67814f5 Revision: 201019 Kit: 2010121 diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepPredictiveSettingDialog.h --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepPredictiveSettingDialog.h Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepPredictiveSettingDialog.h Tue May 25 13:03:44 2010 +0300 @@ -105,6 +105,13 @@ virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); + protected: + /** + * From CAknDialog + * Lays out the dialog's components when the size of the dialog + * is changed. + */ + virtual void SizeChanged(); private: void ConstructL( TInt aMenuTitleResourceId ); CAknFepPredictiveSettingDialog(TInt aConfirmationQueryResId, TInt aTitlePaneResId); @@ -138,6 +145,7 @@ // the settings item and the flip staus changes. TBool iSettingItemInEditingState; CIdle* iItemCloseEventCheck; + TBool iSimuKey; protected: CAknFepPredictiveSettingList* iSettingsList; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUserDictionaryEditDialog.h --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUserDictionaryEditDialog.h Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/inc/AknFepUserDictionaryEditDialog.h Tue May 25 13:03:44 2010 +0300 @@ -34,7 +34,7 @@ #define AKNFEPUSERDICTIONARYEDITDIALOG_H_ #include -#include +#include #include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepAvkonCandidatePopup.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepAvkonCandidatePopup.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepAvkonCandidatePopup.cpp Tue May 25 13:03:44 2010 +0300 @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include "AknFepAvkonCandidatePopup.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingDialog.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingDialog.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingDialog.cpp Tue May 25 13:03:44 2010 +0300 @@ -42,7 +42,7 @@ #include #include "AknFepPredictiveSettingDialog.h" #include -#include +#include #include #include #include //CAknTitlePane @@ -69,6 +69,7 @@ CAknDialog::ConstructL(aMenuTitleResourceId); PrepareStatusPaneL(); iItemCloseEventCheck = CIdle::NewL(CActive::EPriorityStandard); + iSimuKey = EFalse; } CAknFepPredictiveSettingDialog ::CAknFepPredictiveSettingDialog(TInt aConfirmationQueryResId, TInt aTitlePaneResId): @@ -647,14 +648,18 @@ { if(iSettingItemInEditingState) { - // If we are currently editing the settings item then generate a cancel event - // and start the scheduler so as to close the settings page - // when the blocking call completes. - RWsSession& wsSession = CEikonEnv::Static()->WsSession(); - TKeyEvent escapeEvent = {EKeyEscape, EStdKeyEscape, 0, 0}; - TRAP_IGNORE(CEikonEnv::Static()->SimulateKeyEventL(escapeEvent, EEventKey)); - wsSession.Flush(); - iItemCloseEventCheck->Start( TCallBack(EventCheckCallback, this) ); + if (!iSimuKey) + { + // If we are currently editing the settings item then generate a cancel event + // and start the scheduler so as to close the settings page + // when the blocking call completes. + RWsSession& wsSession = CEikonEnv::Static()->WsSession(); + TKeyEvent escapeEvent = {EKeyEscape, EStdKeyEscape, 0, 0}; + TRAP_IGNORE(CEikonEnv::Static()->SimulateKeyEventL(escapeEvent, EEventKey)); + iSimuKey = ETrue; + wsSession.Flush(); + iItemCloseEventCheck->Start( TCallBack(EventCheckCallback, this) ); + } } else { @@ -786,3 +791,15 @@ } } } + +/** + * From CAknDialog + */ +void CAknFepPredictiveSettingDialog::SizeChanged() + { + if( iSettingsList != NULL && iSettingsList->ListBox() != NULL ) + { + iSettingsList->ListBox()->EnableStretching(EFalse); + } + CAknDialog::SizeChanged(); + } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingList.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingList.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingList.cpp Tue May 25 13:03:44 2010 +0300 @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlDualLanguageSettingDialog.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlDualLanguageSettingDialog.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlDualLanguageSettingDialog.cpp Tue May 25 13:03:44 2010 +0300 @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include "AknFepUIAvkonCtrlDualLanguageSettingDialog.h" #include "AknFepUIAvkonCtrlDualLanguageSettingModel.h" #include "AknFepUIAvkonCtrlDualLanguageSettingData.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapaneseCandidatePane.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapaneseCandidatePane.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapaneseCandidatePane.cpp Tue May 25 13:03:44 2010 +0300 @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapaneseKutenQueryDialog.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapaneseKutenQueryDialog.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapaneseKutenQueryDialog.cpp Tue May 25 13:03:44 2010 +0300 @@ -36,7 +36,7 @@ #include #include #include //keys -#include +#include #include #include "AknFepUIAvkonCtrlJapaneseKutenQueryDialog.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapanesePredictivePane.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapanesePredictivePane.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapanesePredictivePane.cpp Tue May 25 13:03:44 2010 +0300 @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp --- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonImpl.cpp Tue May 25 13:03:44 2010 +0300 @@ -36,7 +36,7 @@ #include #include //CAknEdwinState #include -#include +#include #include "AknFepGlobalEnums.h" #include #include //CAknCharMapDialog diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/conf/aknfep.confml Binary file fep/aknfep/conf/aknfep.confml has changed diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/conf/aknfep_101F876D.crml Binary file fep/aknfep/conf/aknfep_101F876D.crml has changed diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/inc/AknFepPluginManager.h --- a/fep/aknfep/inc/AknFepPluginManager.h Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/inc/AknFepPluginManager.h Tue May 25 13:03:44 2010 +0300 @@ -86,7 +86,8 @@ EPluginSwitchToLandscape, EPluginSwitchMode, EPluginUpdatePenInputITIStatus, - EPluginEnableFetchDimState + EPluginEnableFetchDimState, + EPluginArabicNumModeChanged }; /** @@ -848,6 +849,13 @@ void SetICFTextForSpellL(); void SendMatchListCmd(const RArray& aList); + /** + * Initialize the Menu item in Option Menu for Arabic Finger HWR + * + * @CAknFepUiInterfaceMenuPane* aMenuPane The menu pane used to add more menu items + */ + void InitMenuItemForArabicFingerHwrL(CAknFepUiInterfaceMenuPane* aMenuPane); + private: // Data /** @@ -989,6 +997,7 @@ TBool iLaunchMenu; TBool iInMenu; // need to check whether it can be replaced by iLaunchMenu + TUint iCurMFNECap; MCoeFepAwareTextEditor* iCurEditor; MCoeFepAwareTextEditor* iOldFepAwareEditor; @@ -1071,6 +1080,8 @@ TBool iCurrentDimState; TBool iLaunchSCTInSpell; + + TBool iFocuschangedForSpellEditor; }; class CConnectAo : public CActive diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/inc/AknFepSharedDataInterface.h --- a/fep/aknfep/inc/AknFepSharedDataInterface.h Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/inc/AknFepSharedDataInterface.h Tue May 25 13:03:44 2010 +0300 @@ -548,6 +548,25 @@ * 1 is landscape. */ void SetDefaultArabicFingerHwrOrientation(TInt aValue); + /** + * Returns a value of default arabic finger hwr number mode. + * + * @since 5.2 + * @return 0 is portrait. + * 1 is landscape. + */ + TInt DefaultArabicNumberMode() const; + + /** + * Set a value of default arabic finger hwr number mode. + * + * @since 5.2 + * @param aValue new value set to default arabic finger hwr number mode + * ared data item which represents the default number mode. + * 0 is latin nubmer. + * 1 is arabic native number. + */ + void SetDefaultArabicNumberMode(TInt aValue); private: /** * C++ Constructor diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp --- a/fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp Tue May 25 13:03:44 2010 +0300 @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp --- a/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp Tue May 25 13:03:44 2010 +0300 @@ -600,7 +600,14 @@ } iPermittedRange |= ERangeNumber; } - + else if(aPermittedMode == (EAknEditorNumericInputMode | EAknEditorFullWidthNumericInputMode)) + { + if ( SupportNativeNumberRange() ) + { + iPermittedRange = ERangeNativeNumber; + } + iPermittedRange |= ERangeNumber; + } else if ( aPermittedMode & EAknEditorTextInputMode ) { // Derived from edwin and EAknEditorTextInputMode @@ -664,6 +671,11 @@ iPermittedRange = ERangeNativeNumber; } } + else if( iPermittedMode == + (EAknEditorNumericInputMode | EAknEditorFullWidthNumericInputMode)) + { + iPermittedRange = ERangeNumber | ERangeNativeNumber; + } } SendCommandToServer( ECmdPenInputPermittedRange, iPermittedRange ); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepCaseManager.cpp --- a/fep/aknfep/src/AknFepCaseManager.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepCaseManager.cpp Tue May 25 13:03:44 2010 +0300 @@ -30,7 +30,7 @@ #include "AknFepPanic.h" #include "aknfeppeninputenums.h" -#include +#include #include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepManager.cpp --- a/fep/aknfep/src/AknFepManager.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepManager.cpp Tue May 25 13:03:44 2010 +0300 @@ -69,7 +69,7 @@ #include #include -#include +#include #include #include "aknconsts.h" @@ -1248,8 +1248,7 @@ &wordIndexToSelect ); if( iQwertyInputMode - && ( iExactWordPopupContent->IsPopUpVisible() - || ( iFepPluginManager && iFepPluginManager->IsTooltipOpenOnFSQ() ) ) + && IsExactWordPopUpShown() && aCode == EKeyUpArrow ) { iExactWordPopupContent->HidePopUp(); @@ -1515,10 +1514,7 @@ response = EKeyWasConsumed; } SendEventsToPluginManL( EPluginHideTooltip ); - if(iExactWordPopupContent && iExactWordPopupContent->IsPopUpVisible()) - { - iExactWordPopupContent->HidePopUp(); - } + iExactWordPopupContent->HidePopUp(); #else else if (FepUI()->HandleKeyL(aCode, aLength)) { @@ -1544,10 +1540,7 @@ // also need to check and close tooltip on it. SendEventsToPluginManL( EPluginHideTooltip ); - if(iExactWordPopupContent && iExactWordPopupContent->IsPopUpVisible()) - { - iExactWordPopupContent->HidePopUp(); - } + iExactWordPopupContent->HidePopUp(); if ( IsFlagSet( EFlagInsideInlineEditingTransaction ) ) { TryRemoveNoMatchesIndicatorL(); @@ -3312,7 +3305,10 @@ aResponse = EKeyWasConsumed; #ifdef RD_INTELLIGENT_TEXT_INPUT // Predictive QWERTY changes ----> - ShowExactWordPopupIfNecessaryL(); + if ( iLangMan->IsSplitView() || ( iFepPluginManager && !iFepPluginManager->EnableITIOnFSQ())) + { + ShowExactWordPopupIfNecessaryL(); + } // Predictive QWERTY changes <---- } #endif //RD_INTELLIGENT_TEXT_INPUT @@ -3829,6 +3825,12 @@ case CAknExtendedInputCapabilities::MAknEventObserver::EActivatePenInputRequest: SendEventsToPluginManL( EPluginEditorActivate ); break; + case CAknExtendedInputCapabilities::MAknEventObserver::EClosePenInputRequest: + if ( iFepPluginManager ) + { + iFepPluginManager->ClosePluginInputModeL( EFalse ); + } + break; case CAknExtendedInputCapabilities::MAknEventObserver::EPointerEventReceived: /* @@ -4462,6 +4464,16 @@ iCaseMan->SetCurrentCase(EAknEditorLowerCase); break; case EAknCmdEditModeNumber: + //if current input is arabic finger hwr, then change the default + //number mode. + if(iSharedDataInterface->InputTextLanguage() == ELangArabic + && iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr) + { + iSharedDataInterface->SetDefaultArabicNumberMode(0); + HandleChangeInFocus(); + SendEventsToPluginManL(EPluginArabicNumModeChanged, 0); + break; + } case EJapanFepCmdEditModeNumber: case EChinFepCmdModeNumber: SendEventsToPluginManL( EPluginCloseMode, EFalse ); @@ -4475,10 +4487,22 @@ TryChangeModeL(ENumber); break; case EAknCmdEditModeArabicIndicNumber: - SendEventsToPluginManL( EPluginCloseMode, EFalse ); - HandleChangeInFocus(); - iLanguageCapabilities.iLocalDigitType = EDigitTypeArabicIndic; - TryChangeModeL(ENativeNumber); + //if current input is arabic finger hwr, then change the default + //number mode. + if(iSharedDataInterface->InputTextLanguage() == ELangArabic + && iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr) + { + iSharedDataInterface->SetDefaultArabicNumberMode(1); + SendEventsToPluginManL(EPluginArabicNumModeChanged, 1); + HandleChangeInFocus(); + } + else + { + SendEventsToPluginManL( EPluginCloseMode, EFalse ); + HandleChangeInFocus(); + iLanguageCapabilities.iLocalDigitType = EDigitTypeArabicIndic; + TryChangeModeL(ENativeNumber); + } break; /*For Eastern Arabic Numeric*/ case EAknCmdEditModeEasternArabicIndicNumber: @@ -4603,29 +4627,14 @@ if ( (iLanguageCapabilities.iInputLanguageCode == ELangThai ) && (iMode!=ENumber && iMode != ENativeNumber ) ) { -#ifdef RD_INTELLIGENT_TEXT_INPUT - // if itut call Thai multitap HandleCommandL to Launch SCT - if(!iQwertyInputMode) - { -#endif - TInt resourceId = 0; - if (iAknFepThaiSCTSelector) - { - resourceId = iAknFepThaiSCTSelector->ThaiSCRResourceId(PreviousChar(),EPtiKeyStar); - } - LaunchSpecialCharacterTableL(resourceId, - aCommandId==EAknCmdEditInsertSymbol, - aCommandId==EAknCmdEditInsertSmiley); -#ifdef RD_INTELLIGENT_TEXT_INPUT - } - else - { - CAknFepUIManagerWestern* westernUIManager = static_cast(FepUI()); - LaunchSpecialCharacterTableL(westernUIManager->ThaiSCTResourceId(static_cast(PreviousChar()),EPtiKeyStar), - aCommandId==EAknCmdEditInsertSymbol, - aCommandId==EAknCmdEditInsertSmiley); - } -#endif + TInt resourceId = 0; + if (iAknFepThaiSCTSelector) + { + resourceId = iAknFepThaiSCTSelector->ThaiSCRResourceId(PreviousChar(),EPtiKeyStar); + } + LaunchSpecialCharacterTableL(resourceId, + aCommandId==EAknCmdEditInsertSymbol, + aCommandId==EAknCmdEditInsertSmiley); } else { @@ -4971,29 +4980,25 @@ SendEventsToPluginManL( EPluginSwitchToLandscape); } break; - case EPenInputCmdSwitchToVkeyBasedInput: + /*case EPenInputCmdSwitchToVkeyBasedInput: { SendEventsToPluginManL( EPluginCloseMode, EFalse ); HandleChangeInFocus(); SendEventsToPluginManL( EPluginSwitchMode); } - break; + break;*/ case EPenInputCmdWritingSpeed: { - SetStopProcessFocus(ETrue); - HandleChangeInFocus(); + SetStopProcessFocus(ETrue,EFalse); LaunchWritingSpeedPopupListL(); - HandleChangeInFocus(); - iStopProcessFocus = EFalse; + SetStopProcessFocus(EFalse); } break; case EPenInputCmdGuidingLine: { - SetStopProcessFocus(ETrue); - HandleChangeInFocus(); + SetStopProcessFocus(ETrue,EFalse); LaunchGuidingLinePopupListL(); - HandleChangeInFocus(); - iStopProcessFocus = EFalse; + SetStopProcessFocus(EFalse); } break; default: @@ -8482,7 +8487,7 @@ // TryPopExactWordInOtherPlaceL directly after extracting them from // the OLD ShowExactWordPopupIfNecessaryL. iExactWordPopupContent->HidePopUp(); - SendEventsToPluginManL(EPluginHideTooltip); +// SendEventsToPluginManL(EPluginHideTooltip); if (!iWesternPredictive || !IsFlagSet(EFlagInsideInlineEditingTransaction)) return; @@ -8493,7 +8498,7 @@ return; } - TryPopExactWordInICFL(); + //TryPopExactWordInICFL(); if (iFepPluginManager && !iFepPluginManager->IsTooltipOpenOnFSQ()) TryPopExactWordInOtherPlaceL(); } @@ -8506,21 +8511,30 @@ // Before open tooltip, // also need to check and close tooltip on it. - SendEventsToPluginManL(EPluginHideTooltip); +// SendEventsToPluginManL(EPluginHideTooltip); if (!iWesternPredictive || !IsFlagSet(EFlagInsideInlineEditingTransaction)) + { + SendEventsToPluginManL(EPluginHideTooltip); return; + } TInt activeIdx, secondaryIdx; GetCandidatesWithIndexL(NULL, activeIdx, secondaryIdx); if (activeIdx == secondaryIdx) + { + SendEventsToPluginManL(EPluginHideTooltip); return; + } CDesCArray* candidates = new (ELeave) CDesCArrayFlat(16); CleanupStack::PushL(candidates); GetCandidatesWithIndexL(candidates, activeIdx, secondaryIdx); CleanupStack::PopAndDestroy(candidates); if (activeIdx == secondaryIdx) + { + SendEventsToPluginManL(EPluginHideTooltip); return; + } if (iFepPluginManager) SendEventsToPluginManL(EPluginShowTooltip, secondaryIdx); @@ -12983,7 +12997,8 @@ // Add This condition for Phonebook, ReTe, PF52.50_2008_wk32: // Navigation bar disappears after tapping find pane and then returning back to Names list view. if (!(editingStateIndicator == (MAknEditingStateIndicator*)iIndicator && - ( iFepPluginManager && iFepPluginManager->PluginInputMode() == EPluginInputModeItut ) && + ( iFepPluginManager && ( iFepPluginManager->PluginInputMode() == EPluginInputModeItut + || iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ) ) && IsFindPaneEditor())) { editingStateIndicator->SetState(newState); @@ -15106,7 +15121,12 @@ TKeyPressLength aLength) { TKeyResponse response = EKeyWasNotConsumed; - + if ( iFepPluginManager && iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr + && aCode == EKeyBackspace ) + { + return response; + } + if (TryHandleCommonArrowAndBackspaceFunctionalityL(aCode, response)) { return response; @@ -18216,7 +18236,8 @@ } if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap && ( R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY == currentEditorSCTResId || - R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId ) ) + R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId || + R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId) ) { TBool isEmpty = ETrue; TRAP_IGNORE(isEmpty = GetSctLengthL(charMap)); @@ -18378,7 +18399,28 @@ SetCcpuFlag(ECcpuStateSupressCursorMoveToEnd); // after closing SCT, need change dim state. SendEventsToPluginManL(EPluginEnableFetchDimState); - +#ifdef RD_SCALABLE_UI_V2 + iNotifyPlugin = EFalse; + if( iFepFullyConstructed && iFepPluginManager) + { + if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut || + iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ || + iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr) + { + SetStopProcessFocus(EFalse); + } + else + { + HandleChangeInFocus(); + } + } + else + { + HandleChangeInFocus(); + } + // Set the flag, not change focus for next. + iNotifyPlugin = ETrue; +#endif //Removes auto-complition part if SCT is launched and any special character is selected #ifdef RD_INTELLIGENT_TEXT_INPUT @@ -18431,9 +18473,6 @@ iUncommittedText.iAnchorPos); } } - // Get new InputCapabilities immediatly. - CCoeEnv* coeEnv = CCoeEnv::Static(); - iInputCapabilities = static_cast(coeEnv->AppUi())->InputCapabilities(); if (EditorState()) { if (charAsDesc[0] == CEditableText::EParagraphDelimiter) @@ -18474,28 +18513,6 @@ } } } -#ifdef RD_SCALABLE_UI_V2 - iNotifyPlugin = EFalse; - if( iFepFullyConstructed && iFepPluginManager) - { - if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut || - iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ || - iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr) - { - SetStopProcessFocus(EFalse); - } - else - { - HandleChangeInFocus(); - } - } - else - { - HandleChangeInFocus(); - } - // Set the flag, not change focus for next. - iNotifyPlugin = ETrue; -#endif } else { @@ -18795,11 +18812,13 @@ iInputCapabilities.FepAwareTextEditor()-> GetCursorSelectionForFep(currentEditorSelection); } - - if(!IsMfneEditor() && - (PluginInputMode() == EPluginInputModeItut || - PluginInputMode() == EPluginInputModeFSQ) && - currentEditorSelection.Length() != 0) + + TInt inputMode = PluginInputMode(); + TBool isArabicFingerHwr = (inputMode == EPluginInputModeFingerHwr && + GetInputLanguageFromSharedDataInterface() == ELangArabic); + if(!IsMfneEditor() && (inputMode == EPluginInputModeItut || + inputMode == EPluginInputModeFSQ || isArabicFingerHwr) + && currentEditorSelection.Length() != 0) { if ((aKeyEvent.iScanCode == EStdKeyLeftArrow) || (aKeyEvent.iScanCode == EStdKeyRightArrow)) @@ -20722,12 +20741,18 @@ void CAknFepManager::HideExactWordPopUp() { - iExactWordPopupContent->HidePopUp(); + iExactWordPopupContent->HidePopUp(); + SendEventsToPluginManL( EPluginHideTooltip ); } TBool CAknFepManager::IsExactWordPopUpShown() { -return iExactWordPopupContent->IsPopUpVisible(); +#ifdef RD_SCALABLE_UI_V2 + return iExactWordPopupContent->IsPopUpVisible() + || ( iFepPluginManager && iFepPluginManager->IsTooltipOpenOnFSQ() ); +#else + return iExactWordPopupContent->IsPopUpVisible(); +#endif // RD_SCALABLE_UI_V2 } void CAknFepManager::StopDisplayingMenuBar() { diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepPluginManager.cpp --- a/fep/aknfep/src/AknFepPluginManager.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepPluginManager.cpp Tue May 25 13:03:44 2010 +0300 @@ -42,7 +42,7 @@ #include // KAknQwertyInputModeActive #include #include -#include +#include #include #include //CAknIndicatorContainer #include @@ -685,6 +685,7 @@ break; case ESignalEnterSpellMode: { + iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputDisableLayoutDrawing,ETrue); iFepMan.LaunchEditWordQueryL(); } break; @@ -693,6 +694,10 @@ TInt* ptrData = (TInt*)(pBuf.Ptr()); TBool exitbyok = *(ptrData); + //remove spell mode editor will cause focus change, so as pen UI is closed and opened again. + iFocuschangedForSpellEditor = ETrue; + iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputDisableLayoutDrawing,ETrue); + exitbyok ? iFepMan.ExitPluginSpellModeByOk() : iFepMan.ExitPluginSpellModeByCancel(); } @@ -770,6 +775,54 @@ iFepMan.PtiEngine()->CommitCurrentWord(); } break; + case ESignalDeleteLastInput: + { + + iFepMan.SetFlag( CAknFepManager::EFlagSupressAutoUpdate ); + + //set selection + MCoeFepAwareTextEditor* edit = iFepMan.FepAwareTextEditor(); + if( iFepMan.IsFepAwareTextEditor() && edit ) + { + TCursorSelection curSor; + edit->GetCursorSelectionForFep(curSor); + if ( curSor.iAnchorPos == curSor.iCursorPos ) + { + curSor.iAnchorPos = curSor.iCursorPos - iLastSubmitCount; + + if (curSor.iAnchorPos<0 || + curSor.iAnchorPos>edit->DocumentLengthForFep()) + { + break; + } + + if (curSor.iCursorPos > curSor.iAnchorPos) + { + edit->SetCursorSelectionForFepL(curSor); + } + } + TBuf<1> backSpace; + backSpace.Append(TChar(EKeyBackspace)); + SubmitUiPluginTextL(backSpace, EKeyEvent); + } + iFepMan.ClearFlag( CAknFepManager::EFlagSupressAutoUpdate ); + + } + break; + case ESignalArabicSCTChar: + { + TPtrC ptr( const_cast(pBuf.Ptr()), pBuf.Length()); +// if(iFepMan.InputMode() == ELatin && (iPluginInputMode == EPluginInputModeVkb || +// iPluginInputMode == EPluginInputModeFSQ)) +// { +// AdjustDataCase( ptr ); +// } + iFepMan.StartInlineEditL(ptr); + iFepMan.CommitInlineEditL(); + SendIcfDataL( EPluginSyncAll ); +// OnPenInputServerKeyEventL(pBuf); + } + break; default: break; } @@ -1019,6 +1072,13 @@ iNeedFetchDimState = ETrue; } break; + case EPluginArabicNumModeChanged: + if(iCurrentPluginInputFepUI) + { + iCurrentPluginInputFepUI->HandleCommandL( + ECmdPeninputArabicNumModeChanged,aEventData); + } + break; default: break; } @@ -1107,15 +1167,39 @@ ( aSuggestMode == EPluginInputModeFSQ && ( iDefaultOrientation == CAknAppUiBase::EAppUiOrientationPortrait || ( !landscape && !iAvkonAppUi->OrientationCanBeChanged() ) ) ); + if ( disableFSQ ) { iPenInputServer.SetDisabledLayout( EPluginInputModeFSQ ); } - - if ( aSuggestMode == EPluginInputModeFSQ || (aSuggestMode == EPluginInputModeFingerHwr - && iSharedData.InputTextLanguage() == ELangArabic - && iSharedData.AutoRotateEnabled())) + + TBool disableITUT = + ( iDefaultOrientation == CAknAppUiBase::EAppUiOrientationLandscape || + ( landscape && !iAvkonAppUi->OrientationCanBeChanged() ) ) ; + + if( disableITUT ) + { + //disable V-ITUT, and if current aSuggestMode is EPluginInputModeItut, replace it with EPluginInputModeFSQ; + iPenInputServer.SetDisabledLayout( EPluginInputModeItut ); + if( aSuggestMode == EPluginInputModeItut ) + { + aSuggestMode = EPluginInputModeFSQ; + } + } + else + { + // if V-ITUT had been disabled before, enable it now; + TInt disableMode = iPenInputServer.DisabledLayout(); + if( disableMode & EPluginInputModeItut ) + { + iPenInputServer.SetDisabledLayout( -1 );//reset + iPenInputServer.SetDisabledLayout( disableMode & ~EPluginInputModeItut ); + } + } + + + if ( aSuggestMode == EPluginInputModeFSQ) { TPluginInputMode tempInputMode = iPluginInputMode; iPluginInputMode = aSuggestMode; @@ -1128,8 +1212,7 @@ else { if ( (!iSharedData.AutoRotateEnabled() - && aSuggestMode == EPluginInputModeFSQ) || - (aSuggestMode == EPluginInputModeFingerHwr)) + && aSuggestMode == EPluginInputModeFSQ)) { iFepMan.SetNotifyPlugin( EFalse ); iAvkonAppUi->SetOrientationL( CAknAppUiBase::EAppUiOrientationLandscape ); @@ -1187,7 +1270,14 @@ { isSplit = EFalse; } + + if ( iLangMan.IsSplitView() && !isSplit ) + { + NotifyAppUiImeTouchWndStateL( EFalse ); //restore layout + } + iLangMan.SetSplitView(isSplit); + MAknFepManagerInterface* fepUI = iLangMan.GetPluginInputFepUiL( aSuggestMode, @@ -1367,7 +1457,17 @@ InformMfneUiStatusL( EFalse ); iPenInputServer.ClearServerEvent(); - iCurrentPluginInputFepUI->CloseUI(); + if(iFocuschangedForSpellEditor) + { + iFocuschangedForSpellEditor = EFalse; + //disable the redrawing, it will be redrawn in + //iCurrentPluginInputFepUI->HandleCommandL(ECmdPeninputDisableLayoutDrawing,ETrue); + return; //don't close the UI if this is caused by removing spell editor + } + else + { + iCurrentPluginInputFepUI->CloseUI(); + } if( aResetState ) { iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputWindowClose); @@ -1415,9 +1515,9 @@ return; } - if ( iPluginInputMode == EPluginInputModeFSQ && - !iSharedData.AutoRotateEnabled() || (iPluginInputMode == EPluginInputModeFingerHwr + if ( (iPluginInputMode == EPluginInputModeFSQ || (iPluginInputMode == EPluginInputModeFingerHwr && iSharedData.InputTextLanguage() == ELangArabic)) + && !iSharedData.AutoRotateEnabled() ) { return; } @@ -1553,6 +1653,11 @@ break; case EPenInputCmdVITUT: { + //Here calling this function is to reset menu state when the focus change caused by + //the screen orientation, in the normal circumstance the foucus change should not + //occur while the screen orientation is handling. So directly resetting menu state + //to avoid the above case, preconditon is that the option menu must be closed. + ResetMenuState(); ClosePluginInputModeL(ETrue); iFepMan.TryCloseUiL(); TryChangePluginInputModeByModeL(EPluginInputModeItut, @@ -1562,6 +1667,11 @@ break; case EPeninputCmdFSQ: { + //Here calling this function is to reset menu state when the focus change caused by + //the screen orientation, in the normal circumstance the foucus change should not + //occur while the screen orientation is handling. So directly resetting menu state + //to avoid the above case, preconditon is that the option menu must be closed. + ResetMenuState(); ClosePluginInputModeL(ETrue); iFepMan.TryCloseUiL(); TryChangePluginInputModeByModeL(EPluginInputModeFSQ, @@ -1571,6 +1681,11 @@ break; case EPeninputCmdHwr: { + //Here calling this function is to reset menu state when the focus change caused by + //the screen orientation, in the normal circumstance the foucus change should not + //occur while the screen orientation is handling. So directly resetting menu state + //to avoid the above case, preconditon is that the option menu must be closed. + ResetMenuState(); ClosePluginInputModeL(ETrue); iFepMan.TryCloseUiL(); TryChangePluginInputModeByModeL( EPluginInputModeFingerHwr, @@ -1940,80 +2055,92 @@ aMenuPane->SetItemDimmed(EPenInputCmdVITUT, EFalse); } - //if ( iFepMan.IsArabicInputLanguage() && ( curInputMode != EPluginInputModeFingerHwr ) - // && !( disabledInputMode & EPluginInputModeFingerHwr )) - // { - // aMenuPane->SetItemDimmed( EPeninputCmdHwr, EFalse ); - // } - //For arabic finger hwr input orientation. - TInt index = 0; - if(iPluginInputMode == EPluginInputModeFingerHwr - && (ELangArabic == iSharedData.InputTextLanguage()) - && (!iSharedData.AutoRotateEnabled())) - { - TBool disableMenu = ETrue; - TPixelsTwipsAndRotation size; - CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size); - TBool landscape = size.iPixelSize.iWidth > size.iPixelSize.iHeight; - if(landscape && aMenuPane->MenuItemExists(EPenInputCmdHwrInputToPortrait, index)) - { - disableMenu = EFalse; - aMenuPane->SetItemDimmed(EPenInputCmdHwrInputToPortrait,disableMenu); - } - index = 0; - if(!landscape && aMenuPane->MenuItemExists(EPenInputCmdHwrInputToLandscape, index)) - { - disableMenu = EFalse; - aMenuPane->SetItemDimmed(EPenInputCmdHwrInputToLandscape,disableMenu); - } - } - - //For arabic finger hwr switch to key based input. - index = 0; - if(aMenuPane->MenuItemExists( - EPenInputCmdSwitchToVkeyBasedInput, index)) + if ( FeatureManager::FeatureSupported( KFeatureIdArabicHandwritingRecognitionInput ) + &&iFepMan.IsArabicInputLanguage() + && ( curInputMode != EPluginInputModeFingerHwr ) + && !( disabledInputMode & EPluginInputModeFingerHwr )) + { + aMenuPane->SetItemDimmed( EPeninputCmdHwr, EFalse ); + } + + // check if this is the arabic finger hwr + TBool isArabicFingerHwr = (iPluginInputMode == EPluginInputModeFingerHwr + && ELangArabic == iSharedData.InputTextLanguage()); + + // Initialize the menu item for Arabic Finger HWR + if(isArabicFingerHwr) { - TBool disableMenu = ETrue; - if(iPluginInputMode == EPluginInputModeFingerHwr - && (ELangArabic == iSharedData.InputTextLanguage())) - { - disableMenu = EFalse; - } - aMenuPane->SetItemDimmed(EPenInputCmdSwitchToVkeyBasedInput,disableMenu); - } - //For arabic finger hwr writing speed. - index = 0; - if(aMenuPane->MenuItemExists( - EPenInputCmdWritingSpeed, index)) - { - TBool disableMenu = ETrue; - if(iPluginInputMode == EPluginInputModeFingerHwr - && (ELangArabic == iSharedData.InputTextLanguage())) - { - disableMenu = EFalse; - } - aMenuPane->SetItemDimmed(EPenInputCmdWritingSpeed,disableMenu); - } - //For arabic finger hwr guide line. - index = 0; - if(aMenuPane->MenuItemExists( - EPenInputCmdGuidingLine, index)) - { - TBool disableMenu = ETrue; - if(iPluginInputMode == EPluginInputModeFingerHwr - && (ELangArabic == iSharedData.InputTextLanguage())) - { - disableMenu = EFalse; - } - aMenuPane->SetItemDimmed(EPenInputCmdGuidingLine,disableMenu); - } + InitMenuItemForArabicFingerHwrL(aMenuPane); + } iLangMan.CurrentImePlugin()->DynInitMenuPaneL(aMenuPane); } - - - } - + } + +void CAknFepPluginManager::InitMenuItemForArabicFingerHwrL(CAknFepUiInterfaceMenuPane* aMenuPane) + { + TInt index = 0; + TBool isAutoRotateEnabled = iSharedData.AutoRotateEnabled(); + // add menu item to switch to landscape or protrait + if(!isAutoRotateEnabled) + { + TPixelsTwipsAndRotation size; + CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size); + TBool landscape = size.iPixelSize.iWidth > size.iPixelSize.iHeight; + if(landscape) + { + index = 0; + // add switch to protrait + if(aMenuPane->MenuItemExists(EPenInputCmdHwrInputToPortrait, index)) + { + aMenuPane->SetItemDimmed(EPenInputCmdHwrInputToPortrait,EFalse); + } + } + else + { + index = 0; + // add switch to landscape + if(aMenuPane->MenuItemExists(EPenInputCmdHwrInputToLandscape, index)) + { + aMenuPane->SetItemDimmed(EPenInputCmdHwrInputToLandscape,EFalse); + } + } + } + + // hide the setting menu +// index = 0; +// if(aMenuPane->MenuItemExists(EPenInputCmdSetting, index)) +// { +// aMenuPane->SetItemDimmed(EPenInputCmdSetting, ETrue); +// } + + //Show number mode menu item. + if(iFepMan.InputMode() == ENumber || iFepMan.InputMode() == ENativeNumber) + { + if(iSharedData.DefaultArabicNumberMode()) + { + aMenuPane->SetItemDimmed(EAknCmdEditModeNumber, EFalse); + } + else + { + aMenuPane->SetItemDimmed(EAknCmdEditModeArabicIndicNumber, EFalse); + } + } + // add the writing speed menu + index = 0; + if(aMenuPane->MenuItemExists(EPenInputCmdWritingSpeed, index)) + { + aMenuPane->SetItemDimmed(EPenInputCmdWritingSpeed,EFalse); + } + + // add the guidingline menu + index = 0; + if(aMenuPane->MenuItemExists(EPenInputCmdGuidingLine, index)) + { + aMenuPane->SetItemDimmed(EPenInputCmdGuidingLine,EFalse); + } + } + // --------------------------------------------------------------------------- // CAknFepPluginManager::OnFocusChangedL // (other items were commented in a header) @@ -2149,7 +2276,8 @@ if ( enableAdaptiveSearch ) { if(!(iInMenu && ( iPluginInputMode == EPluginInputModeItut || - iPluginInputMode == EPluginInputModeFSQ ))) + iPluginInputMode == EPluginInputModeFSQ || + iPluginInputMode ==EPluginInputModeFingerHwr))) { ClosePluginInputModeL(ETrue); if(iPenInputSvrConnected ) //lost foreground @@ -2867,8 +2995,11 @@ // iPenInputServer.UpdateAppInfo(KNullDesC, EAppIndicatorMsg); iPluginInputMode = (TPluginInputMode)iLangMan.CurrentImePlugin()->CurrentMode(); - - iPenInputServer.SetDataQueryPopped(IsDisplayDataQuery()); + + // Not only for data query, but also for other pop dialogs contain editor. + //iPenInputServer.SetDataQueryPopped(IsDisplayDataQuery()); + iPenInputServer.SetDataQueryPopped(CCoeEnv::Static()->AppUi()->IsDisplayingDialog() && + CCoeEnv::Static()->AppUi()->TopFocusedControl()); //adjust VKB window if data query dialog is displaying if(IsDisplayDataQuery()) @@ -2891,7 +3022,9 @@ if ( !NotifyInGlobalNoteEditorL() ) { + iFocuschangedForSpellEditor = EFalse; // restore the flag iCurrentPluginInputFepUI->ActivateUI(); + iNeedFetchDimState = ETrue; } iFepMan.UpdateIndicators(); @@ -4611,6 +4744,20 @@ { iSpell->InputPane()->InputWin()->SetAknEditorCurrentCase(editorCase); iSpell->InputPane()->InputWin()->SetAknEditorCurrentInputMode(EAknEditorTextInputMode); + if ( iLangMan.IsSplitView() ) + { + iSpell->InputPane()->InputWin()->SetAknEditorFlags( + iSpell->InputPane()->InputWin()->AknEdwinFlags() | + aEditorFlag | EAknEditorFlagNoT9 | + EAknEditorFlagEnablePartialScreen ); + } + else + { + iSpell->InputPane()->InputWin()->SetAknEditorFlags( + iSpell->InputPane()->InputWin()->AknEdwinFlags() | + aEditorFlag | EAknEditorFlagNoT9 ); + } + iSpell->MakeVisible( ETrue ); iSpell->SetInputWinFocus( ETrue ); } @@ -5022,7 +5169,7 @@ if(!iPenInputSvrConnected ) { return; - } + } if (!(PluginInputMode() == EPluginInputModeItut || PluginInputMode() == EPluginInputModeFSQ || @@ -5035,9 +5182,15 @@ if (aUpdateEditor && !iInMenu) { if(iFepMan.FepAwareTextEditor()) - iCurEditor = iFepMan.FepAwareTextEditor(); + { + iCurMFNECap = iFepMan.IsMfneEditor() ? iFepMan.ExtendedInputCapabilities() : 0; + iCurEditor = iFepMan.FepAwareTextEditor(); + } else - iCurEditor = NULL; + { + iCurMFNECap = 0; + iCurEditor = NULL; + } } iInMenu = ETrue; @@ -5056,9 +5209,10 @@ if(!iPenInputSvrConnected ) { return; - } - + } + iInMenu = EFalse; + iCurMFNECap = 0; iCurEditor = NULL; if (aUnDim) { @@ -5138,7 +5292,7 @@ void CAknFepPluginManager::InformMfneUiStatusL( TBool aOpened ) { - if ( iMfne && iMfneChanged ) + if ( iMfne && ( iMfneChanged || !aOpened )) { //make the selection longer than maximum length of current //text, so it won't change the behavior of MFNE editor which @@ -5197,7 +5351,8 @@ //if it's in global notes, show it. if(EPluginInputModeItut == PluginInputMode() || - EPluginInputModeFSQ == PluginInputMode() ) + EPluginInputModeFSQ == PluginInputMode() || + EPluginInputModeFingerHwr == PluginInputMode()) { if(iInGlobleNoteEditor && iPenInputSvrConnected) { @@ -5608,10 +5763,19 @@ // void CAknFepPluginManager::SetItiStateL() { - if ( iIsITIConfigured || !IsSupportITIOnFSQ() ) + if ( !IsSupportITIOnFSQ() ) { return; } + if ( iIsITIConfigured ) + { + // if fep state has been configed to iti status before, + // there is no need to config fep state again, + // but sending command to fsq to update iti status flag is needed. + iCurrentPluginInputFepUI->HandleCommandL( ECmdPeninputITIStatus, + iFepMan.WesternPredictive() ); + return; + } // 1. Config keyboard layout type SetItiKeyboardLayoutL(); @@ -5794,7 +5958,21 @@ //Normal editors CAknEdwinState* state = iFepMan.EditorState(); if (iCurEditor && state == NULL) - state = static_cast (iCurEditor->Extension1()->State(KNullUid)); + { + if( iCurMFNECap ) + { + return CAknExtendedInputCapabilities::EInputEditorPartialScreen == + ( iCurMFNECap & CAknExtendedInputCapabilities::EInputEditorPartialScreen ); + } + else + { + MCoeFepAwareTextEditor_Extension1* extension = iCurEditor->Extension1(); + if( extension ) + { + state = static_cast( extension->State(KNullUid) ); + } + } + } if ( state ) { return EAknEditorFlagEnablePartialScreen == diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepSharedDataInterface.cpp --- a/fep/aknfep/src/AknFepSharedDataInterface.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepSharedDataInterface.cpp Tue May 25 13:03:44 2010 +0300 @@ -1860,6 +1860,35 @@ } } +/** + * Returns a value of default arabic finger hwr number mode. + * + * @since 5.2 + * @return Value of default arabic finger hwr number mode. + */ +TInt CAknFepSharedDataInterface::DefaultArabicNumberMode() const + { + TInt value = 0; + if (iAknFepRepository) + { + iAknFepRepository->Get(KAknFepDefaultArabicNumberMode, value); + } + return value; + } + +/** + * Set a value of default arabic finger hwr number mode. + * + * @since 5.2 + * @param aValue new value set to default arabic finger hwr number mode shared data item + */ +void CAknFepSharedDataInterface::SetDefaultArabicNumberMode(TInt aValue) + { + if (iAknFepRepository) + { + iAknFepRepository->Set(KAknFepDefaultArabicNumberMode, aValue); + } + } #endif // End of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepThaiSCTSelector.cpp --- a/fep/aknfep/src/AknFepThaiSCTSelector.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepThaiSCTSelector.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyCangJie.cpp --- a/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyCangJie.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyCangJie.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include "AknFepManager.h" //FepMan flag #include "AknFepUICtrlInputPane.h" #include "AknFepUiCtrlContainerChinese.h" -#include +#include #include //CPtiEngine #include //keys #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.cpp --- a/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUIInputStateEntryMiniQwertyPinyinPhrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include "AknFepManager.h" //FepMan flag #include "AknFepUICtrlInputPane.h" #include "AknFepUiCtrlContainerChinese.h" -#include +#include #include //CPtiEngine #include //keys #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateCandidateHalfQwertyChinesePhrase.cpp --- a/fep/aknfep/src/AknFepUiInputStateCandidateHalfQwertyChinesePhrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateCandidateHalfQwertyChinesePhrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -39,7 +39,7 @@ #include "AknFepUICtrlPinyinPopup.h" #include "AknFepUIManagerStateInterface.h" #include "AknFepManager.h" -#include +#include // Constant definition const TInt KMinCandidateCount = 1; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateCandidateHiraganaKanji.cpp --- a/fep/aknfep/src/AknFepUiInputStateCandidateHiraganaKanji.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateCandidateHiraganaKanji.cpp Tue May 25 13:03:44 2010 +0300 @@ -42,7 +42,7 @@ #include // keys #include #include // MPtiEngineCompositionDataInterfac -#include +#include // CONSTANTS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.cpp --- a/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -41,7 +41,7 @@ #include "aknfepuictrleditpane.h" //phrase creation #include "AknFepUIManagerStateInterface.h" #include "AknFepManager.h" -#include +#include // --------------------------------------------------------------------------- // AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase:: diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.cpp --- a/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyZhuyinPhrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -38,7 +38,7 @@ #include "AknFepUICtrlInputPane.h" #include "AknFepUIManagerStateInterface.h" #include "AknFepManager.h" -#include +#include #include "aknfepuictrleditpane.h" //for zhuyin phrase creation #include "aknfepinputstateminiqwertyzhuyinkeymap.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateCandidateRetroActive.cpp --- a/fep/aknfep/src/AknFepUiInputStateCandidateRetroActive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateCandidateRetroActive.cpp Tue May 25 13:03:44 2010 +0300 @@ -42,7 +42,7 @@ #include #include // MPtiEngineCompositionDataInterfac #include -#include +#include // CONSTANTS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateConversionHiraganaKanji.cpp --- a/fep/aknfep/src/AknFepUiInputStateConversionHiraganaKanji.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateConversionHiraganaKanji.cpp Tue May 25 13:03:44 2010 +0300 @@ -36,7 +36,7 @@ #include // keys #include #include // MPtiEngineCompositionDataInterface -#include +#include // CONSTANTS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryHalfQwertyWesternPredictive.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryHalfQwertyWesternPredictive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryHalfQwertyWesternPredictive.cpp Tue May 25 13:03:44 2010 +0300 @@ -40,7 +40,7 @@ #include //MPtiEngineCompositionDataInterface #include //FeatureManager #include -#include +#include #include // TODO: Remove this include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryHiraganaKanji.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryHiraganaKanji.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryHiraganaKanji.cpp Tue May 25 13:03:44 2010 +0300 @@ -36,7 +36,7 @@ #include // keys #include #include // MPtiEngineCompositionDataInterface -#include +#include // CONSTANTS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryIndicPredictive.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryIndicPredictive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryIndicPredictive.cpp Tue May 25 13:03:44 2010 +0300 @@ -30,7 +30,7 @@ #include "AknFepUIManagerStateInterface.h" //MAknFepUIManagerStateInterface #include "AknFepPanic.h" #include "AknFepManagerUIInterface.h" -#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -41,7 +41,7 @@ #include #include #include //keys -#include +#include const TInt KInputPaneLength = 32; _LIT(KSep, "'"); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryPinyinPhrase.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryPinyinPhrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryPinyinPhrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -40,7 +40,7 @@ #include //CPtiEngine #include //keys #include -#include +#include #include const TText KPinyinTone0Valid = 0x02C9; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp Tue May 25 13:03:44 2010 +0300 @@ -41,7 +41,7 @@ #include //MPtiEngineCompositionDataInterface #include //FeatureManager #include -#include +#include static const TInt KKeyMappingsLength = 63; @@ -458,6 +458,12 @@ TBool wasInlineEditing = EFalse; wasInlineEditing = fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction); + + if(aKey == EStdKeySpace && tailLength > 0) + { + fepMan->RemoveSuggestedAdvanceCompletionL(); + } + ptiengine->CommitCurrentWord(); fepMan->CommitInlineEditL(); /* Temporary Fix */ diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryThaiPredictive.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryThaiPredictive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryThaiPredictive.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include //CPtiEngine #include //keys #include -#include +#include TAknFepInputStateEntryThaiPredictive:: TAknFepInputStateEntryThaiPredictive(MAknFepUIManagerStateInterface* aOwner) diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryVietnamesePredictive.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryVietnamesePredictive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryVietnamesePredictive.cpp Tue May 25 13:03:44 2010 +0300 @@ -39,7 +39,7 @@ #include //keys #include #include -#include +#include #include "AknFepUiManagerWestern.h" TAknFepInputStateEntryVietnamesePredictive:: diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictive.cpp Tue May 25 13:03:44 2010 +0300 @@ -41,7 +41,7 @@ #include //keys #include //FeatureManager #include -#include +#include #include // The Maximum world size diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryWesternPredictiveJp.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictiveJp.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryWesternPredictiveJp.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include //keys #include //FeatureManager #include -#include +#include TAknFepInputStateEntryWesternPredictiveJp:: TAknFepInputStateEntryWesternPredictiveJp(MAknFepUIManagerStateInterface* aOwner) diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateEntryZhuyinStrokeBasePhrase.cpp --- a/fep/aknfep/src/AknFepUiInputStateEntryZhuyinStrokeBasePhrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateEntryZhuyinStrokeBasePhrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -38,7 +38,7 @@ #include //CPtiEngine #include //keys #include -#include +#include TAknFepInputStateEntryZhuyinStrokeBasePhrase::TAknFepInputStateEntryZhuyinStrokeBasePhrase( MAknFepUIManagerStateInterface* aOwner, diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateInitialIndicMultitap.cpp --- a/fep/aknfep/src/AknFepUiInputStateInitialIndicMultitap.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateInitialIndicMultitap.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #define PTI_CLEAR_CURRENTWORD( A, B ) \ diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateInitialThaiMultitap.cpp --- a/fep/aknfep/src/AknFepUiInputStateInitialThaiMultitap.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateInitialThaiMultitap.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include #include #include -#include +#include TAknFepInputStateInitialThaiMultitap:: diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateInitialVietnameseMultitap.cpp --- a/fep/aknfep/src/AknFepUiInputStateInitialVietnameseMultitap.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateInitialVietnameseMultitap.cpp Tue May 25 13:03:44 2010 +0300 @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "AknFepUiManagerWestern.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateJapanesePredictiveBase.cpp --- a/fep/aknfep/src/AknFepUiInputStateJapanesePredictiveBase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateJapanesePredictiveBase.cpp Tue May 25 13:03:44 2010 +0300 @@ -39,7 +39,7 @@ #include // keys #include #include // MPtiEngineCompositionDataInterface -#include +#include // CONSTANTS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStateNextWordJapanesePredictive.cpp --- a/fep/aknfep/src/AknFepUiInputStateNextWordJapanesePredictive.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStateNextWordJapanesePredictive.cpp Tue May 25 13:03:44 2010 +0300 @@ -40,7 +40,7 @@ #include // keys #include #include // MPtiEngineCompositionDataInterface -#include +#include // CONSTANTS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiInputStatePredictiveInputJapanese.cpp --- a/fep/aknfep/src/AknFepUiInputStatePredictiveInputJapanese.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiInputStatePredictiveInputJapanese.cpp Tue May 25 13:03:44 2010 +0300 @@ -40,7 +40,7 @@ #include // keys #include #include // MPtiEngineCompositionDataInterface -#include +#include #include // CONSTANTS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiManagerBase.cpp --- a/fep/aknfep/src/AknFepUiManagerBase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiManagerBase.cpp Tue May 25 13:03:44 2010 +0300 @@ -43,7 +43,7 @@ #include "AknFepCaseManager.h" #include "AknFepPanic.h" -#include +#include #include // CAknIndicatorContainer::TIndicatorContext #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiManagerChinese.cpp --- a/fep/aknfep/src/AknFepUiManagerChinese.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiManagerChinese.cpp Tue May 25 13:03:44 2010 +0300 @@ -121,7 +121,7 @@ #include #include //phrase creation -#include +#include // CONSTANTS const TInt16 KStrokeHorizontalValue = 0x4e00; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/AknFepUiManagerWestern.cpp --- a/fep/aknfep/src/AknFepUiManagerWestern.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/AknFepUiManagerWestern.cpp Tue May 25 13:03:44 2010 +0300 @@ -96,7 +96,7 @@ #include #include #include -#include +#include // CONSTANTS /** @@ -382,18 +382,35 @@ { case ELatin: { - if ( iLanguage == ELangTaiwanChinese || - iLanguage == ELangHongKongChinese || - iLanguage == ELangPrcChinese || - iLanguage == ELangJapanese || - iLanguage == ELangHindi ) + switch ( iLanguage ) + { + case ELangTaiwanChinese: + { + lang = ELangEnglish_Taiwan; + break; + } + case ELangHongKongChinese: + { + lang = ELangEnglish_HongKong; + break; + } + case ELangPrcChinese: + { + lang = ELangEnglish_Prc; + break; + } + case ELangJapanese: + case ELangHindi: { // Chinese and Japanese languages uses always English as a latin language. lang = ELangEnglish; + break; } - else + default: { lang = iLanguage; + break; + } } } break; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepinputstatecandidatepinyinphrasecreation.cpp --- a/fep/aknfep/src/aknfepinputstatecandidatepinyinphrasecreation.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepinputstatecandidatepinyinphrasecreation.cpp Tue May 25 13:03:44 2010 +0300 @@ -30,7 +30,7 @@ // System includes #include #include -#include +#include //#include //CAknQueryDialog // User includes diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepinputstatepinyinphrasecreationbase.cpp --- a/fep/aknfep/src/aknfepinputstatepinyinphrasecreationbase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepinputstatepinyinphrasecreationbase.cpp Tue May 25 13:03:44 2010 +0300 @@ -30,7 +30,7 @@ #include //CPtiEngine #include #include -#include +#include #include "aknfepinputstatepinyinphrasecreationbase.h" #include "AknFepPanic.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepinputstatespellingpinyinphrasecreation.cpp --- a/fep/aknfep/src/aknfepinputstatespellingpinyinphrasecreation.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepinputstatespellingpinyinphrasecreation.cpp Tue May 25 13:03:44 2010 +0300 @@ -29,7 +29,7 @@ #include //CPtiEngine #include //keys #include -#include +#include #include #include "AknFepPanic.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp --- a/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp Tue May 25 13:03:44 2010 +0300 @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include //CAknWarningNote // User includes diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputminiqwertystrokephrasebase.cpp --- a/fep/aknfep/src/aknfepuiinputminiqwertystrokephrasebase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputminiqwertystrokephrasebase.cpp Tue May 25 13:03:44 2010 +0300 @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include //CAknWarningNote diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputminiqwertyzhuyinphrasebase.cpp --- a/fep/aknfep/src/aknfepuiinputminiqwertyzhuyinphrasebase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputminiqwertyzhuyinphrasebase.cpp Tue May 25 13:03:44 2010 +0300 @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include //CAknWarningNote // User includes diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstateentryhalfqwertyphrase.cpp --- a/fep/aknfep/src/aknfepuiinputstateentryhalfqwertyphrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstateentryhalfqwertyphrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include "AknFepUICtrlInputPane.h" #include "AknFepUICtrlPinyinPopup.h" //Pinyin phrase #include "AknFepUiCtrlContainerChinese.h" -#include +#include #include //CPtiEngine #include //keys #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstateentrypinyinphrasecreation.cpp --- a/fep/aknfep/src/aknfepuiinputstateentrypinyinphrasecreation.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstateentrypinyinphrasecreation.cpp Tue May 25 13:03:44 2010 +0300 @@ -32,7 +32,7 @@ #include //keys #include -#include +#include #include #include "AknFepPanic.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstateentryzhuyinphrasecreation.cpp --- a/fep/aknfep/src/aknfepuiinputstateentryzhuyinphrasecreation.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstateentryzhuyinphrasecreation.cpp Tue May 25 13:03:44 2010 +0300 @@ -31,7 +31,7 @@ #include //keys #include -#include +#include #include #include "AknFepPanic.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstateinitialindicphoneticmultitap.cpp --- a/fep/aknfep/src/aknfepuiinputstateinitialindicphoneticmultitap.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstateinitialindicphoneticmultitap.cpp Tue May 25 13:03:44 2010 +0300 @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #define PHONETIC_SEPARATOR 0x2e diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstateminiqwertystrokephrase.cpp --- a/fep/aknfep/src/aknfepuiinputstateminiqwertystrokephrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstateminiqwertystrokephrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -33,7 +33,7 @@ #include #include #include //CAknWarningNote -#include +#include // User includes #include "AknFepUiCtrlContainerChinese.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp --- a/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp Tue May 25 13:03:44 2010 +0300 @@ -33,7 +33,7 @@ #include #include #include //CAknWarningNote -#include +#include // User includes #include "AknFepUiCtrlContainerChinese.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstatestrokephrasebase.cpp --- a/fep/aknfep/src/aknfepuiinputstatestrokephrasebase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstatestrokephrasebase.cpp Tue May 25 13:03:44 2010 +0300 @@ -31,7 +31,7 @@ // System includes #include #include -#include +#include #include #include //CAknWarningNote diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuiinputstatezhuyinphrasecreationbase.cpp --- a/fep/aknfep/src/aknfepuiinputstatezhuyinphrasecreationbase.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuiinputstatezhuyinphrasecreationbase.cpp Tue May 25 13:03:44 2010 +0300 @@ -29,7 +29,7 @@ #include //CPtiEngine #include -#include +#include #include "aknfepuiinputstatezhuyinphrasecreationbase.h" #include "AknFepUIManagerStateInterface.h" //MAknFepUIManagerStateInterface diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuispellinputpane.cpp --- a/fep/aknfep/src/aknfepuispellinputpane.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuispellinputpane.cpp Tue May 25 13:03:44 2010 +0300 @@ -41,7 +41,7 @@ // CONSTANTS const TInt KNumberOfControl = 1; -const TInt KSpellMaxLength = 32; +const TInt KSpellMaxLength = 63; const TInt KTouchSpellEditorMaxLine = 1; // Enumarations enum TControls @@ -201,7 +201,15 @@ { if (iInputWin->IsFocused()) { - return iInputWin->OfferKeyEventL( aKeyEvent, aType ); + TKeyResponse response = iInputWin->OfferKeyEventL( aKeyEvent, aType ); + if ( response == EKeyWasNotConsumed ) + { + if ( aType == EEventKeyDown || aType == EEventKeyUp ) + { + response = EKeyWasConsumed; + } + } + return response; } return EKeyWasNotConsumed; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuserdbdlg.cpp --- a/fep/aknfep/src/aknfepuserdbdlg.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuserdbdlg.cpp Tue May 25 13:03:44 2010 +0300 @@ -46,7 +46,7 @@ #include //RFs #include //CEikEdwin #include //CAknTitlePane -#include +#include #include "AknFep.hrh" #include "aknfepuserdbdlg.h" #include "dbmanagement.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/aknfepuserdbquerydlg.cpp --- a/fep/aknfep/src/aknfepuserdbquerydlg.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/aknfepuserdbquerydlg.cpp Tue May 25 13:03:44 2010 +0300 @@ -21,7 +21,7 @@ #include //CAknWarningNote #include //CEikEdwin -#include +#include #include "aknfepuserdbquerydlg.h" #include "dbmanagement.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 fep/aknfep/src/dbmanagement.cpp --- a/fep/aknfep/src/dbmanagement.cpp Tue May 11 16:31:42 2010 +0300 +++ b/fep/aknfep/src/dbmanagement.cpp Tue May 25 13:03:44 2010 +0300 @@ -27,7 +27,7 @@ //system include files -#include +#include #include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h --- a/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h Tue May 11 16:31:42 2010 +0300 +++ b/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h Tue May 25 13:03:44 2010 +0300 @@ -179,6 +179,9 @@ ECmdPeninputSpellLanguageMode, ECmdPeninputSpellICFDisplayContent, ECmdPenInputDimEnterKey, + ECmdPeninputEnableOwnBitmap, + ECmdPeninputDisableLayoutDrawing, + ECmdPeninputArabicNumModeChanged, ECmdPenInputImeCmdBase = 2000 }; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h --- a/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h Tue May 11 16:31:42 2010 +0300 +++ b/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h Tue May 25 13:03:44 2010 +0300 @@ -361,6 +361,13 @@ * */ const TUint32 KAknFepKoreanCombineWordFlag = 0x00000024; + +/* + * This key is used for arabic finger hwr to set or get the default number mode. + * in number table. + * 0 is for latin number and 1 is for native number. + */ +const TUint32 KAknFepDefaultArabicNumberMode = 0x00000025; #endif // End of file diff -r c8fb4cf7b3ae -r 5e18d8c489d6 inputmethods_plat/pen_input_server_api/inc/peninputcmd.h --- a/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h Tue May 11 16:31:42 2010 +0300 +++ b/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h Tue May 25 13:03:44 2010 +0300 @@ -103,6 +103,14 @@ ESignalChangeFeedbackType, ESignalImmeSimulateEvent, ESignalServerReady = 1450, + ESignalUpdateCursor, + ESignalPopupArea, + ESignalUpdateICFArea, + ESignalUpdateChangedArea, + ESignalUpdateBubble, + ESignalRegisterBkControl, + ESignalDisableUpdating, + ESignalDrawBackground, ESignalFepEventBase = 1500, //Event base for Fep. All fep event //is re-directed to Fep. ESignalKeyEvent = 1501, //hwr recongition selection event. @@ -141,6 +149,8 @@ ESignalAcceptTooltip, ESignalCommitITIInlineText, EPeninputOpSetDiscreeptPop, + ESignalDeleteLastInput, + ESignalArabicSCTChar, ESignalUserEventBase = 2000 }; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 inputmethods_plat/ptiengine_key_definations_api/inc/PtiKeyboardDatabase.h --- a/inputmethods_plat/ptiengine_key_definations_api/inc/PtiKeyboardDatabase.h Tue May 11 16:31:42 2010 +0300 +++ b/inputmethods_plat/ptiengine_key_definations_api/inc/PtiKeyboardDatabase.h Tue May 25 13:03:44 2010 +0300 @@ -36,7 +36,14 @@ #include "PtiDefs.h" const TInt KKdbOpaqueDataLen = 8; - + +class TPtiXt9KeyBinding + { + public: + TUint16 iScanCode; + TInt iIndex[2]; + }; + // // TPtiLangDatabaseMappingOpaque // @@ -85,7 +92,7 @@ * @param aNumEntries Number of binding array entries will be stored here. * @return Pointer to scan code binding table. */ - virtual TUint8* ScanBindingTable(TPtiKeyboardType aKeyboardType, + virtual TPtiXt9KeyBinding* ScanBindingTable(TPtiKeyboardType aKeyboardType, TInt& aNumEntries) const = 0; /** diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/data/GSLangPluginRsc.rss --- a/textinput/GSLangPlugin/data/GSLangPluginRsc.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/data/GSLangPluginRsc.rss Tue May 25 13:03:44 2010 +0300 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/src/DualLanguageDialog.cpp --- a/textinput/GSLangPlugin/src/DualLanguageDialog.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/src/DualLanguageDialog.cpp Tue May 25 13:03:44 2010 +0300 @@ -28,7 +28,7 @@ #include #include "DualLanguageDialog.h" #include -#include +#include #include "GSLangModel.h" #include "DualLanguageData.h" #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/src/DualLanguageList.cpp --- a/textinput/GSLangPlugin/src/DualLanguageList.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/src/DualLanguageList.cpp Tue May 25 13:03:44 2010 +0300 @@ -29,7 +29,7 @@ #include "GsLangPlugin.hrh" #include "DualLanguageList.h" #include -#include +#include #include "DualLanguageDialog.h" CGSLanguageSettingItem::CGSLanguageSettingItem( TInt aResourceId, TBool aPrimary, CGSDualLanguageData* aData) diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/src/GSLangContainer.cpp --- a/textinput/GSLangPlugin/src/GSLangContainer.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/src/GSLangContainer.cpp Tue May 25 13:03:44 2010 +0300 @@ -23,7 +23,7 @@ #include "GSLangModel.h" #include // CGSListBoxItemTextArray #include -#include +#include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/src/GSLangModel.cpp --- a/textinput/GSLangPlugin/src/GSLangModel.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/src/GSLangModel.cpp Tue May 25 13:03:44 2010 +0300 @@ -20,7 +20,7 @@ #include "GSLangModel.h" #include "GSLangContainer.h" #include "GSLangPlugin.h" -#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/src/GSLangPlugin.cpp --- a/textinput/GSLangPlugin/src/GSLangPlugin.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/src/GSLangPlugin.cpp Tue May 25 13:03:44 2010 +0300 @@ -21,7 +21,7 @@ #include "GSLangContainer.h" #include "GSLangModel.h" #include -#include +#include #include #include @@ -45,7 +45,7 @@ #include #ifdef RD_INTELLIGENT_TEXT_INPUT #include "PredictiveSettingDialog.h" -#include +#include #include #ifdef FF_DUAL_LANGUAGE_SUPPORT #include "DualLanguageDialog.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/src/PredictiveSettingDialog.cpp --- a/textinput/GSLangPlugin/src/PredictiveSettingDialog.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/src/PredictiveSettingDialog.cpp Tue May 25 13:03:44 2010 +0300 @@ -28,7 +28,7 @@ #include #include "PredictiveSettingDialog.h" #include -#include +#include #include // HlpLauncher #include #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/GSLangPlugin/src/PredictiveSettingList.cpp --- a/textinput/GSLangPlugin/src/PredictiveSettingList.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/GSLangPlugin/src/PredictiveSettingList.cpp Tue May 25 13:03:44 2010 +0300 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include "PredictiveSettingList.h" #include "PredictiveSettingData.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF --- a/textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF Tue May 25 13:03:44 2010 +0300 @@ -323,7 +323,7 @@ ?SignalOwner@CFepUiLayout@@QAEXHABVTDesC16@@@Z @ 322 NONAME ; void CFepUiLayout::SignalOwner(int, class TDesC16 const &) ?SizeChanged@CFepUiLayout@@EAEHPBX@Z @ 323 NONAME ; int CFepUiLayout::SizeChanged(void const *) ?UnLockArea@CFepUiLayout@@QAEXABVTRect@@PAVCFepUiBaseCtrl@@@Z @ 324 NONAME ; void CFepUiLayout::UnLockArea(class TRect const &, class CFepUiBaseCtrl *) - ?UpdateArea@CFepUiBaseCtrl@@QAEXABVTRect@@H@Z @ 325 NONAME ; void CFepUiBaseCtrl::UpdateArea(class TRect const &, int) + ?UpdateArea@CFepUiBaseCtrl@@UAEXABVTRect@@H@Z @ 325 NONAME ; void CFepUiBaseCtrl::UpdateArea(class TRect const &, int) ?UpdateArea@CFepUiLayout@@QAEXPBVCFepUiBaseCtrl@@ABVTRect@@HH@Z @ 326 NONAME ; void CFepUiLayout::UpdateArea(class CFepUiBaseCtrl const *, class TRect const &, int) ?UpdateContent@CFepInputContextField@@MAEXABVTCursorSelection@@@Z @ 327 NONAME ; void CFepInputContextField::UpdateContent(class TCursorSelection const &) ?UpdateCursorSelection@CFepLayoutEditAreaBase@@QAEXABVTCursorSelection@@@Z @ 328 NONAME ; void CFepLayoutEditAreaBase::UpdateCursorSelection(class TCursorSelection const &) @@ -569,7 +569,7 @@ ?ClearStroke@CTransparentHwrWnd@@UAEXXZ @ 568 NONAME ; void CTransparentHwrWnd::ClearStroke(void) ?HideKeyCtrl@CVirtualKey@@QAEXH@Z @ 569 NONAME ; void CVirtualKey::HideKeyCtrl(int) ?HideTooltip@CFepLayoutMultiLineIcf@@QAEXXZ @ 570 NONAME ; void CFepLayoutMultiLineIcf::HideTooltip(void) - ?ShowTooltipL@CFepLayoutMultiLineIcf@@QAEXABVTDesC16@@ABVTRect@@@Z @ 571 NONAME ; void CFepLayoutMultiLineIcf::ShowTooltipL(class TDesC16 const &, class TRect const &) + ?ShowTooltipL@CFepLayoutMultiLineIcf@@QAEXABVTDesC16@@ABVTRect@@H@Z @ 571 NONAME ; void CFepLayoutMultiLineIcf::ShowTooltipL(class TDesC16 const &, class TRect const &, int) ?TooltipBubbleCtrl@CFepLayoutMultiLineIcf@@QAEPAVCTooltipBubbleCtrl@@XZ @ 572 NONAME ; class CTooltipBubbleCtrl * CFepLayoutMultiLineIcf::TooltipBubbleCtrl(void) ?RegisterFeedbackArea@CFepUiLayout@@QAEXHABVTRect@@H@Z @ 573 NONAME ; void CFepUiLayout::RegisterFeedbackArea(int, class TRect const &, int) ?ChangeFeedbackType@CFepUiLayout@@QAEXHH@Z @ 574 NONAME ; void CFepUiLayout::ChangeFeedbackType(int, int) @@ -597,4 +597,14 @@ ?CancelExtResponseArea@CFepUiBaseCtrl@@QAEXXZ @ 596 NONAME ; void CFepUiBaseCtrl::CancelExtResponseArea(void) ?EnableExtResponseArea@CFepUiBaseCtrl@@QAEXHABVTRect@@@Z @ 597 NONAME ; void CFepUiBaseCtrl::EnableExtResponseArea(int, class TRect const &) ?BaseConstructL@CButtonBase@@QAEXXZ @ 598 NONAME ; void CButtonBase::BaseConstructL(void) + ?SetRect@CBubbleCtrl@@UAEXABVTRect@@@Z @ 599 NONAME ; void CBubbleCtrl::SetRect(class TRect const &) + ?HandleResourceChange@CVirtualKeyboard@@MAEXH@Z @ 600 NONAME ; void CVirtualKeyboard::HandleResourceChange(int) + ?BitmapDevice@CFepUiBaseCtrl@@IAEPAVCFbsBitmapDevice@@XZ @ 601 NONAME ; class CFbsBitmapDevice * CFepUiBaseCtrl::BitmapDevice(void) + ?BitGc@CFepUiBaseCtrl@@IAEPAVCBitmapContext@@XZ @ 602 NONAME ; class CBitmapContext * CFepUiBaseCtrl::BitGc(void) + ?MaskBitmapDevice@CFepUiBaseCtrl@@IAEPAVCFbsBitmapDevice@@XZ @ 603 NONAME ; class CFbsBitmapDevice * CFepUiBaseCtrl::MaskBitmapDevice(void) + ?NotDrawToLayoutDevice@CFepUiLayout@@QAEHXZ @ 604 NONAME ; int CFepUiLayout::NotDrawToLayoutDevice(void) + ?HandleResourceChange@CBubbleCtrl@@MAEXH@Z @ 605 NONAME ; void CBubbleCtrl::HandleResourceChange(int) + ?HandleResourceChange@CFepLayoutPopupWnd@@UAEXH@Z @ 606 NONAME ; void CFepLayoutPopupWnd::HandleResourceChange(int) + ?DisableLayoutDrawing@CFepUiLayout@@QAEXH@Z @ 607 NONAME ; void CFepUiLayout::DisableLayoutDrawing(int) + ?BkMaskBmp@CFepUiBaseCtrl@@IAEPAVCFbsBitmap@@XZ @ 608 NONAME ; class CFbsBitmap * CFepUiBaseCtrl::BkMaskBmp(void) diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF --- a/textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF Tue May 25 13:03:44 2010 +0300 @@ -702,7 +702,7 @@ _ZTI26CPeninputPenTraceDecorator @ 701 NONAME ; ## _ZTV26CPeninputPenTraceDecorator @ 702 NONAME ; ## _ZN22CFepLayoutMultiLineIcf17TooltipBubbleCtrlEv @ 703 NONAME - _ZN22CFepLayoutMultiLineIcf12ShowTooltipLERK7TDesC16RK5TRect @ 704 NONAME + _ZN22CFepLayoutMultiLineIcf12ShowTooltipLERK7TDesC16RK5TRecti @ 704 NONAME _ZN22CFepLayoutMultiLineIcf11HideTooltipEv @ 705 NONAME _ZTI18CTooltipBubbleCtrl @ 706 NONAME _ZTV18CTooltipBubbleCtrl @ 707 NONAME @@ -731,4 +731,14 @@ _ZN14CFepUiBaseCtrl21CancelExtResponseAreaEv @ 730 NONAME _ZN14CFepUiBaseCtrl21EnableExtResponseAreaEiRK5TRect @ 731 NONAME _ZN11CButtonBase14BaseConstructLEv @ 732 NONAME + _ZN11CBubbleCtrl20HandleResourceChangeEi @ 733 NONAME + _ZN11CBubbleCtrl7SetRectERK5TRect @ 734 NONAME + _ZN12CFepUiLayout20DisableLayoutDrawingEi @ 735 NONAME + _ZN12CFepUiLayout21NotDrawToLayoutDeviceEv @ 736 NONAME + _ZN14CFepUiBaseCtrl12BitmapDeviceEv @ 737 NONAME + _ZN14CFepUiBaseCtrl16MaskBitmapDeviceEv @ 738 NONAME + _ZN14CFepUiBaseCtrl5BitGcEv @ 739 NONAME + _ZN14CFepUiBaseCtrl9BkMaskBmpEv @ 740 NONAME + _ZN16CVirtualKeyboard20HandleResourceChangeEi @ 741 NONAME + _ZN18CFepLayoutPopupWnd20HandleResourceChangeEi @ 742 NONAME diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h Tue May 25 13:03:44 2010 +0300 @@ -546,6 +546,8 @@ //Advanced Tactile feedback REQ417-47932 IMPORT_C void ChangeFeedbackType(TInt aId, TInt aNewTactileType); + IMPORT_C TBool NotDrawToLayoutDevice(); + IMPORT_C void DisableLayoutDrawing(TBool aFlag); /** * Get the layout SkinInstance * @@ -627,6 +629,7 @@ * @param aData Editor text and cursor pos information */ void SendEditorTextAndCursorPosL(TUint8* aData); + void SetSelfBmpDeviceFlag(TBool aFlag); private: NONSHARABLE_CLASS( CFepUiLayoutExt) : public CBase @@ -644,6 +647,8 @@ */ MTouchFeedback* iTouchFeedbackInstance; + TBool iSelfBmpDeviceFlag; + TBool iDisableDrawing; }; private: @@ -700,6 +705,7 @@ * Reserved item1 */ TInt iReserved1; +friend class CFepUiBaseCtrl; }; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.h Tue May 25 13:03:44 2010 +0300 @@ -43,6 +43,8 @@ //base control type typedef TInt64 TControlType; +const TInt KPenInputOwnDeviceChange = -1; +const TUint KFepCtrlExtId = 0x00000000; //UI layout leave code enum TUiLayoutErrorCode { @@ -200,6 +202,64 @@ friend class CControlGroup; friend class CInsertionPoint; public: + NONSHARABLE_CLASS(CFepUiBaseCtrlExtension) : public CBase + { + public: + + CFepUiBaseCtrlExtension(); + + /** + * Set Tactile Feedback Type + * Advanced Tactile feedback REQ417-47932 + */ + void SetTactileFeedbackType(TInt aTactileType); + + /** + * Return tactile feedback type + * + * Advanced Tactile feedback REQ417-47932 + * @return the tactile feedback type + */ + IMPORT_C TInt TactileFeedbackType(); +public: + TBool iExtResponseAreaActive; + TRect iExtResponseArea; + TBool iExtResponseAreaEnabled; + TRect iExtResponseAreaMargin; + + private: + /** + * Tactile Feedback type + */ + TInt iTactileType; + + public: + ~CFepUiBaseCtrlExtension(); + CFbsBitmap* Bitmap() { return iBitmap;} + CFbsBitmap* MaskBitmap() { return iMaskBitmap;} + CFbsBitGc* Gc() { return iGc;} + CFbsBitmapDevice* BitmapDevice() { return iBitmapDevice;} + CFbsBitmapDevice* MaskBitmapDevice() { return iMaskBitmapDevice;} + + void SetBitmap(CFbsBitmap* aBmp) { iBitmap = aBmp;} + void SetGc(CFbsBitGc* aGc) { iGc = aGc;} + void SetBmpDevice(CFbsBitmapDevice* aDevice) { iBitmapDevice = aDevice;} + void SetMaskBmpDevice(CFbsBitmapDevice* aDevice) { iMaskBitmapDevice = aDevice;} + + private: + CFbsBitmap* iBitmap; // not own, don't delete + CFbsBitmap* iMaskBitmap; // not own, don't delete + /** + * graphic context + * Not own + */ + CFbsBitGc* iGc; + CFbsBitmapDevice* iBitmapDevice; + CFbsBitmapDevice* iMaskBitmapDevice; +friend class CFepUiBaseCtrl; + }; + +public: enum TZOrder { EOrderBackground = 1500, //order for background control @@ -765,7 +825,7 @@ * @param aRect the rect to be flushed in screen * @param aUpdateFlag ETrue if full update. */ - IMPORT_C void UpdateArea(const TRect& aRect,TBool aUpdateFlag= EFalse); + IMPORT_C virtual void UpdateArea(const TRect& aRect,TBool aUpdateFlag= EFalse); /** * Update layout area immediately @@ -986,28 +1046,28 @@ * @since S60 V4.0 * @return The graphic context */ - inline CBitmapContext* BitGc(); + IMPORT_C CBitmapContext* BitGc(); /** * get Bitmap device for sprite or window * @since S60 V4.0 * @return The bitmap device */ - inline CFbsBitmapDevice* BitmapDevice(); + IMPORT_C CFbsBitmapDevice* BitmapDevice(); /** * get Mask bitmap device for sprite or window * @since S60 V4.0 * @return The mask bitmap device */ - inline CFbsBitmapDevice* MaskBitmapDevice(); + IMPORT_C CFbsBitmapDevice* MaskBitmapDevice(); /** * get control background mask bmp * @since S60 V4.0 * @return The background mask bitmap */ - inline CFbsBitmap* BkMaskBmp(); + IMPORT_C CFbsBitmap* BkMaskBmp(); /** * get control background bmp @@ -1172,6 +1232,9 @@ virtual IMPORT_C void GraphicDeviceSizeChanged(); inline void SetHidenFlag(TBool aFlag); + void CreateOwnDeviceL(CFbsBitmap* aBmp, CFbsBitmap* aMaskBmp = 0); + + void ResizeDeviceL(); private: /** * Draw shadow bitmap @@ -1369,39 +1432,8 @@ TInt iOrdinalPos; -private: - NONSHARABLE_CLASS(CFepUiBaseCtrlExtension) : public CBase - { - public: - - CFepUiBaseCtrlExtension(); - - /** - * Set Tactile Feedback Type - * Advanced Tactile feedback REQ417-47932 - */ - void SetTactileFeedbackType(TInt aTactileType); - - /** - * Return tactile feedback type - * - * Advanced Tactile feedback REQ417-47932 - * @return the tactile feedback type - */ - IMPORT_C TInt TactileFeedbackType(); - public: - TBool iExtResponseAreaActive; - TRect iExtResponseArea; - TBool iExtResponseAreaEnabled; - TRect iExtResponseAreaMargin; - - private: - /** - * Tactile Feedback type - */ - TInt iTactileType; - }; -private: + //class CFepUiBaseCtrlExtension; + /** * Reservered */ diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.inl --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.inl Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbasecontrol.inl Tue May 25 13:03:44 2010 +0300 @@ -215,35 +215,7 @@ { return iRootCtrl; } - -// --------------------------------------------------------------------------- -// get graphics context for sprite or window -// --------------------------------------------------------------------------- -// -inline CBitmapContext* CFepUiBaseCtrl::BitGc() - { - return iLayoutOwner->BitmapContext(); - } - -// --------------------------------------------------------------------------- -// get Bitmap device for sprite or window -// --------------------------------------------------------------------------- -// -inline CFbsBitmapDevice* CFepUiBaseCtrl::BitmapDevice() - { - return iLayoutOwner->BitmapDevice(); - } - -// --------------------------------------------------------------------------- -// get Mask bitmap device for sprite or window -// --------------------------------------------------------------------------- -// -inline CFbsBitmapDevice* CFepUiBaseCtrl::MaskBitmapDevice() - { - return iLayoutOwner->MaskBmpDevice(); - } - // --------------------------------------------------------------------------- // get control pointer down status // --------------------------------------------------------------------------- @@ -263,14 +235,6 @@ if(!aFlag) iPointerLeft = EFalse; } -// --------------------------------------------------------------------------- -// get control background maks bmp -// --------------------------------------------------------------------------- -// -inline CFbsBitmap* CFepUiBaseCtrl::BkMaskBmp() - { - return iBkMaskBmp; - } // --------------------------------------------------------------------------- // get control background bmp diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbubblectrl.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbubblectrl.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutbubblectrl.h Tue May 25 13:03:44 2010 +0300 @@ -93,6 +93,9 @@ void UnFreeze( TBool aUpdate = ETrue ); inline void SetTextColorIndex( TInt aTxtClrIndex ); inline TInt TextColorIndex() const; + + inline void SetLangCode( TInt aLangCode ); + protected: IMPORT_C CBubbleCtrl(const TRect& aRect, CFepUiLayout* aUiLayout, @@ -101,6 +104,9 @@ IMPORT_C void ConstructL(TInt aBmpId, TInt aMaskId); private: + TRect GetRect(); + +private: CFbsBitmap* iForgroundBmp; CFbsBitmap* iForgroundBmpMask; @@ -127,8 +133,32 @@ TInt iTextColorIndex; TSize iIconOffset; TSize iIconSize; + +public: + IMPORT_C virtual void SetRect(const TRect& aRect); + void SetBmpDevice(CFbsBitGc* aGc,CFbsBitmapDevice* aDevice); + void CreateBmpDevL(); + inline void SetOffset(TPoint& aPt); +protected: + IMPORT_C void HandleResourceChange(TInt aType); +private: + + +private: + CFbsBitmap* iBitmap; + CFbsBitmap* iMaskBitmap; + + TPoint iOffset; + TInt iReserved1; + + TInt iLangCode; }; - + +inline void CBubbleCtrl::SetOffset(TPoint& aPt) + { + iOffset = aPt; + } + inline void CBubbleCtrl::SetTextColorIndex( TInt aTxtClrIndex ) { iTextColorIndex = aTxtClrIndex; @@ -150,6 +180,11 @@ aText.Copy( *iText ); } +inline void CBubbleCtrl::SetLangCode( TInt aLangCode ) + { + iLangCode = aLangCode; + } + class CTooltipBubbleCtrl: public CBubbleCtrl { public: diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutctrlgroup.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutctrlgroup.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutctrlgroup.h Tue May 25 13:03:44 2010 +0300 @@ -361,6 +361,10 @@ void AdjustBkCtrlPos(); + inline TBool NeedRedrawBg() const; + inline void SetNeedRedrawBg(TBool aNeedRedrawBg); + + protected: /** * Symbian second phrase constructor diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutctrlgroup.inl --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutctrlgroup.inl Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutctrlgroup.inl Tue May 25 13:03:44 2010 +0300 @@ -29,4 +29,15 @@ { return iPopCtrlList; } + +inline TBool CControlGroup::NeedRedrawBg() const + { + return iNeedRedrawBg; + } + +inline void CControlGroup::SetNeedRedrawBg(TBool aNeedRedrawBg) + { + iNeedRedrawBg = aNeedRedrawBg; + } + //end of file diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutcursor.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutcursor.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutcursor.h Tue May 25 13:03:44 2010 +0300 @@ -237,6 +237,9 @@ void UpdateCursorArea(const TRect& aRect, TBool aFlag); TInt OrderPosL(); + void DrawCursor(CFbsBitGc* aGc,CFbsBitmapDevice* aDevice); + void CreateCursorBmpL(); + void ResizeCursorBmp(); private: // Data /** @@ -285,7 +288,7 @@ * graphic context * Not own */ - CBitmapContext* iGc; + CFbsBitGc* iGc; /** * The timer to restore the cursor while pen is dragging. @@ -294,6 +297,7 @@ //flag tells whether the cursor is temprary disabled TBool iCursorTempDisabled; + CFbsBitmap* iBitmap; friend class CFepUiLayoutRootCtrl; }; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutmultilineicf.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutmultilineicf.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutmultilineicf.h Tue May 25 13:03:44 2010 +0300 @@ -209,7 +209,8 @@ * @return None */ IMPORT_C void ShowTooltipL( const TDesC& aText, - const TRect& aRect ); + const TRect& aRect, + TInt aLangCode = ELangTest ); /** @@ -397,7 +398,7 @@ IMPORT_C void SetInfoBubbleCtrlSize(const TSize& aSize); // For addition of ITI features on FSQ - void ShowTooltipL( const TDesC& aText, const TRect& aRect ); + void ShowTooltipL( const TDesC& aText, const TRect& aRect, TInt aLangCode = ELangTest ); void HideTooltip(); /** * Returen the auto-completion state diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutpopupwnd.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutpopupwnd.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutpopupwnd.h Tue May 25 13:03:44 2010 +0300 @@ -19,6 +19,7 @@ #define C_CFEPLAYOUTPOPUPWND_H #include +#include /** * CButtonBase * @@ -29,6 +30,34 @@ */ class CFepLayoutPopupWnd : public CControlGroup { +private: + class CPopupWndExt : public CBase + { + public: + CFbsBitmap* BackupBitmap(){ return iBitmap;} + CFbsBitGc* BackupGc() { return iGc;} + CFbsBitmapDevice* BackupDevice() { return iBitmapDevice;} + void SetRect(const TRect& aRect); + TRect Rect() { return iRect;} + + static CPopupWndExt* NewL(); + void ContructBkDeviceL(const TSize& aSize,const TDisplayMode& aMode); + + ~CPopupWndExt() + { + delete iBitmapDevice; + delete iGc; + delete iBitmap; + } + private: + void ResizeBackupDeviceL(const TSize& s); + private: + CFbsBitmap* iBitmap; + CFbsBitGc* iGc; + CFbsBitmapDevice* iBitmapDevice; + TRect iRect; + + }; public: enum TDisplayPosition { @@ -96,6 +125,7 @@ IMPORT_C virtual void OnDeActivate(); IMPORT_C void ReDrawRect(const TRect& aRect); + IMPORT_C void HandleResourceChange(TInt aType); protected: /** @@ -130,6 +160,8 @@ * @since S60 V4.0 */ IMPORT_C virtual void OnDisplay(); + void DisableDrawingInGroup(); + void EnableDrawingInGroup(); private: /* * Flag tells whether the pop up window is shown @@ -164,7 +196,7 @@ /** * Reserved item2 */ - TInt iReserved2; + CPopupWndExt* iExt; }; #endif //C_CFEPLAYOUTPOPUPWND_H \ No newline at end of file diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvirtualkeyctrl.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvirtualkeyctrl.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvirtualkeyctrl.h Tue May 25 13:03:44 2010 +0300 @@ -174,7 +174,7 @@ * * @since S60 V5.0 */ - void DrawKeyText(); + void DrawKeyText(CFbsBitGc* aGc); /** * Redraw and update the key @@ -197,6 +197,10 @@ const CFbsBitmap* aBmp,CFbsBitmap* aMask, TBool aInvertFlag = EFalse); + void DrawBmp(CFbsBitGc* aGc, const TRect& aDestRect,const TRect& aSourceRect, + const CFbsBitmap* aBmp,CFbsBitmap* aMask, + TBool aInvertFlag = EFalse); + /** * Get the control event for given internal event type * @@ -231,7 +235,13 @@ TVirtualKeyDrawInfo iVirtualKeyDrawInfo; -friend class CVirtualKeyboard; +protected: + void UpdateChangedArea(TBool aFlag); +private: + CFbsBitGc* GetGc(); + TRect GetRect(); + + friend class CVirtualKeyboard; }; inline CVirtualKeyboard* CVirtualKeyCtrl::Keyboard() diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.h --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.h Tue May 25 13:03:44 2010 +0300 @@ -136,6 +136,42 @@ }; }; +class CFepUiKeyboardExt : public CBase + { +public: + ~CFepUiKeyboardExt() + { + delete iBitmap; + delete iHighlightDev; + delete iHighlightGc; + + delete iHighlightKeyBmp; + delete iNormalKeyBmp; + delete iDimmedKeyBmp; + delete iNormalKeyDev; + delete iHighlightKeyDev; + delete iDimmedKeyDev; + delete iKeyGc; + } +private: + void CreateBmpDevL(const TDisplayMode &aMode); +private: + CFbsBitmap* iBitmap; + CFbsBitmapDevice* iHighlightDev; + CFbsBitGc* iHighlightGc; + + CFbsBitmap* iHighlightKeyBmp; + CFbsBitmap* iNormalKeyBmp; + CFbsBitmap* iDimmedKeyBmp; + + CFbsBitmapDevice* iNormalKeyDev; + CFbsBitmapDevice* iHighlightKeyDev; + CFbsBitmapDevice* iDimmedKeyDev; + CFbsBitGc* iKeyGc; + +friend class CVirtualKeyboard; + }; + //class CVirtualKeyboard /** * CVirtualKeyboard @@ -814,12 +850,7 @@ * Item text display color. */ TRgb iFontColor; - - /** - * Reserve item - */ - TInt iReserver1; - + TAknsItemID iKeyNormalSkinId; TAknsItemID iKeyHighlightSkinId; TAknsItemID iKeyDimSkinId; @@ -866,13 +897,45 @@ * The shift icon showing on the key */ CPenInputColorIcon* iShiftIcon; - + /** * The star icon showing on the key */ CPenInputColorIcon* iStarIcon; + + MPeninputVkbPreviewBubbleRenderer* iPreviewBubbleRenderer; + + /** + * Reserve item + */ + CFepUiKeyboardExt* iExt; + + +protected: + //void HandleResourceChange(TInt aType); + virtual IMPORT_C void HandleResourceChange(TInt aType); +private: + void CreateBmpDevL(); + CFbsBitmap* Bitmap() { return iExt->iBitmap;} + CFbsBitmapDevice* HighlightDev() { return iExt->iHighlightDev;} + CFbsBitGc* HighlightGc() { return iExt->iHighlightGc;} + CFbsBitmap* NormalKeyBmp() { return iExt->iNormalKeyBmp;} + CFbsBitmap* HighightKeyBmp() { return iExt->iHighlightKeyBmp;} + CFbsBitmap* DimmedKeyBmp() { return iExt->iDimmedKeyBmp;} - MPeninputVkbPreviewBubbleRenderer* iPreviewBubbleRenderer; + CFbsBitmapDevice* HighlightKeyDev() { return iExt->iHighlightKeyDev;} + CFbsBitmapDevice* NormalKeyDev() { return iExt->iNormalKeyDev;} + CFbsBitmapDevice* DimmedKeyDev() { return iExt->iDimmedKeyDev;} + CFbsBitGc* KeyGc() { return iExt->iKeyGc;} + + + CFbsBitmap* PrepareMaskBmpL(CFbsBitGc* aGc, const TDisplayMode& aMode, const TRect& aRect); + CFbsBitmap* PrepareKeyBmpL(CFbsBitGc* aGc, const TDisplayMode& aMode, const TRect& aRect, + const TRect& aInnerRect,const TAknsItemID& aFrameID, const TAknsItemID& aCenterID, const TRect& aKeyRect); + + TBool PrepareKeyBmp(CFbsBitmap* aBmp,CFbsBitmapDevice* aDev,const TRect& aRect, + const TRect& aInnerRect,const TAknsItemID& aFrameID, const TAknsItemID& aCenterID,const TRect& aKeyRect); + friend class CVirtualKeyCtrl; friend class CVirtualRawKeyCtrl; //friend class CVirtualKey; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.inl --- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.inl Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutvkb.inl Tue May 25 13:03:44 2010 +0300 @@ -180,7 +180,7 @@ inline void CVirtualKeyboard::SetDrawOpaqueBackground(TBool aNeedDraw) { - iNeedDrawBackground = aNeedDraw; + SetNeedRedrawBg(aNeedDraw); } inline CPenInputColorIcon* CVirtualKeyboard::ShiftIcon() diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h --- a/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h Tue May 25 13:03:44 2010 +0300 @@ -32,29 +32,6 @@ class MPenUiActivationHandler; class CPenUiBackgroundWnd; -NONSHARABLE_CLASS(CPeninputServerWaiter) : public CBase - { - public: - static CPeninputServerWaiter* NewL(); - void Start(); - void Stop(TInt aFlag); - TBool IsStarted() - { - return iWaitScheduler->IsStarted(); - } - TInt Error() - { - return iError; - } - ~CPeninputServerWaiter(); - protected: - private: - //CPeninputServerWaiter(); - void ConstructL(); - TInt iError; - CActiveSchedulerWait* iWaitScheduler; - }; - NONSHARABLE_CLASS(TUiNotificationHandler) { public: @@ -426,7 +403,7 @@ void UpdateAppInfo(const TDesC& aInfo, TPeninputAppInfo aType); void HandleServerExit(); - void OnServerReady(TBool aFlag = ETrue); + //void OnServerReady(TBool aFlag = ETrue); TBool IsForegroundSession(); //void SetForegroundFlag(TBool aFlag); void FinalClose(); @@ -540,9 +517,6 @@ TBool iLaunchServer; - //CActiveSchedulerWait* iWaitScheduler; - CPeninputServerWaiter * iWaitScheduler; - TInt iCurPenUiType; CPenUiBackgroundWnd* iBackgroundCtrl; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h --- a/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h Tue May 25 13:03:44 2010 +0300 @@ -18,8 +18,48 @@ #define __PEN_UI_WINDOW_CONTROL__ #include +#include +#include +#include + +#ifndef FIX_FOR_NGA +#define FIX_FOR_NGA +#endif + class RAknUiServer; class CPenUiWndCtrl; +class CPenUiHwnWnd; + +struct TCommonBgCtrlSubItem + { + TRect iRect; + TAknsItemID iFrameID; + TAknsItemID iCenterID; + TBool iIsShow; + }; +class CPenUiWndCtrl; + +class CCursorWindow : public CCoeControl + { +public: // Functions from base classes. + + CCursorWindow(CPenUiWndCtrl* aParent); + //void ConstructL(CCoeControl* aParent); + /** + * From CCoeControl + * Function where control's drawing is done. + * + * @param aRect Control's area. + */ + void Draw( const TRect &aRect ) const; + + void SetCursorVisible(TBool aFlag); + +private: + TBool iCursorVisible; + CPenUiWndCtrl* iParent; + }; + class CPenUiPopWnd : public CCoeControl { public: // Constructors and destructor @@ -153,6 +193,14 @@ void DimPenUiForMenu(); TInt GetWndPriority(); void SetResourceChange(TBool aResourceChange); + void UpdateCursor(TBool aOnFlag,const CFbsBitmap* aCursorBmp,const TRect& aPos); + void SetPopupArea(const TRect& aRect, TBool aFlag); + void UpdateICFArea(const CFbsBitmap* aBmp,const TPoint& aPos); + void UpdateChangedArea(const CFbsBitmap* aBmp,const TRect& aRect,TBool aFlag); + void UpdateBubble(const CFbsBitmap* aBmp,const CFbsBitmap* aMaskBmp,const TRect& aPos,TBool aFlag); + void Clean(); + + void HandleNGASpecificSignal(TInt aEventType, const TDesC& aEventData); public: // Functions from base classes. /** @@ -168,7 +216,11 @@ * Auto refresh timer callback, refresh pen ui. (for NGA) */ void RefreshUI(); - + +protected: + CCoeControl* ComponentControl(TInt) const; + TInt CountComponentControls() const; + private: /** @@ -213,6 +265,11 @@ */ void StopRefreshTimer(); + void DrawBkground(CWindowGc& aGc,const TRect& aRect) const; + void DrawFrame( CWindowGc& aGc,const TRect& aRect,TAknsItemID aFrameID,TAknsItemID aCenterID ) const; + + void DrawCursor(CWindowGc& aGc) const; + void DrawBubbleAsBackground(CFbsBitGc* aGc, CFbsBitmap* aBmp, const TRect& aRect); private: // Data RWindowGroup& iWndGroup; @@ -238,13 +295,46 @@ //TBool iUiLayoutChange; TBool iInGlobalEditorState; TRect iLayoutClipRect; + + CFbsBitmap * iCursorBmp; + CFbsBitmap* iICFBmp; + CFbsBitmap* iChangedBmp; + RPointerArray iBubblesArea; + RPointerArray iBubblesMaskArea; + RArray iBubblesPos; + + TPoint iCursorPos; + TPoint iIcfPos; + TPoint iChangedPos; + TRect iIcfRect; + TRect iCursorRect; + CIdle *iIdle; + TRect iRedrawRect; + TInt iTouchCount; + + TBool iCursorVisible; + + RRegion iPopRegion; + + TBool iBackground; + TAknsItemID iFrameID; + TAknsItemID iCenterID; /** * Auto refresh timer * own */ CPeriodic* iAutoRefreshTimer; + + /** + * The sub items of the background + */ + RArray *iSubItems; //not own + TBool iNotUpdating; + CCursorWindow* iCursorWnd; + +friend class CCursorWindow; }; class CInternalBkCtrl : public CCoeControl { diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputanim/peninputanim.cpp --- a/textinput/peninputarc/src/peninputanim/peninputanim.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputanim/peninputanim.cpp Tue May 25 13:03:44 2010 +0300 @@ -44,7 +44,7 @@ //CONSTANT const TInt KMsgSlot1 = 1; //msg slot 2 in IPC const TInt KMsgSlot2 = 2; //msg slot 2 in IPC -const TInt KFlushTimerPeriod = 1000; //1/1000 second +const TInt KFlushTimerPeriod = 1000 * 10; //1/100 second const TInt KResponseQueueWaitTime = 100000; //1/10 second // ======== GLOBAL FUNCTIONS ======== diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputclient/penclientimpl.cpp --- a/textinput/peninputarc/src/peninputclient/penclientimpl.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputclient/penclientimpl.cpp Tue May 25 13:03:44 2010 +0300 @@ -77,40 +77,6 @@ } - -CPeninputServerWaiter* CPeninputServerWaiter::NewL() - { - CPeninputServerWaiter* self = new(ELeave)CPeninputServerWaiter; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } -void CPeninputServerWaiter::ConstructL() - { - iWaitScheduler = new(ELeave) CActiveSchedulerWait; - } - -CPeninputServerWaiter::~CPeninputServerWaiter() - { - delete iWaitScheduler; - } - -void CPeninputServerWaiter::Start() - { - iWaitScheduler->Start(); - } - -void CPeninputServerWaiter::Stop(TInt aFlag) - { - //if(aFlag) - iError = aFlag ? KErrNone : aFlag; - - iWaitScheduler->AsyncStop(); - } - - - // ======== MEMBER FUNCTIONS ======== // --------------------------------------------------------------------------- @@ -152,7 +118,6 @@ iServerExit = EFalse; iLaunchServer = EFalse; iCurPenUiType = -1; - iWaitScheduler = NULL; iAppPrefferedUiMode = EPluginInputModeNone; iAutoOpenFlag = ETrue; iBackgroundCtrl = 0; @@ -1010,15 +975,15 @@ iSingletonServer->SendReceive(EPeninputRequestAddUiObserver,arg); } - */ + */ +/* void RPeninputServerImpl::OnServerReady( TBool aFlag) - { + { //iLaunchServer = EFalse; - iWaitScheduler->Stop(aFlag);//AsyncStop(); //if(iPenUiNotificationHandler) // DoAddPenUiActivationHandler(); - } + }*/ // --------------------------------------------------------------------------- // RPeninputServerImpl::AddPenUiActivationHandler // Add an UI activate/deactivation handler @@ -1097,8 +1062,6 @@ { delete iBackgroundCtrl; - delete iWaitScheduler; - iWaitScheduler = 0; iPenUiNotificationHandler.Close(); delete iObserver; iObserver = NULL; @@ -1299,7 +1262,7 @@ { exitReason = srvThread.ExitReason(); srvThread.Close(); - iPeninputServer->OnServerReady(-1000); + //iPeninputServer->OnServerReady(-1000); } if(err != KErrNone || exitReason != 0) //server has exited { @@ -1312,7 +1275,7 @@ if(iStatus.Int() == ESignalServerReady) //server has started { - iPeninputServer->OnServerReady(); + //iPeninputServer->OnServerReady(); return; } //if there is also iUiActivationHandler, handle it first diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbasecontrol.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbasecontrol.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbasecontrol.cpp Tue May 25 13:03:44 2010 +0300 @@ -322,7 +322,7 @@ // EXPORT_C void CFepUiBaseCtrl::DrawMaskBackground(TBool aBmpStretchFlag) { - DrawBackgroundToDevice(iRect,MaskBitmapDevice(), iBkMaskBmp, iMaskBkCol, + DrawBackgroundToDevice(iRect,MaskBitmapDevice(), BkMaskBmp(), iMaskBkCol, iBorderColor,aBmpStretchFlag); } @@ -335,7 +335,7 @@ EXPORT_C void CFepUiBaseCtrl::DrawOpaqueMaskBackground(TBool aBmpStretchFlag) { const TRgb KOpaqueMask = TRgb(KOpaqueColor); - DrawBackgroundToDevice(iRect,MaskBitmapDevice(), iBkMaskBmp, KOpaqueMask, + DrawBackgroundToDevice(iRect,MaskBitmapDevice(), BkMaskBmp(), KOpaqueMask, KOpaqueMask,aBmpStretchFlag); } @@ -348,7 +348,7 @@ EXPORT_C void CFepUiBaseCtrl::DrawOpaqueMaskBackground(const TRect aRect, TBool aBmpStretchFlag) { const TRgb KOpaqueMask = TRgb(KOpaqueColor); - DrawBackgroundToDevice(aRect, MaskBitmapDevice(), iBkMaskBmp, + DrawBackgroundToDevice(aRect, MaskBitmapDevice(), BkMaskBmp(), KOpaqueMask, KOpaqueMask, aBmpStretchFlag); } @@ -362,7 +362,7 @@ TBool aBmpStretchFlag) { const TRgb KOpaqueMask = TRgb(KTransparentColor); - DrawBackgroundToDevice(aRect, MaskBitmapDevice(), iBkMaskBmp, KTransparentColor, + DrawBackgroundToDevice(aRect, MaskBitmapDevice(), BkMaskBmp(), KTransparentColor, KTransparentColor, aBmpStretchFlag); } @@ -698,7 +698,8 @@ } TBool CFepUiBaseCtrl::IsOnTopOf(CFepUiBaseCtrl* aCtrl) - { + { + __ASSERT_DEBUG(aCtrl,EUiNullParam); return OrderPos() < aCtrl->OrderPos(); } @@ -1257,7 +1258,9 @@ EXPORT_C TBool CFepUiBaseCtrl::AbleToDraw() { - return UiLayout()->LayoutReady() && Ready() && !WholeHiden() && Rect().Size() != TSize(0,0); + return UiLayout()->LayoutReady() && Ready() + && (!UiLayout()->iExtension->iDisableDrawing) + && !WholeHiden() && Rect().Size() != TSize(0,0); } // --------------------------------------------------------------------------- @@ -1265,8 +1268,12 @@ // --------------------------------------------------------------------------- // EXPORT_C TInt CFepUiBaseCtrl::Extension_(TUint aExtensionId, TAny *&a0, TAny *a1) - { - //not implemented, use CBase's + { + if( KFepCtrlExtId == aExtensionId) + { + a0 = iExtension; + return KErrNone; + } return CBase::Extension_(aExtensionId, a0, a1); } @@ -1348,7 +1355,11 @@ EXPORT_C void CFepUiBaseCtrl::SetParent(CFepUiBaseCtrl* aParent) { - //parent control must be type of control group. + //parent control must be type of control group. + if(aParent) + { + __ASSERT_DEBUG(aParent->IsKindOfControl(ECtrlControlGroup),EUiLayoutBadParentType); + } iParentCtrl = aParent; } @@ -1365,6 +1376,100 @@ return order; } +void CFepUiBaseCtrl::CreateOwnDeviceL(CFbsBitmap* aBmp, CFbsBitmap* aMaskBmp) + { + if(iExtension->iBitmap) + return; + User::LeaveIfError( aBmp->Create( Rect().Size(), iLayoutOwner->BitmapDevice()->DisplayMode() ) ); + + iExtension->iBitmap = aBmp; + CFbsBitmapDevice* dev = CFbsBitmapDevice::NewL(aBmp); + + iExtension->SetBmpDevice(dev); + + CFbsBitGc* gc = CFbsBitGc::NewL(); + gc->Reset(); + iExtension->SetGc(gc); + + if(iExtension->iMaskBitmap || !aMaskBmp) + return; + + User::LeaveIfError( aMaskBmp->Create( Rect().Size(), iLayoutOwner->MaskBmpDevice()->DisplayMode() ) ); + + iExtension->iMaskBitmap = aMaskBmp; + dev = CFbsBitmapDevice::NewL(aMaskBmp); + + iExtension->SetMaskBmpDevice(dev); + + } + +void CFepUiBaseCtrl::ResizeDeviceL() + { + if(iExtension->BitmapDevice()) + iExtension->BitmapDevice()->Resize( Rect().Size()); + //gc must be adjusted + if(iExtension->Gc()) + { + iExtension->Gc()->Activate(iExtension->BitmapDevice()); + iExtension->Gc()->Resized(); + } + } + +// --------------------------------------------------------------------------- +// get graphics context for sprite or window +// --------------------------------------------------------------------------- +// +EXPORT_C CBitmapContext* CFepUiBaseCtrl::BitGc() + { + + + if(iUiLayout->NotDrawToLayoutDevice() && iExtension->Gc()) + return iExtension->Gc(); + else + return iLayoutOwner->BitmapContext(); + } + +// --------------------------------------------------------------------------- +// get Bitmap device for sprite or window +// --------------------------------------------------------------------------- +// +EXPORT_C CFbsBitmapDevice* CFepUiBaseCtrl::BitmapDevice() + { + + + if(iUiLayout->NotDrawToLayoutDevice() && iExtension->BitmapDevice()) + return iExtension->BitmapDevice(); + else + return iLayoutOwner->BitmapDevice(); + } + +// --------------------------------------------------------------------------- +// get Mask bitmap device for sprite or window +// --------------------------------------------------------------------------- +// +EXPORT_C CFbsBitmapDevice* CFepUiBaseCtrl::MaskBitmapDevice() + { + + if(iUiLayout->NotDrawToLayoutDevice() && iExtension->MaskBitmapDevice()) + return iExtension->MaskBitmapDevice(); + else + + return iLayoutOwner->MaskBmpDevice(); + } + +// --------------------------------------------------------------------------- +// get control background maks bmp +// --------------------------------------------------------------------------- +// +EXPORT_C CFbsBitmap* CFepUiBaseCtrl::BkMaskBmp() + { + if(iUiLayout->NotDrawToLayoutDevice() && iExtension->MaskBitmap()) + return iExtension->MaskBitmap(); + else + return iBkMaskBmp; + } + + // --------------------------------------------------------------------------- // CFepUiBaseCtrl::EnableExtResponseArea // Enable/disable extra response area support @@ -1452,6 +1557,14 @@ iExtResponseAreaMargin.SetRect( TPoint(0,0), TSize(0,0) ); } +CFepUiBaseCtrl::CFepUiBaseCtrlExtension::~CFepUiBaseCtrlExtension() + { + //delete iBitmap; + delete iGc; + delete iBitmapDevice; + delete iMaskBitmapDevice; + } + void CFepUiBaseCtrl::CFepUiBaseCtrlExtension::SetTactileFeedbackType(TInt aTactileType) { #ifdef RD_TACTILE_FEEDBACK diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp Tue May 25 13:03:44 2010 +0300 @@ -20,10 +20,13 @@ #include #include #include +#include #include "peninputlayoutbubblectrl.h" #include "peninputlayout.h" #include +#include +#include "peninputcmd.h" const TInt KShrinkSize = 10; const TInt KDefaultTextColorIndex = EAknsCIQsnTextColorsCG60; @@ -75,7 +78,9 @@ { delete iForgroundBmpMask; iForgroundBmpMask = NULL; - } + } + delete iBitmap; + delete iMaskBitmap; } EXPORT_C void CBubbleCtrl::SetBitmapParam(CFbsBitmap* aBmpId, @@ -105,7 +110,21 @@ if(iFreeze) { iShowing = ETrue; - SetHidenFlag(EFalse); + SetHidenFlag(EFalse); + if(UiLayout()->NotDrawToLayoutDevice()) + { + struct SData + { + TRect rr; + TBool flag; + } data; + data.rr = aRect; + data.flag = ETrue; + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + + UiLayout()->SignalOwner(ESignalPopupArea,ptr); + } return; } if(!iShowing || aRect != Rect() || iNeedRedraw) @@ -117,12 +136,107 @@ BringToTop(); //redraw the control under bubble control if(aRect != rect) - RootControl()->ReDrawRect(rect); + { + // signal the server to remove the pop area added before since the rect + // has been changed + if(UiLayout()->NotDrawToLayoutDevice()) + { + struct SData + { + TRect rr; + TBool flag; + } data; + + data.rr = rect; + data.flag = EFalse; + TPtrC ptr; + + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + UiLayout()->SignalOwner(ESignalPopupArea,ptr); + } + else + { + //redraw the control under bubble control + RootControl()->ReDrawRect(rect); + } + } + + // signal server to add the pop area + if(UiLayout()->NotDrawToLayoutDevice()) + { + struct SData + { + TRect rr; + TBool flag; + } data; + + data.rr = aRect; + data.flag = ETrue; + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + + UiLayout()->SignalOwner(ESignalPopupArea,ptr); + } + + // signal server to copy the background as background bitmap for its own bitmap + if(UiLayout()->NotDrawToLayoutDevice()) + { + //copy backgroud to bitmap. DrawFrame seems to have transparent effect, + //so we need copy the background first. + if(!iBitmap) + { + TRAP_IGNORE(CreateBmpDevL()); + } + + CFbsBitGc* gc = static_cast(BitGc()); + gc->Activate( BitmapDevice() ); + CFbsBitGc* layoutGc = static_cast( + UiLayout()->LayoutOwner()->BitmapContext()); + gc->BitBlt(TPoint(0,0),*layoutGc,Rect()); + + //ensure other pop up draws correctly on the background + struct SData + { + CFbsBitGc* gc; + CFbsBitmap* bmp; + TRect rect; + } data; + + data.gc = gc; + data.bmp = iBitmap; + data.rect = Rect(); + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + + UiLayout()->SignalOwner(ESignalDrawBackground,ptr); + } Draw(); - rect.BoundingRect(aRect); - UpdateAreaImmed(rect,ETrue); + // notify sever to draw the bubble bitmap on the screen + if(UiLayout()->NotDrawToLayoutDevice()) + { + struct SData + { + TBool flag; + TRect pos; + CFbsBitmap* bmp; + CFbsBitmap* mask; + } data; + + data.flag = ETrue; + data.pos = Rect(); + data.bmp = iBitmap; + data.mask = iMaskBitmap; + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + UiLayout()->SignalOwner(ESignalUpdateBubble,ptr); + } + else + { + rect.BoundingRect(aRect); + UpdateAreaImmed(rect,ETrue); + } iNeedRedraw = EFalse; } @@ -154,8 +268,23 @@ EXPORT_C void CBubbleCtrl::Close() { TRect rect = Rect(); - - iShowing = EFalse; + if(UiLayout()->NotDrawToLayoutDevice()) + { + SetHidenFlag(ETrue); + struct SData + { + TRect rr; + TBool flag; + } data; + data.rr = rect; + data.flag = EFalse; + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + + UiLayout()->SignalOwner(ESignalPopupArea,ptr); + } + + iShowing = EFalse; if( iFreeze ) { @@ -170,12 +299,34 @@ } else { - Clear(); - SetHidenFlag(ETrue); - BringToBack(); - - RootControl()->ReDrawRect(rect); - UpdateAreaImmed(rect); + if(UiLayout()->NotDrawToLayoutDevice()) + { + struct SData + { + TBool flag; + TRect pos; + CFbsBitmap* bmp; + } data; + + data.flag = EFalse; + data.pos = Rect(); + data.bmp = iBitmap; + + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + UiLayout()->SignalOwner(ESignalUpdateBubble,ptr); + + } + else + { + + Clear(); + SetHidenFlag(ETrue); + BringToBack(); + + RootControl()->ReDrawRect(rect); + UpdateAreaImmed(rect); + } } } @@ -204,13 +355,17 @@ { return; } - + if(UiLayout()->NotDrawToLayoutDevice() && !iBitmap) + { + TRAP_IGNORE(CreateBmpDevL()); + } + CFbsBitGc* gc = static_cast(BitGc()); //mask bitmaps DrawOpaqueMaskBackground(); - TRect rect = Rect(); + TRect rect = GetRect(); TRect innerRect = rect; if ( ( iLeftDiff == 0 ) && ( iTopDiff == 0 ) @@ -298,14 +453,35 @@ { gc->SetBrushStyle( CGraphicsContext::ENullBrush ); TAknLayoutText textLayout; - textLayout.LayoutText(Rect(), iTextFormat); + textLayout.LayoutText(GetRect(), iTextFormat); TRgb color( KRgbBlack ); // sane default for nonskinned case if ( AknsUtils::AvkonSkinEnabled() ) { AknsUtils::GetCachedColor( UiLayout()->SkinInstance(), color, KAknsIIDQsnTextColors, iTextColorIndex ); } - textLayout.DrawText(*gc, *iText, ETrue, color); + if ( iLangCode == ELangArabic || + iLangCode == ELangHebrew || + iLangCode == ELangFarsi || + iLangCode == ELangUrdu ) + { + const CFont* font = textLayout.Font(); + HBufC* visualBuf = HBufC::New( iText->Length() + KAknBidiExtraSpacePerLine ); + *visualBuf = *iText; + TPtr buf = visualBuf->Des(); + + AknBidiTextUtils::ConvertToVisualAndClip(*iText, buf, *font, + textLayout.TextRect().Size().iWidth, + textLayout.TextRect().Size().iWidth, + AknBidiTextUtils::ERightToLeft ); + textLayout.DrawText(*gc, buf, EFalse, color); + delete visualBuf; + visualBuf = NULL; + } + else + { + textLayout.DrawText(*gc, *iText, EFalse, color); + } } } @@ -363,6 +539,55 @@ iInvalidRect = TRect(); } +TRect CBubbleCtrl::GetRect() + { + TRect r(Rect()); + if(UiLayout()->NotDrawToLayoutDevice()) + { + r.Move(-Rect().iTl.iX, -Rect().iTl.iY); + } + return r; + } + + +void CBubbleCtrl::SetBmpDevice(CFbsBitGc* aGc,CFbsBitmapDevice* aDevice) + { + TAny* extension; + + if(KErrNone == Extension_(KFepCtrlExtId,extension,0)) + { + static_cast(extension)->SetGc(aGc); + static_cast(extension)->SetBmpDevice(aDevice); + } + } +void CBubbleCtrl::CreateBmpDevL() + { + iBitmap = new ( ELeave ) CFbsBitmap; + //iMaskBitmap = new ( ELeave ) CFbsBitmap; + CreateOwnDeviceL(iBitmap,0); + } + +EXPORT_C void CBubbleCtrl::HandleResourceChange(TInt aType) + { + if(aType == KPenInputOwnDeviceChange) + { + if(UiLayout()->NotDrawToLayoutDevice() && !iBitmap) + { + TRAP_IGNORE(CreateBmpDevL()); + } + } + else + CFepUiBaseCtrl::HandleResourceChange(aType); + } + +EXPORT_C void CBubbleCtrl::SetRect(const TRect& aRect) + { + if(aRect == Rect()) + return; + CFepUiBaseCtrl::SetRect(aRect); + ResizeDeviceL(); + } + // --------------------------------------------------------------------------- // CTooltipBubbleCtrl::NewL // factory function diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp Tue May 25 13:03:44 2010 +0300 @@ -358,6 +358,8 @@ // EXPORT_C void CButtonBase::SetDimmed(TBool aDimFlag) { + if(iDimmed == aDimFlag) + return; //Remove its active flag if dim an active button. if(aDimFlag && IsActive()) SetActive(EFalse); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcursor.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcursor.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcursor.cpp Tue May 25 13:03:44 2010 +0300 @@ -21,6 +21,8 @@ #include "peninputlayouteditareabase.h" #include "peninputlayouttimer.h" #include "peninputlayoutrootctrl.h" +#include "peninputcmd.h" +#include "peninputlayout.h" const TInt KDefaultCursorHeight = 10; // ============================ MEMBER FUNCTIONS ============================= @@ -54,6 +56,7 @@ CFepUiBaseCtrl::BaseConstructL(); iCursorBlinkingTimer = CPeriodic::NewL(CActive::EPriorityStandard); iRestoreCursorTimer = CLayoutTimer::NewL(this,CLayoutTimer::EOthers); + CreateCursorBmpL(); } // --------------------------------------------------------------------------- @@ -84,6 +87,9 @@ } delete iRestoreCursorTimer; + delete iBitmap; + delete iBitmapDevice; + delete iGc; } @@ -215,10 +221,35 @@ if(aReset) iIsVisible = EFalse; Draw(); - UpdateArea(iCursorRect,EFalse); + //UpdateArea(iCursorRect,EFalse); + UpdateCursorArea(iCursorRect,EFalse); } +void CFepUiCursor::DrawCursor(CFbsBitGc* aGc,CFbsBitmapDevice* aDevice) + { + aGc->Activate(aDevice); + + // draw cursor by inverting colors in the selected text rectancle + //aGc->SetClippingRegion(ValidClipRegion()); + + aGc->SetBrushStyle(CGraphicsContext::ESolidBrush); + aGc->SetBrushColor(KRgbBlack); + //aGc->SetDrawMode(CGraphicsContext::EDrawModeNOTSCREEN); + aGc->Clear(); + aGc->SetPenColor(KRgbBlack); + aGc->SetPenStyle(CGraphicsContext::ESolidPen); + aGc->SetPenSize( TSize(1,1)); + // When the blink timer out and cursor is visible, do nothing + // else draw the cursor and set the visible flag + //aGc->DrawRect(iCursorRect); + //iIsVisible = !iIsVisible; + + // restore normal draw mode + aGc->SetDrawMode(CGraphicsContext::EDrawModePEN); + aGc->SetBrushStyle(CGraphicsContext::ENullBrush); + } + // --------------------------------------------------------------------------- // CFepUiCursor::Draw // Draws insertion point's Rect and starts blinking timer @@ -231,7 +262,25 @@ { return; } - + +//#ifdef FIX_FOR_NGA + if(UiLayout()->NotDrawToLayoutDevice()) + { + if(iIsOn) + { + iIsVisible = !iIsVisible; + } + else + { + if(iIsVisible) //only do when already shown + { + iIsVisible = EFalse; + } + } + + return; + } +//#endif /*if (aReset) { iIsVisible = EFalse; @@ -244,7 +293,14 @@ { // draw cursor by inverting colors in the selected text rectancle gc->SetClippingRegion(ValidClipRegion()); - + + const TRegion& tr = ValidClipRegion(); + const TRect* rl = tr.RectangleList(); + TRect rr; + for(TInt id = 0; id < tr.Count(); ++id) + { + rr = rl[id]; + } gc->SetBrushStyle(CGraphicsContext::ESolidBrush); gc->SetBrushColor(KRgbBlack); gc->SetDrawMode(CGraphicsContext::EDrawModeNOTSCREEN); @@ -324,10 +380,12 @@ // void CFepUiCursor::InvalidateInsertionPoint() { - //if(iEditor) + //if(AbleToDraw()) { Draw(); - UpdateArea(iCursorRect,EFalse); + //UpdateArea(iCursorRect,EFalse); + + UpdateCursorArea(iCursorRect,EFalse); } } @@ -435,6 +493,28 @@ void CFepUiCursor::UpdateCursorArea(const TRect& aRect, TBool aFlag) { + if(UiLayout()->NotDrawToLayoutDevice()) + { + //CopyToBmp(); + //signal special update + + struct SData + { + TBool onOff; + CFbsBitmap* bmp; + TRect rect; + } data; + data.onOff = iIsVisible; + data.bmp = iBitmap; + data.rect = iCursorRect; + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + + UiLayout()->SignalOwner(ESignalUpdateCursor,ptr); + + return; + } + CFepUiBaseCtrl* parent = iEditor->ParentCtrl(); if(parent) @@ -447,4 +527,30 @@ else UpdateArea(aRect,aFlag); } + +void CFepUiCursor::CreateCursorBmpL() + { + iBitmap = new ( ELeave ) CFbsBitmap; + + TRect rect = TRect(TPoint(0,0) , TSize(KCursorWidth,iHeight)); + + User::LeaveIfError( iBitmap->Create( rect.Size(), BitmapDevice()->DisplayMode() ) ); + + iBitmapDevice = CFbsBitmapDevice::NewL(iBitmap); + iGc = CFbsBitGc::NewL(); + iGc->Reset(); + DrawCursor(iGc,iBitmapDevice); + } + +void CFepUiCursor::ResizeCursorBmp() + { + TRect rect = TRect(TPoint(0,0) , TSize(KCursorWidth,iHeight)); + iBitmap->Resize(rect.Size()); + + iBitmapDevice->Resize( rect.Size()); + //gc must be adjusted + iGc->Activate(iBitmapDevice); + iGc->Resized(); + DrawCursor(iGc,iBitmapDevice); + } // End of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicf.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicf.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicf.cpp Tue May 25 13:03:44 2010 +0300 @@ -448,13 +448,14 @@ // --------------------------------------------------------------------------- // EXPORT_C void CFepLayoutMultiLineIcf::ShowTooltipL( const TDesC& aText, - const TRect& aRect ) + const TRect& aRect, + TInt aLangCode ) { if ( !iTooltip || !iIcfEditor ) { return; } - iIcfEditor->ShowTooltipL( aText, aRect ); + iIcfEditor->ShowTooltipL( aText, aRect, aLangCode ); } // --------------------------------------------------------------------------- diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp Tue May 25 13:03:44 2010 +0300 @@ -345,7 +345,6 @@ void CFepLayoutMultiLineIcfEditor::RecalculatePosByNewPromptTextL(const TDesC& aNewPromptText) { - // recalculate cursor pos AdjustSelectionL(TCursorSelection(iTextView->Selection().iCursorPos + aNewPromptText.Length() - iPromptTextLen, iTextView->Selection().iAnchorPos + aNewPromptText.Length() - iPromptTextLen)); @@ -357,7 +356,6 @@ iPreAutoEndPos += (aNewPromptText.Length() - iPromptTextLen); iPreTextSelStartPos += (aNewPromptText.Length() - iPromptTextLen); iPreTextSelEndPos += (aNewPromptText.Length() - iPromptTextLen); - } const HBufC* CFepLayoutMultiLineIcfEditor::PromptText() @@ -367,7 +365,6 @@ void CFepLayoutMultiLineIcfEditor::SetPromptTextL(const TDesC& aPromptText, TBool aCleanContent) { - if ( aCleanContent ) { //clean all the content (include prompt text) on the ICF @@ -379,15 +376,24 @@ iNoMatchState = EFalse; } else - { - /*if ( ( ( !iInitPromptText && aPromptText.Length() == 0 ) )|| + { + if ( ( ( !iInitPromptText && aPromptText.Length() == 0 ) )|| ( iInitPromptText && *iInitPromptText == aPromptText && iPromptText && TextWidth(*iPromptText) <= iViewRect.Width()) ) { //prompt text has not been change then need not to be reset //but iLineSeparator may be changed, need reset prompt text - return; - }*/ + TBool newLineSeparator = iLineSeparator; + if ( !iLineSeparator ) + { + newLineSeparator = ( TBidiText::TextDirectionality( aPromptText ) + == TBidiText:: ERightToLeft ); + } + if ( newLineSeparator == iLineSeparator ) + { + return; + } + } //prompt text need to be reset and not clean the content iRichText->DeleteL( 0, iPromptTextLen ); iTextView->HandleInsertDeleteL(TCursorSelection(0, 0), iPromptTextLen ); @@ -549,6 +555,7 @@ iRichText->DeleteL(iPromptTextLen, delLen ); iTextView->HandleInsertDeleteL(TCursorSelection(iPromptTextLen, iPromptTextLen), delLen); + iTextView->SetSelectionL(TCursorSelection(iPromptTextLen, iPromptTextLen)); } ptr.Copy(icfdata.iText); } @@ -1635,7 +1642,8 @@ } void CFepLayoutMultiLineIcfEditor::ShowTooltipL( const TDesC& aText, - const TRect& aRect ) + const TRect& aRect, + TInt aLangCode ) { if ( !iTooltip ) { @@ -1643,6 +1651,7 @@ } iTooltip->SetTextL( aText ); + iTooltip->SetLangCode( aLangCode ); TPoint tl( 0, 0 ), br( 0, 0 ); InlineTextPos( tl, br ); @@ -1685,6 +1694,12 @@ tooltipRect.iTl.iX += moveX; } } + + if (( iTooltip->Rect().iTl != tooltipRect.iTl ) && ( iTooltip->Rect().iBr != tooltipRect.iBr )) + { + iTooltip->Close(); + } + iTooltip->Popup( tooltipRect ); } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutpopupwnd.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutpopupwnd.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutpopupwnd.cpp Tue May 25 13:03:44 2010 +0300 @@ -48,6 +48,7 @@ { //do nothing } + delete iExt; } // --------------------------------------------------------------------------- @@ -58,6 +59,14 @@ EXPORT_C void CFepLayoutPopupWnd::ConstructL() { BaseConstructL(); + iExt = CPopupWndExt::NewL(); + //check whether we need create backup bmp. Some pop up window is created after UI layout is created + //If a pop up window is created during layout constructing, it will create the backup bitmap in Handleresourcechange + if (UiLayout()->NotDrawToLayoutDevice()) + { + iExt->ContructBkDeviceL(Rect().Size(), + UiLayout()->LayoutOwner()->BitmapDevice()->DisplayMode()); + } } EXPORT_C void CFepLayoutPopupWnd::ReDrawRect(const TRect& /*aRect*/) @@ -258,6 +267,9 @@ RootControl()->SetActiveCtrl(this); ReportEvent(EEventCapturePointer); + //When preparing the pop up window, it causes redraw the underlying control sometimes. + DisableDrawingInGroup();//disable any drawing during preparation to avoid it dirty the background + //let pop up window do preparation OnDisplay(); @@ -359,7 +371,9 @@ //RootControl()->Clear(); DrawTransparentMaskBackground( TRect( TPoint(), rtFinal.Size() ) ); RootControl()->Move(iLayoutMoveOff); - RootControl()->Draw(); + EnableDrawingInGroup(); + RootControl()->Draw(); + DisableDrawingInGroup(); //UpdateArea( TRect( TPoint(), rtFinal.Size()), ETrue); } else @@ -377,8 +391,30 @@ //iRect = rtPopup; Move( rtPopup.iTl - Rect().iTl); + //copy and save the bitmap + if (UiLayout()->NotDrawToLayoutDevice()) + { + iExt->SetRect(Rect()); + + CFbsBitGc* gc = iExt->BackupGc(); + gc->Activate( iExt->BackupDevice() ); + CFbsBitGc* layoutGc = static_cast( + UiLayout()->LayoutOwner()->BitmapContext()); + gc->BitBlt(TPoint(0,0),*layoutGc,Rect()); + + Hide(EFalse); + } + + EnableDrawingInGroup(); + UiLayout()->LockArea(iRect,this); - Hide(EFalse); + + SetReady(ETrue);//enalbe it as in Close, the flag is reset. + if (UiLayout()->NotDrawToLayoutDevice()) + Draw();//force draw + else + Hide(EFalse); + UpdateArea(iRect, EFalse); iIsShowing = ETrue; AfterDisplayed(); @@ -434,7 +470,26 @@ iIsShowing = EFalse; if(iWndControl) iWndControl->MakeVisible(EFalse); - Hide(ETrue); + SetReady(EFalse);//disable redraw + TRect popRect = iRect; + UiLayout()->UnLockArea(iRect, this); + + //restore the background bitmap + TBool bRedraw = ETrue; + if (UiLayout()->NotDrawToLayoutDevice()) + { + CFbsBitGc* layoutGc = static_cast( + UiLayout()->LayoutOwner()->BitmapContext()); + + iExt->BackupGc(); + layoutGc->Activate( UiLayout()->LayoutOwner()->BitmapDevice()); + TRect r; + r.SetSize(iExt->Rect().Size()); + layoutGc->BitBlt(iExt->Rect().iTl,iExt->BackupBitmap(),r); + bRedraw = EFalse; + } + + Hide(ETrue); UiLayout()->UnLockArea(iRect,this); iRect.Move(-iRect.iTl); MLayoutOwner* layoutOwner = UiLayout()->LayoutOwner(); @@ -448,12 +503,15 @@ RootControl()->GraphicDeviceSizeChanged(); } - RootControl()->Draw(); + if (bRedraw) + { + RootControl()->Draw(); + } iIsShowing = EFalse; - TRect rect( TPoint(0,0),iPrevLayoutRect.Size() ); - UpdateArea( rect, EFalse ); + //TRect rect(TPoint(0, 0), iPrevLayoutRect.Size()); + UpdateArea(popRect, EFalse); } // --------------------------------------------------------------------------- @@ -496,3 +554,87 @@ { //do nothing } +EXPORT_C void CFepLayoutPopupWnd::HandleResourceChange(TInt aType) + { + if (aType == KPenInputOwnDeviceChange) + { + if (UiLayout()->NotDrawToLayoutDevice()) + { + TRAP_IGNORE(iExt->ContructBkDeviceL(Rect().Size(), + UiLayout()->LayoutOwner()->BitmapDevice()->DisplayMode())); + } + } + else + CControlGroup::HandleResourceChange(aType); + } +void CFepLayoutPopupWnd::DisableDrawingInGroup() + { + + UiLayout()->DisableLayoutDrawing(ETrue); + SetReady(EFalse); + for(TInt i = 0; i < NumOfControls(); ++i) + { + //There is potential defect that if the child control is a group control, its children not set. + //This can be solved by locking the area so no one can update until we unlock it in Enalbegroup + ControlList()[i]->SetReady(EFalse); + } + } +void CFepLayoutPopupWnd::EnableDrawingInGroup() + { + SetReady(ETrue); + for(TInt i = 0; i < NumOfControls(); ++i) + { + //There is potential defect that if the child control is a group control, its children not set. + //This can be solved by locking the area so no one can update until we unlock it in Enalbegroup + ControlList()[i]->SetReady(ETrue); + } + UiLayout()->DisableLayoutDrawing(EFalse); + } + + + +CFepLayoutPopupWnd::CPopupWndExt* CFepLayoutPopupWnd::CPopupWndExt::NewL() + { + CPopupWndExt* self = new (ELeave)CPopupWndExt(); + return self; + } + +void CFepLayoutPopupWnd::CPopupWndExt::ContructBkDeviceL(const TSize& aSize,const TDisplayMode& aMode) + { + TBool bNewBmp = EFalse; + if(!iBitmap || iBitmap->DisplayMode() != aMode) + { + delete iBitmap; + iBitmap = 0; + iBitmap = new (ELeave) CFbsBitmap; + User::LeaveIfError( iBitmap->Create( aSize,aMode)); + delete iBitmapDevice; + iBitmapDevice = 0; + iBitmapDevice = CFbsBitmapDevice::NewL(iBitmap); + bNewBmp = ETrue; + } + if(!iGc) + iGc = CFbsBitGc::NewL(); + + if(!bNewBmp && aSize != iBitmap->SizeInPixels()) + { + ResizeBackupDeviceL(aSize); + } + } +void CFepLayoutPopupWnd::CPopupWndExt::ResizeBackupDeviceL(const TSize& aSize) + { + + iBitmap->Resize(aSize); + iBitmapDevice->Resize( aSize); + iGc->Activate(iBitmapDevice); + iGc->Resized(); + } +void CFepLayoutPopupWnd::CPopupWndExt::SetRect(const TRect& aRect) + { + iRect = aRect; + if(iBitmap && iBitmap->SizeInPixels() != aRect.Size()) + { + ResizeBackupDeviceL(aRect.Size()); + } + } +// End of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutrootctrl.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutrootctrl.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutrootctrl.cpp Tue May 25 13:03:44 2010 +0300 @@ -815,7 +815,8 @@ if(!AbleToDraw()) return; - + + Clear(); CControlGroup::Draw(); if(!iShadowRect.IsEmpty()) @@ -1004,7 +1005,9 @@ { if(aCtrl->OrderPos() <= iPopCtrlList[i]->OrderPos()) { + CFepUiBaseCtrl* temp = iPopCtrlList[i - 1]; iPopCtrlList[i - 1] = iPopCtrlList[i]; + iPopCtrlList[i] = temp; } else { @@ -1142,7 +1145,10 @@ { if(aCtrl->OrderPos() >= iPopCtrlList[i]->OrderPos()) { - iPopCtrlList[i+1] = iPopCtrlList[i]; + CFepUiBaseCtrl* temp = iPopCtrlList[i + 1]; + iPopCtrlList[i + 1] = iPopCtrlList[i]; + iPopCtrlList[i] = temp; + } else { diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkb.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkb.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkb.cpp Tue May 25 13:03:44 2010 +0300 @@ -95,7 +95,6 @@ iKeyNormalSkinId(KAknsIIDNone), iKeyHighlightSkinId(KAknsIIDNone), iKeyDimSkinId(KAknsIIDNone), - iNeedDrawBackground(ETrue), iIrregularKey(aIrregular), iBubbleCtrl(NULL), iBubbleVerticalMargin(0), @@ -113,6 +112,7 @@ // EXPORT_C CVirtualKeyboard::~CVirtualKeyboard() { + delete iExt; if ( iBubbleCtrl ) delete iBubbleCtrl; if ( iPreviewBubbleRenderer ) @@ -189,7 +189,8 @@ if (iIrregularKey) { ConstructIrregularBmps(); - } + } + iExt = new(ELeave) CFepUiKeyboardExt; } // --------------------------------------------------------------------------- @@ -387,7 +388,12 @@ return; const TRect& keyboardRect = Rect(); - if (iNeedDrawBackground) + if(UiLayout()->NotDrawToLayoutDevice() && !Bitmap()) + { + TRAP_IGNORE(CreateBmpDevL()); + } + + if ( NeedRedrawBg()) { CFbsBitGc* gc = static_cast(BitGc()); @@ -527,6 +533,10 @@ if(!flag) { TRAP_IGNORE(iBubbleCtrl = CBubbleCtrl::NewL(TRect(0,0,0,0),UiLayout(),-0xFFFF)); + if(iBubbleCtrl && UiLayout()->NotDrawToLayoutDevice()) + { + iBubbleCtrl->CreateBmpDevL(); + } iBubbleSize = TSize(KDefaultBubbleSize,KDefaultBubbleSize); } } @@ -1441,4 +1451,154 @@ iKeyCtrl->Hide( aHide ); } } + +void CFepUiKeyboardExt::CreateBmpDevL(const TDisplayMode &aMode ) + { + if(iBitmap && iHighlightDev && iHighlightGc && iHighlightKeyBmp && iHighlightKeyDev && + iNormalKeyBmp && iNormalKeyDev && iDimmedKeyBmp && iDimmedKeyDev && iKeyGc) + return; + + delete iBitmap; + delete iHighlightDev; + delete iHighlightGc; + delete iHighlightKeyBmp; + delete iHighlightKeyDev; + delete iNormalKeyBmp; + delete iNormalKeyDev; + delete iDimmedKeyBmp; + delete iDimmedKeyDev; + delete iKeyGc; + + iBitmap = 0; + iHighlightDev = 0 ; + iHighlightGc = 0 ; + iHighlightKeyBmp = 0 ; + iHighlightKeyDev = 0 ; + iNormalKeyBmp = 0 ; + iNormalKeyDev = 0 ; + iDimmedKeyBmp = 0 ; + iDimmedKeyDev = 0; + iKeyGc = 0; + + iBitmap = new ( ELeave ) CFbsBitmap; + User::LeaveIfError( iBitmap->Create( TSize(1,1), aMode) ); + + iHighlightDev = CFbsBitmapDevice::NewL(iBitmap); + + iHighlightGc = CFbsBitGc::NewL(); + iHighlightGc->Reset(); + + + iHighlightKeyBmp = new ( ELeave ) CFbsBitmap; + User::LeaveIfError( iHighlightKeyBmp->Create( TSize(1,1), aMode) ); + iHighlightKeyDev = CFbsBitmapDevice::NewL(iHighlightKeyBmp); + + iNormalKeyBmp = new ( ELeave ) CFbsBitmap; + User::LeaveIfError( iNormalKeyBmp->Create( TSize(1,1), aMode) ); + iNormalKeyDev = CFbsBitmapDevice::NewL(iNormalKeyBmp); + + iDimmedKeyBmp = new ( ELeave ) CFbsBitmap; + User::LeaveIfError( iDimmedKeyBmp->Create( TSize(1,1), aMode) ); + iDimmedKeyDev = CFbsBitmapDevice::NewL(iDimmedKeyBmp); + + iKeyGc = CFbsBitGc::NewL(); + iKeyGc->Reset(); + } + +void CVirtualKeyboard::CreateBmpDevL() + { + iExt->CreateBmpDevL(UiLayout()->LayoutOwner()->BitmapDevice()->DisplayMode()); + } + +EXPORT_C void CVirtualKeyboard::HandleResourceChange(TInt aType) + { + if(aType == KPenInputOwnDeviceChange) + { + if(UiLayout()->NotDrawToLayoutDevice()) + { + TRAP_IGNORE(CreateBmpDevL()); + } + } + else + CControlGroup::HandleResourceChange(aType); + } + +CFbsBitmap* CVirtualKeyboard::PrepareMaskBmpL(CFbsBitGc* aGc, const TDisplayMode& aMode, const TRect& aRect) + { + CFbsBitmap* mask = new(ELeave) CFbsBitmap(); + CleanupStack::PushL(mask); + User::LeaveIfError( mask->Create( aRect.Size(), aMode) ); + CFbsBitmapDevice* maskDev = CFbsBitmapDevice::NewL(mask); + const TRgb KOpaqueMask = TRgb(KOpaqueColor); + DrawBackgroundToDevice(aRect,maskDev,NULL,KOpaqueMask,KOpaqueMask,EFalse); + delete maskDev; + CleanupStack::Pop(mask); + return mask; + } +CFbsBitmap* CVirtualKeyboard::PrepareKeyBmpL(CFbsBitGc* aGc, const TDisplayMode& aMode, const TRect& aRect, + const TRect& aInnerRect,const TAknsItemID& aFrameID, const TAknsItemID& aCenterID, const TRect& aKeyRect) + { + CFbsBitmap* key = new(ELeave) CFbsBitmap(); + CleanupStack::PushL(key); + User::LeaveIfError( key->Create( aRect.Size(), aMode) ); + + CFbsBitmapDevice* dev = CFbsBitmapDevice::NewL(key); + CleanupStack::PushL(dev); + + CFbsBitGc* keyGc = CFbsBitGc::NewL(); + keyGc->Reset(); + CleanupStack::PushL(keyGc); + + keyGc->Activate(dev); + + CFbsBitGc* layoutGc = static_cast( + UiLayout()->LayoutOwner()->BitmapContext()); + layoutGc->Activate(UiLayout()->LayoutOwner()->BitmapDevice()); + + keyGc->BitBlt(TPoint(0,0),*layoutGc,aKeyRect); + + AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), + *keyGc, + aRect, + aInnerRect, + aFrameID, + aCenterID); + + layoutGc->Activate(UiLayout()->LayoutOwner()->BitmapDevice()); + + CleanupStack::PopAndDestroy(2); + CleanupStack::Pop(key); + + return key; + } + +TBool CVirtualKeyboard::PrepareKeyBmp(CFbsBitmap* aBmp,CFbsBitmapDevice* aDev,const TRect& aRect, + const TRect& aInnerRect,const TAknsItemID& aFrameID, const TAknsItemID& aCenterID, const TRect& aKeyRect) + { + + aBmp->Resize(aRect.Size()); + aDev->Resize(aRect.Size()); + iExt->iKeyGc->Activate(aDev); + iExt->iKeyGc->Resized(); + + TRect r = aRect; + r.Move(-r.iTl.iX, -r.iTl.iY); + + CFbsBitmap* keyBmp = NULL; + TRect inner = aInnerRect; + TPoint off = aInnerRect.iTl - aRect.iTl; + inner.Move(-inner.iTl.iX + off.iX, -inner.iTl.iY + off.iY); + TRAP_IGNORE(keyBmp = PrepareKeyBmpL(iExt->iKeyGc, + UiLayout()->LayoutOwner()->BitmapDevice()->DisplayMode(), + r,inner,aFrameID,aCenterID,aKeyRect)); + if(!keyBmp) + { + return EFalse; + } + + iExt->iKeyGc->BitBlt(TPoint(0,0), keyBmp,r); + + delete keyBmp; + return ETrue; + } //end of implementation of Class CVirtualKey diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp Tue May 25 13:03:44 2010 +0300 @@ -28,6 +28,7 @@ #include "peninputlayoutvkb.h" #include "peninputlayout.h" #include "peninputpluginutils.h" +#include "peninputcmd.h" _LIT( KKeyShiftCharacter, "\x2191"); _LIT( KKeyStarCharacter, "\x002a"); @@ -117,7 +118,7 @@ // (other items were commented in a header). // --------------------------------------------------------------------------- // -void CVirtualKeyCtrl::DrawKeyText() +void CVirtualKeyCtrl::DrawKeyText(CFbsBitGc* aGc) { TBool textlineset = EFalse; @@ -131,7 +132,7 @@ if (iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)) != KNullDesC) { TAknLayoutText textLayout; - textLayout.LayoutText(Rect(), + textLayout.LayoutText(GetRect(), iKeyboard->TextLineLayout(TVirtualKeyTextPos(i))); TRgb color( KRgbBlack ); // sane default for nonskinned case if ( AknsUtils::AvkonSkinEnabled() ) @@ -146,22 +147,22 @@ if( iKeyboard->ShiftIcon() && iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)) == KKeyShiftCharacter ) { - CFbsBitGc* gc = static_cast(BitGc()); + //CFbsBitGc* gc = GetGc();//static_cast(BitGc()); AknPenInputDrawUtils::DrawColorIcon( iKeyboard->ShiftIcon(), - *gc, + *aGc, textLayout.TextRect() ); } else if(iKeyboard->StarIcon() && iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)) == KKeyStarCharacter ) { - CFbsBitGc* gc = static_cast(BitGc()); + //CFbsBitGc* gc = static_cast(BitGc()); AknPenInputDrawUtils::DrawColorIcon( iKeyboard->StarIcon(), - *gc, + *aGc, textLayout.TextRect() ); } else { - textLayout.DrawText(*BitGc(), iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)), + textLayout.DrawText(*aGc, iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)), EFalse, color); } } @@ -171,9 +172,9 @@ if (!textlineset) { TAknLayoutText textLayout; - textLayout.LayoutText(Rect(), iKeyboard->iVKBTextLineLayout); + textLayout.LayoutText(GetRect(), iKeyboard->iVKBTextLineLayout); - CFbsBitGc* gc = static_cast(BitGc()); + //CFbsBitGc* gc = static_cast(BitGc()); //charRect.Move(keyboardRect.iTl); //if(iKeyInfo->Dimmed()) @@ -201,11 +202,11 @@ } if( iKeyInfo->DisplayUnicode() && iKeyInfo->DisplayUnicode()->Length() != 0) { - textLayout.DrawText(*BitGc(), *iKeyInfo->DisplayUnicode(), EFalse, color); + textLayout.DrawText(*aGc, *iKeyInfo->DisplayUnicode(), EFalse, color); } else { - textLayout.DrawText(*BitGc(), iKeyInfo->KeyUnicodes(), EFalse, color); + textLayout.DrawText(*aGc, iKeyInfo->KeyUnicodes(), EFalse, color); } //if(iKeyInfo->Dimmed()) @@ -299,7 +300,7 @@ gc->SetPenColor(KRgbBlack); gc->SetBrushStyle( CGraphicsContext::ENullBrush ); //Draw text again. - DrawKeyText(); + DrawKeyText(gc); } // --------------------------------------------------------------------------- @@ -313,15 +314,28 @@ TBool aInvertFlag) { CFbsBitGc* gc = static_cast(BitGc()); + DrawBmp(gc,aDestRect,aSourceRect,aBmp,aMask,aInvertFlag); + } + +// --------------------------------------------------------------------------- +// CVirtualKeyCtrl::DrawBmp +// Draw bitmap +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CVirtualKeyCtrl::DrawBmp(CFbsBitGc* aGc, const TRect& aDestRect,const TRect& aSourceRect, + const CFbsBitmap* aBmp,CFbsBitmap* aMask, + TBool aInvertFlag) + { if(aMask) { //TRect bmpRect(TPoint(0,0),aMask->SizeInPixels()); - gc->DrawBitmapMasked(aDestRect,aBmp,aSourceRect,aMask,aInvertFlag); + aGc->DrawBitmapMasked(aDestRect,aBmp,aSourceRect,aMask,aInvertFlag); } else { - gc->DrawBitmap(aDestRect,aBmp,aSourceRect); - } + aGc->DrawBitmap(aDestRect,aBmp,aSourceRect); + } } // --------------------------------------------------------------------------- @@ -360,13 +374,30 @@ { TRect innerrect = rect; innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin ); - - AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), - *gc, - rect, - innerrect, - iKeyboard->KeySkinId(EKeyBmpNormal), - KAknsIIDDefault); + TBool bHasDrawn = EFalse; + if(UiLayout()->NotDrawToLayoutDevice()) + { + TBool ret = iKeyboard->PrepareKeyBmp(iKeyboard->NormalKeyBmp(), + iKeyboard->NormalKeyDev(), + rect,innerrect, + iKeyboard->KeySkinId(EKeyBmpNormal), + KAknsIIDDefault,Rect()); + if(ret) + { + gc->BitBlt(rect.iTl,iKeyboard->NormalKeyBmp()); + bHasDrawn = ETrue; + } + } + + if(!bHasDrawn) + { + AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), + *gc, + rect, + innerrect, + iKeyboard->KeySkinId(EKeyBmpNormal), + KAknsIIDDefault); + } } else if( iKeyboard->NonIrregularKeyBitmap( EKeyBmpNormal ) ) { @@ -403,9 +434,28 @@ gc->SetPenColor( KRgbBlack ); gc->SetBrushStyle( CGraphicsContext::ENullBrush ); gc->SetFaded(EFalse); - DrawKeyText(); + DrawKeyText(gc); } - + +CFbsBitGc* CVirtualKeyCtrl::GetGc() + { + if(UiLayout()->NotDrawToLayoutDevice()) + { + //draw to highligh bitmap + if(Keyboard()->Bitmap()->SizeInPixels() != Rect().Size()) + { + Keyboard()->Bitmap()->Resize(Rect().Size()); + Keyboard()->HighlightDev()->Resize( Rect().Size()); + //gc must be adjusted + Keyboard()->HighlightGc()->Activate(Keyboard()->HighlightDev()); + Keyboard()->HighlightGc()->Resized(); + } + return Keyboard()->HighlightGc(); + } + else + return static_cast(BitGc()); + } + // --------------------------------------------------------------------------- // CVirtualKeyCtrl::DrawHighlightKey // Draw key in highlight state @@ -414,8 +464,11 @@ // void CVirtualKeyCtrl::DrawHighlightKey() { - CFbsBitGc* gc = static_cast(BitGc()); - TRect rect = Rect(); + CFbsBitGc* gc = GetGc(); + if(UiLayout()->NotDrawToLayoutDevice()) + gc->Activate( Keyboard()->HighlightDev() ); + TRect rect = GetRect(); + TPoint bmpPos = rect.iTl; TRect bmpRect(TPoint(0,0),rect.Size()); @@ -423,12 +476,12 @@ iVirtualKeyDrawInfo.iVKPressedMiddleImgID.iMajor && iVirtualKeyDrawInfo.iVKPressedRightImgID.iMajor) { - TRect innerRect = Rect(); + TRect innerRect = GetRect(); innerRect.Shrink( 4, 0 ); AknPenInputDrawUtils::Draw3PiecesFrame(UiLayout()->SkinInstance(), *gc, - Rect(), + GetRect(), innerRect, iVirtualKeyDrawInfo.iVKPressedLeftImgID, iVirtualKeyDrawInfo.iVKPressedMiddleImgID, @@ -444,20 +497,38 @@ else if (iKeyboard->KeySkinId(EKeyBmpHighlight) != KAknsIIDNone) { TRect innerrect = rect; + innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin ); - - AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), - *gc, - rect, - innerrect, - iKeyboard->KeySkinId(EKeyBmpHighlight), - KAknsIIDDefault); + TBool bHasDrawn = EFalse; + if(UiLayout()->NotDrawToLayoutDevice()) + { + TBool ret = iKeyboard->PrepareKeyBmp(iKeyboard->HighightKeyBmp(), + iKeyboard->HighlightKeyDev(), + rect,innerrect, + iKeyboard->KeySkinId(EKeyBmpHighlight), + KAknsIIDDefault,Rect()); + if(ret) + { + gc->BitBlt(rect.iTl,iKeyboard->HighightKeyBmp()); + bHasDrawn = ETrue; + } + } + + if(!bHasDrawn) + { + AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), + *gc, + rect, + innerrect, + iKeyboard->KeySkinId(EKeyBmpHighlight), + KAknsIIDDefault); + } } else if( iKeyboard->NonIrregularKeyBitmap( EKeyBmpHighlight ) ) { TRect srcRect(TPoint(0,0), iKeyboard->NonIrregularKeyBitmap( EKeyBmpHighlight )->SizeInPixels()); - DrawBmp(rect, + DrawBmp(gc, rect, srcRect, iKeyboard->NonIrregularKeyBitmap( EKeyBmpHighlight ), iKeyboard->NonIrregularKeyBitmap( EKeyBmpHighlightMask ), @@ -490,7 +561,15 @@ gc->SetBrushStyle( CGraphicsContext::ENullBrush ); gc->SetFaded(EFalse); - DrawKeyText(); + if(UiLayout()->NotDrawToLayoutDevice()) + { + DrawKeyText(Keyboard()->HighlightGc()); + UpdateChangedArea(ETrue); + } + else + { + DrawKeyText(gc); + } } @@ -554,7 +633,22 @@ //draw key new state iKeyboard->DrawBubble(iKeyInfo); - ReDraw(); + if(UiLayout()->NotDrawToLayoutDevice()) + { + if( !(iKeyInfo->Dimmed()) && (iKeyInfo->Latched() || (PointerDown()&&!iKeyInfo->IsLatchKey())) ) + { + DrawHighlightKey(); + } + else + { + ReDraw(); + } + } + else + { + ReDraw(); + UpdateArea( Rect() ); + } UpdateArea( Rect() ); if(iKeyInfo->IsLatchKey()) @@ -593,8 +687,17 @@ // When key down, latch key won't generate event. eventType = iKeyInfo->Latched() ? EEventVirtualKeyLatched : EEventVirtualKeyUnLatched; } - ReDraw(); - UpdateAreaImmed( Rect() ); + if(UiLayout()->NotDrawToLayoutDevice()) + { + //no need to draw again, just remove the highlight bitmap + UpdateChangedArea(EFalse); + Draw(); + } + else + { + ReDraw(); + UpdateAreaImmed( Rect() ); + } ReportKeyEvent(eventType); @@ -628,7 +731,12 @@ iKeyboard->DrawBubble(iKeyInfo); ReDraw(); - UpdateArea( Rect() ); + if(UiLayout()->NotDrawToLayoutDevice()) + { + UpdateChangedArea(ETrue); + } + else + UpdateArea( Rect() ); } @@ -651,8 +759,15 @@ } iKeyboard->ClearBubble(ETrue); - ReDraw(); - UpdateArea( Rect() ); + if(UiLayout()->NotDrawToLayoutDevice()) + { + UpdateChangedArea(EFalse); + } + else + { + ReDraw(); + UpdateArea( Rect() ); + } #ifdef RD_TACTILE_FEEDBACK if ( iKeyboard->GowithPointerDown() ) @@ -673,8 +788,15 @@ { CFepUiBaseCtrl::CancelPointerDownL(); iKeyboard->ClearBubble(ETrue); - ReDraw(); - UpdateArea( Rect() ); + if(UiLayout()->NotDrawToLayoutDevice()) + { + UpdateChangedArea(EFalse); + } + else + { + ReDraw(); + UpdateArea( Rect() ); + } } // --------------------------------------------------------------------------- // CVirtualKeyCtrl::ReDraw @@ -684,8 +806,24 @@ // void CVirtualKeyCtrl::ReDraw() { - Draw(); - UpdateArea(Rect(), EFalse); + if(UiLayout()->NotDrawToLayoutDevice()) + { + if(iKeyInfo->Latched()||(PointerDown()&&!iKeyInfo->IsLatchKey())) + { + DrawHighlightKey(); + UpdateChangedArea(ETrue); + } + else + { + Draw(); + UpdateArea(Rect(), EFalse); + } + } + else + { + Draw(); + UpdateArea(Rect(), EFalse); + } } // --------------------------------------------------------------------------- @@ -903,6 +1041,10 @@ // void CVirtualRawKeyCtrl::HandlePointerLeave(const TPoint& aPoint) { + if(UiLayout()->NotDrawToLayoutDevice()) + { + UpdateChangedArea(EFalse); + } TRawEvent event; event.Set(TRawEvent::EButton1Up,aPoint.iX,aPoint.iY); @@ -919,4 +1061,34 @@ } #endif //RD_TACTILE_FEEDBACK } + +TRect CVirtualKeyCtrl::GetRect() + { + TRect r(Rect()); + if(UiLayout()->NotDrawToLayoutDevice()) + { + if(iKeyInfo->Latched()||(PointerDown()&&!iKeyInfo->IsLatchKey())) + { + r.Move(-r.iTl.iX, -r.iTl.iY); + } + } + return r; + } + +void CVirtualKeyCtrl::UpdateChangedArea(TBool aFlag) + { + struct SData + { + TBool flag; + CFbsBitmap* bmp; + TRect pos; + } data; + data.flag = aFlag; + data.bmp = Keyboard()->Bitmap();//aFlag ? Keyboard()->iBitmap : 0; + data.pos = Rect(); + TPtrC ptr; + ptr.Set(reinterpret_cast(&data),sizeof(data)/sizeof(TUint16)); + + UiLayout()->SignalOwner(ESignalUpdateChangedArea,ptr); + } //end of file diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp --- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp Tue May 25 13:03:44 2010 +0300 @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #ifdef RD_TACTILE_FEEDBACK #include @@ -84,6 +84,7 @@ #endif // RD_TACTILE_FEEDBACK iExtension->iSkinInstance = AknsUtils::SkinInstance(); iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance(); + iExtension->iDisableDrawing = EFalse; } // --------------------------------------------------------------------------- @@ -175,6 +176,17 @@ TRAP_IGNORE(SendEditorTextAndCursorPosL(aData)); } break; + case ECmdPeninputEnableOwnBitmap: + { + SetSelfBmpDeviceFlag(*(reinterpret_cast(aData))); + OnResourceChange(KPenInputOwnDeviceChange); + } + break; + case ECmdPeninputDisableLayoutDrawing: + { + DisableLayoutDrawing(*(reinterpret_cast(aData))); + } + break; default: { ret = -1; @@ -572,6 +584,8 @@ const TRect& aRect,TBool aUpdateFlag,TBool aImmedFlag) { //do nothing if it's locked and aCtrl is not the owner. + if(!iLayoutReady || iExtension->iDisableDrawing) + return; TBool bUpdate = ETrue; if(!iLockedArea.IsEmpty() ) { @@ -876,4 +890,27 @@ { return iRootCtrl->CreateCursor(); } + +EXPORT_C TBool CFepUiLayout::NotDrawToLayoutDevice() + { + return iExtension->iSelfBmpDeviceFlag; + } + +void CFepUiLayout::SetSelfBmpDeviceFlag(TBool aFlag) + { + iExtension->iSelfBmpDeviceFlag = aFlag; + } + + +EXPORT_C void CFepUiLayout::DisableLayoutDrawing(TBool aFlag) + { + if(iExtension->iDisableDrawing == aFlag) + return; + iExtension->iDisableDrawing = aFlag; + TPtrC ptr; + ptr.Set(reinterpret_cast(&aFlag),sizeof(aFlag)/sizeof(TUint16)); + + SignalOwner(ESignalDisableUpdating,ptr); + } + //end of file diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputserverapp/keyrotator.cpp --- a/textinput/peninputarc/src/peninputserverapp/keyrotator.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputserverapp/keyrotator.cpp Tue May 25 13:03:44 2010 +0300 @@ -18,7 +18,7 @@ #include "keyrotator.h" #include #include -#include +#include #include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputserverapp/peninputserver.cpp --- a/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp Tue May 25 13:03:44 2010 +0300 @@ -528,7 +528,10 @@ if(!iUiLayout) return; - + + TBool notDraw = EFalse; + iUiLayout->HandleCommand(ECmdPeninputDisableLayoutDrawing,(unsigned char*)¬Draw); + // move it out from if(!iActive) to make sure that msg bubble can be // shown if fast swap from other application to msg application. TBool bNeedWait = AnimOpNeedWaiting(ESignalPenUiActivated); @@ -1204,6 +1207,13 @@ ClearSpriteGc(); DeactivateSprite(); iDestroyingLayout = ETrue; + if(iUseWindowCtrl) + { + if(iPenUiCtrl) + { + iPenUiCtrl->Clean(); + } + } iUiLayout->Destroy(); iUiLayout = NULL; iDestroyingLayout = EFalse; @@ -1307,8 +1317,12 @@ iUseWindowCtrl = ETrue; if(iUseWindowCtrl) - { - iPenUiCtrl->SetExtent(layoutRect.iTl,layoutSize); + { +#ifdef FIX_FOR_NGA + TBool flag = ETrue; + iUiLayout->HandleCommand(ECmdPeninputEnableOwnBitmap,reinterpret_cast(&flag)); +#endif + iPenUiCtrl->SetExtent(layoutRect.iTl,layoutSize); if(iAnimObj) { iAnimObj->AddEnalbeSpriteCmd(EFalse); @@ -1563,10 +1577,6 @@ return; } -#ifndef FIX_FOR_NGA -#define FIX_FOR_NGA -#endif - //MLayoutOwner // --------------------------------------------------------------------------- // CPeninputServer::UpdateArea @@ -1901,15 +1911,11 @@ } break; - case ESignalPopupWndClosed: - { - if(iUseWindowCtrl) + default: + if(iUseWindowCtrl) { - iPenUiCtrl->ClosePopup(); + iPenUiCtrl->HandleNGASpecificSignal(aEventType, aEventData); } - } - break; - default: break; } } @@ -2117,9 +2123,17 @@ } return; } -*/ if(iActive && !iPrevActive && - iUiLayout->PenInputType() != EPluginInputModeFSQ && - iBackgroudDefaultOri == CAknAppUiBase::EAppUiOrientationUnspecified ) +*/ + TInt inputMode = iUiLayout ? iUiLayout->PenInputType() : EPluginInputModeNone; + + TBool isArabicFingerInput = (inputMode == EPluginInputModeFingerHwr && iInputLanguage == ELangArabic); + + if(isArabicFingerInput) + { + return; + } + + if(iActive && !iPrevActive && inputMode != EPluginInputModeFSQ && iBackgroudDefaultOri == CAknAppUiBase::EAppUiOrientationUnspecified ) { iPrevActive = ETrue; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp --- a/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp Tue May 25 13:03:44 2010 +0300 @@ -29,10 +29,7 @@ #include #include #endif - -#ifndef FIX_FOR_NGA -#define FIX_FOR_NGA -#endif +#include "peninputcmd.h" const TInt KAknCapServerUid = 0x10207218; const TInt KAknNotifySrvUid = 0x10281EF2; @@ -74,7 +71,13 @@ { iAutoRefreshTimer->Cancel(); } - delete iAutoRefreshTimer; + delete iAutoRefreshTimer; + iPopRegion.Close(); + iBubblesArea.Close(); + iBubblesMaskArea.Close(); + iBubblesPos.Close(); + + delete iCursorWnd; } void CPenUiWndCtrl::ConstructL() @@ -84,7 +87,7 @@ Window().SetRequiredDisplayMode( EColor16MA ); iIncallBubble = CAknIncallBubble::NewL(); - MakeVisible( EFalse ); + #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS // only change registration, if not registered, don't register if (!GfxTransEffect::IsRegistered( this ) ) @@ -96,24 +99,39 @@ iPopupWnd = CPenUiPopWnd::NewL(iWndGroup,iBitmap,this); iAutoRefreshTimer = CPeriodic::NewL( CActive::EPriorityStandard ); + + iCursorWnd = new (ELeave) CCursorWindow(this); + //iCursorWnd->ConstructL(this); + iCursorWnd->SetContainerWindowL(*this); + + MakeVisible( EFalse ); } void CPenUiWndCtrl::Draw(const TRect& aRect) const { + if(iNotUpdating) + return; + CWindowGc& gc = SystemGc(); if ( iShowPopup ) { //layout is extended by popup - TRect rect = aRect; - rect.Intersection( iLayoutClipRect ); - TPoint pos = rect.iTl - iLayoutClipRect.iTl; - gc.BitBlt( pos, iBitmap, rect ); - return; + gc.SetClippingRect( iLayoutClipRect ); } - - gc.BitBlt(aRect.iTl,iBitmap,aRect); + + #ifdef FIX_FOR_NGA + gc.BitBlt(TPoint(0,0),iBitmap,Rect()); + + //draw bubble + for(TInt i = 0 ; i < iBubblesArea.Count(); ++i) + { + gc.BitBlt(iBubblesPos[i].iTl,iBubblesArea[i]); + } + #else + gc.BitBlt(aRect.iTl,iBitmap,aRect); + #endif } void CPenUiWndCtrl::RefreshUI() @@ -133,6 +151,152 @@ } +void CPenUiWndCtrl::Clean() + { + iCursorBmp = NULL; + iBubblesArea.Reset(); + iBubblesPos.Reset(); + iBubblesMaskArea.Close(); + iPopRegion.Close(); + iChangedBmp= NULL; + iBackground = EFalse; + iNotUpdating = EFalse; + } + +CCursorWindow::CCursorWindow(CPenUiWndCtrl* aParent) + :iParent(aParent) + { + } + +void CCursorWindow::SetCursorVisible(TBool aFlag) + { + iCursorVisible = aFlag; + DrawNow(); + } +void CCursorWindow::Draw(const TRect &aRect ) const + { + if(!iCursorVisible) + return; + + CWindowGc& gc = SystemGc(); + iParent->DrawCursor(gc); + } + +void CPenUiWndCtrl::DrawCursor(CWindowGc& aGc) const + { + aGc.SetPenColor(KRgbBlack); + aGc.SetBrushStyle(CGraphicsContext::ESolidBrush); + aGc.SetBrushColor(KRgbBlack); + aGc.SetDrawMode(CGraphicsContext::EDrawModeNOTSCREEN); + aGc.SetPenStyle(CGraphicsContext::ESolidPen); + aGc.SetPenSize( TSize(1,1)); + + TRect drawRect = iCursorRect; + if(!iPopRegion.IsEmpty() && iPopRegion.Intersects(iCursorRect)) + { + RRegion r; + r.AddRect(iCursorRect); + const TRect* rl = iPopRegion.RectangleList(); + + for(TInt i = 0 ; i < iPopRegion.Count(); ++i) + { + drawRect = iCursorRect; + drawRect.Intersection(rl[i]); + if(!drawRect.IsEmpty()) + r.SubRect(drawRect); + } + + for(TInt ii = 0; ii < r.Count(); ++ii) + { + aGc.DrawRect(r.RectangleList()[ii]); + } + r.Close(); + } + else + aGc.DrawRect(iCursorRect); + + // restore normal draw mode + aGc.SetDrawMode(CGraphicsContext::EDrawModePEN); + aGc.SetBrushStyle(CGraphicsContext::ENullBrush); + + } +void CPenUiWndCtrl::UpdateCursor(TBool aOnFlag,const CFbsBitmap* aCursorBmp,const TRect& aRect) + { + if(iNotUpdating || !IsReadyToDraw()) + { + //some times when layout is diabled, the cursor is still change its pos, and draw to the last place + //when layout enabled. So we set the cursor invisible, and wait for next cursor updating event. + iCursorWnd->SetCursorVisible(EFalse); + return; + } + + iCursorBmp = const_cast(aCursorBmp); + iCursorPos = aRect.iTl; + + if(iCursorRect != aRect) + { + iCursorRect = aRect; + iCursorWnd->SetRect(iCursorRect); + } + iCursorWnd->SetCursorVisible(aOnFlag); + } + +void CPenUiWndCtrl::UpdateBubble(const CFbsBitmap* aBmp,const CFbsBitmap* aMask, + const TRect& aPos,TBool aFlag) + { + TInt idx = iBubblesArea.Find(aBmp); + + if(aFlag) + { + if(KErrNotFound == idx) + { + iBubblesArea.Append(aBmp); + iBubblesMaskArea.Append(aMask); + iBubblesPos.Append(aPos); + } + else + { + iBubblesPos[idx] = aPos; + } + + } + else + { + //remove + if(idx != KErrNotFound) + { + iBubblesArea.Remove(idx); + iBubblesMaskArea.Remove(idx); + iBubblesPos.Remove(idx); + } + } + Invalidate(Rect(), ETrue); + } +void CPenUiWndCtrl::UpdateICFArea(const CFbsBitmap* aBmp,const TPoint& aPos) + { + iICFBmp = const_cast(aBmp); + iIcfPos = aPos; + Invalidate(Rect(), ETrue); + } +void CPenUiWndCtrl::UpdateChangedArea(const CFbsBitmap* aBmp,const TRect& aPos,TBool aFlag) + { + UpdateBubble(aBmp,0,aPos,aFlag); + return; + + + } +void CPenUiWndCtrl::SetPopupArea(const TRect& aRect, TBool aFlag) + { + if(aFlag) //add pop area + { + iPopRegion.AddRect(aRect); + } + else + { + iPopRegion.SubRect(aRect); + } + } + TInt CPenUiWndCtrl::WndPriority() { return iPriority; @@ -232,6 +396,7 @@ void CPenUiWndCtrl::ClosePenUi(TBool aResChanging) { + iCursorBmp = NULL; if (aResChanging) { TRAP_IGNORE(iIncallBubble->SetIncallBubbleFlagsL( EAknStatusBubbleInputHide )); @@ -271,13 +436,10 @@ } #endif // RD_UI_TRANSITION_EFFECTS_POPUPS - //iResourceChange = EFalse; iShowPopup = EFalse; iWndGroup.SetOrdinalPosition( -1, ECoeWinPriorityNormal-1 ); DrawableWindow()->SetOrdinalPosition(-1, ECoeWinPriorityNormal-1 ); TRAP_IGNORE(iIncallBubble->SetIncallBubbleFlagsL( EAknStatusBubbleInputHide )); - //MakeVisible( EFalse ); - } @@ -465,6 +627,181 @@ iResourceChange = aResourceChange; } +void CPenUiWndCtrl::HandleNGASpecificSignal(TInt aEventType, const TDesC& aEventData) + { + switch(aEventType) + { + case ESignalPopupWndClosed: + { + ClosePopup(); + } + break; + case ESignalUpdateCursor : + { + struct SData + { + TBool onOff; + CFbsBitmap* bmp; + TRect rect; + } data; + + data = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + UpdateCursor(data.onOff,data.bmp,data.rect); + + } + break; + case ESignalPopupArea: + { + struct SData + { + TRect rr; + TBool flag; + } data; + + data = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + SetPopupArea(data.rr,data.flag); + } + break; + case ESignalUpdateICFArea: + { + struct SData + { + CFbsBitmap* bmp; + TPoint pos; + } data; + + data = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + UpdateICFArea(data.bmp,data.pos); + } + break; + case ESignalUpdateBubble: + { + struct SData + { + TBool flag; + TRect pos; + CFbsBitmap* bmp; + CFbsBitmap* mask; + } data; + data = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + UpdateBubble(data.bmp,data.mask,data.pos,data.flag); + } + break; + case ESignalUpdateChangedArea: + { + struct SData + { + TBool flag; + CFbsBitmap* bmp; + TRect pos; + } data; + data = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + UpdateChangedArea(data.bmp,data.pos,data.flag); + } + break; + case ESignalRegisterBkControl: + { + + struct SData + { + //TBool bChangeFrameId; + + TAknsItemID frameID; + TAknsItemID centerID; + RArray *subItems; + } data; + data = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + iSubItems = data.subItems; + iFrameID = data.frameID; + iCenterID = data.centerID; + iBackground = ETrue; + } + break; + case ESignalDisableUpdating: + { + iNotUpdating = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + } + break; + case ESignalDrawBackground: + { + struct SData + { + CFbsBitGc* gc; + CFbsBitmap* bmp; + TRect rect; + } data; + data = * (reinterpret_cast( const_cast( aEventData.Ptr() ))); + DrawBubbleAsBackground(data.gc,data.bmp,data.rect); + } + break; + default: + break; + } + + } + +void CPenUiWndCtrl::DrawBkground(CWindowGc& aGc,const TRect& aRect) const + { + + DrawFrame(aGc,aRect, iFrameID, iCenterID); + + for( TInt i = 0; i < (*iSubItems).Count(); i++ ) + { + if( (*iSubItems)[i].iIsShow ) + { + DrawFrame(aGc, (*iSubItems)[i].iRect, + (*iSubItems)[i].iFrameID, + (*iSubItems)[i].iCenterID ); + } + } + + } + +void CPenUiWndCtrl::DrawBubbleAsBackground(CFbsBitGc* aGc, CFbsBitmap* aBmp, const TRect& aRect) + { + for(TInt i = 0 ; i < iBubblesArea.Count(); ++i) + { + if(iBubblesArea[i] != aBmp) //not draw same bitmap + { + //gc.BitBlt(iBubblesPos[i],iBubblesArea[i]); + TRect r = aRect; + TRect rect2 = iBubblesPos[i]; + r.Intersection(rect2); + if(!r.IsEmpty()) + { + TRect src = r; + r.Move(TPoint(-aRect.iTl.iX,-aRect.iTl.iY)); + src.Move(TPoint(-rect2.iTl.iX,-rect2.iTl.iY)); + aGc->BitBlt(r.iTl, iBubblesArea[i], src); + } + } + } + + } + + +CCoeControl* CPenUiWndCtrl::ComponentControl(TInt) const + { + return iCursorWnd; + } +TInt CPenUiWndCtrl::CountComponentControls() const + { + return 1; + } + + +void CPenUiWndCtrl::DrawFrame(CWindowGc& aGc, const TRect& aRect,TAknsItemID aFrameID, + TAknsItemID aCenterID ) const + { + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + TRect innerRect = aRect; + innerRect.Shrink( 4, 4 ); + + AknsDrawUtils::DrawFrame( + skin, aGc, + aRect, innerRect, + aFrameID, aCenterID); + } void CPenUiWndCtrl::RestartRefreshTimer() { diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/bwins/peninputcommonctrlsU.DEF --- a/textinput/peninputcommonctrls/bwins/peninputcommonctrlsU.DEF Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonctrls/bwins/peninputcommonctrlsU.DEF Tue May 25 13:03:44 2010 +0300 @@ -347,3 +347,15 @@ ?CancelPointerDownL@CAknFepCtrlCommonButton@@UAEXXZ @ 346 NONAME ; void CAknFepCtrlCommonButton::CancelPointerDownL(void) ?SetHighlightCell@CFepCtrlDropdownList@@QAEXHHH@Z @ 347 NONAME ; void CFepCtrlDropdownList::SetHighlightCell(int, int, int) ?Hide@CFepCtrlDropdownList@@UAEXH@Z @ 348 NONAME ; void CFepCtrlDropdownList::Hide(int) + ?HandleResourceChange@CPeninputVkbCtrlExt@@MAEXH@Z @ 349 NONAME ; void CPeninputVkbCtrlExt::HandleResourceChange(int) + ?CancelPointerDownL@CAknFepCtrlLongPressButton@@MAEXXZ @ 350 NONAME ; void CAknFepCtrlLongPressButton::CancelPointerDownL(void) + ?HandlePointerLeave@CAknFepCtrlLongPressButton@@MAEXABVTPoint@@@Z @ 351 NONAME ; void CAknFepCtrlLongPressButton::HandlePointerLeave(class TPoint const &) + ?ConstructL@CAknFepCtrlLongPressButton@@IAEXXZ @ 352 NONAME ; void CAknFepCtrlLongPressButton::ConstructL(void) + ?HandlePointerDownEventL@CAknFepCtrlLongPressButton@@MAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 353 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlLongPressButton::HandlePointerDownEventL(class TPoint const &) + ??0CAknFepCtrlLongPressButton@@IAE@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 354 NONAME ; CAknFepCtrlLongPressButton::CAknFepCtrlLongPressButton(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) + ?NewLC@CAknFepCtrlLongPressButton@@SAPAV1@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 355 NONAME ; class CAknFepCtrlLongPressButton * CAknFepCtrlLongPressButton::NewLC(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) + ?HandlePointerUpEventL@CAknFepCtrlLongPressButton@@MAEPAVCFepUiBaseCtrl@@ABVTPoint@@@Z @ 356 NONAME ; class CFepUiBaseCtrl * CAknFepCtrlLongPressButton::HandlePointerUpEventL(class TPoint const &) + ?NewL@CAknFepCtrlLongPressButton@@SAPAV1@PAVCFepUiLayout@@HHHVTAknsItemID@@11@Z @ 357 NONAME ; class CAknFepCtrlLongPressButton * CAknFepCtrlLongPressButton::NewL(class CFepUiLayout *, int, int, int, class TAknsItemID, class TAknsItemID, class TAknsItemID) + ??1CAknFepCtrlLongPressButton@@UAE@XZ @ 358 NONAME ; CAknFepCtrlLongPressButton::~CAknFepCtrlLongPressButton(void) + ?HandleTimerOut@CAknFepCtrlLongPressButton@@UAEXPBVCAknFepTimer@@@Z @ 359 NONAME ; void CAknFepCtrlLongPressButton::HandleTimerOut(class CAknFepTimer const *) + ?CancelTimer@CAknFepCtrlLongPressButton@@QAEXXZ @ 360 NONAME ; void CAknFepCtrlLongPressButton::CancelTimer(void) diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF --- a/textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF Tue May 25 13:03:44 2010 +0300 @@ -473,4 +473,22 @@ _ZN20CFepCtrlDropdownList10ReDrawRectERK5TRect @ 472 NONAME _ZN23CAknFepCtrlCommonButton18CancelPointerDownLEv @ 473 NONAME _ZN20CFepCtrlDropdownList4HideEi @ 474 NONAME + _ZN19CPeninputVkbCtrlExt20HandleResourceChangeEi @ 475 NONAME + _ZN26CAknFepCtrlLongPressButton10ConstructLEv @ 476 NONAME + _ZN26CAknFepCtrlLongPressButton11CancelTimerEv @ 477 NONAME + _ZN26CAknFepCtrlLongPressButton14HandleTimerOutEPK12CAknFepTimer @ 478 NONAME + _ZN26CAknFepCtrlLongPressButton18CancelPointerDownLEv @ 479 NONAME + _ZN26CAknFepCtrlLongPressButton18HandlePointerLeaveERK6TPoint @ 480 NONAME + _ZN26CAknFepCtrlLongPressButton21HandlePointerUpEventLERK6TPoint @ 481 NONAME + _ZN26CAknFepCtrlLongPressButton23HandlePointerDownEventLERK6TPoint @ 482 NONAME + _ZN26CAknFepCtrlLongPressButton4NewLEP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 483 NONAME + _ZN26CAknFepCtrlLongPressButton5NewLCEP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 484 NONAME + _ZN26CAknFepCtrlLongPressButtonC1EP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 485 NONAME + _ZN26CAknFepCtrlLongPressButtonC2EP12CFepUiLayoutiii11TAknsItemIDS2_S2_ @ 486 NONAME + _ZN26CAknFepCtrlLongPressButtonD0Ev @ 487 NONAME + _ZN26CAknFepCtrlLongPressButtonD1Ev @ 488 NONAME + _ZN26CAknFepCtrlLongPressButtonD2Ev @ 489 NONAME + _ZTI26CAknFepCtrlLongPressButton @ 490 NONAME + _ZTV26CAknFepCtrlLongPressButton @ 491 NONAME + _ZThn804_N26CAknFepCtrlLongPressButton14HandleTimerOutEPK12CAknFepTimer @ 492 NONAME diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/group/bld.inf --- a/textinput/peninputcommonctrls/group/bld.inf Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonctrls/group/bld.inf Tue May 25 13:03:44 2010 +0300 @@ -43,6 +43,7 @@ ../inc/peninputbuttons/peninputrawkeybutton.inl |../../../inc/peninputrawkeybutton.inl ../inc/peninputbuttons/peninputcommonbutton.h |../../../inc/peninputcommonbutton.h ../inc/peninputbuttons/peninputmultiimagebutton.h |../../../inc/peninputmultiimagebutton.h +../inc/peninputbuttons/peninputlongpressbutton.h |../../../inc/peninputlongpressbutton.h // From peninputbasewindow ../inc/peninputbasewindow/peninputbasewindow.h |../../../inc/peninputbasewindow.h diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/inc/peninputbuttons/peninputlongpressbutton.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/textinput/peninputcommonctrls/inc/peninputbuttons/peninputlongpressbutton.h Tue May 25 13:03:44 2010 +0300 @@ -0,0 +1,192 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0"" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface of normal button and multidisplay button +* +*/ + + +#ifndef C_CAKNFEPCTRLLONGPRESSBUTTON_H +#define C_CAKNFEPCTRLLONGPRESSBUTTON_H + +// system includes +#include +#include +#include +#include + +// forward declarations +class TResourceReader; + +/** + * CAknFepCtrlLongPressButton + * + * @lib fepcommonctrls.lib + * @since S60 v3.2 + */ +class CAknFepCtrlLongPressButton: public CAknFepCtrlEventButton, public MAknFepTimerHandler +{ +public: + + /** + * Symbian constructor. + * + * @since S60 v3.2 + * @param aUiLayout The layout + * @param aControlId The control id + * @param aEvent An event to be sent + * @param aUnicode A Unicode value to be sent + * @return Pointer to created CAknFepCtrlLongPressButton object + */ + IMPORT_C static CAknFepCtrlLongPressButton* NewL(CFepUiLayout* aUiLayout, + TInt aControlId, + TInt aEvent = 0xFFFF, + TInt aUnicode = 0, + TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, + TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, + TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); + + /** + * Symbian constructor. + * + * @since S60 v3.2 + * @param aUiLayout The layout + * @param aControlId The control id + * @param aEvent An event to be sent + * @param aUnicode A Unicode value to be sent + * @return Pointer to created CAknFepCtrlLongPressButton object + */ + IMPORT_C static CAknFepCtrlLongPressButton* NewLC(CFepUiLayout* aUiLayout, + TInt aControlId, + TInt aEvent = 0xFFFF, + TInt aUnicode = 0, + TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, + TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, + TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); + /** + * destructor. + * + * @since S60 v3.2 + * @return None + */ + IMPORT_C virtual ~CAknFepCtrlLongPressButton(); + + /** + * Cancel long press timer + * + * @since S60 v3.2 + * @return None + */ + IMPORT_C void CancelTimer(); + +// from base class MAknFepHwrTimerHandler + + /** + * from MAknFepHwrTimerHandler + * HandleTimerOut. Handling time out event + * + * @since S60 v3.2 + * @param aTimer The timer which sending the request + * @return None + */ + IMPORT_C void HandleTimerOut(const CAknFepTimer* aTimer); + +protected: + + /** + * C++ constructor. + * + * @since S60 v3.2 + * @param aUiLayout Ui Layout who contains this control + * @param aCtrlId Control Id + * @param aEvent An event to be sent + * @param aUnicode A Unicode value to be sent + * @return None + */ + IMPORT_C CAknFepCtrlLongPressButton(CFepUiLayout* aUiLayout, + TInt aCtrlId, + TInt aEvent, + TInt aUnicode, + TAknsItemID aNormalID = KAknsIIDQsnFrFunctionButtonNormal, + TAknsItemID aPressedID = KAknsIIDQsnFrFunctionButtonPressed, + TAknsItemID aInactiveID = KAknsIIDQsnFrFunctionButtonInactive); + +// from base class CButtonBase + + /** + * From CButtonBase + * Handle button down event. start long press timer + * + * @since S60 v3.2 + * @param aPt Point position + * @return The control who handles the event + */ + IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPt); + + /** + * From CButtonBase + * Handle button up event. cancel the timer + * + * @since S60 v3.2 + * @param aPt Point position + * @return The control who handles the event + */ + IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPt); + + /** + * From CButtonBase + * Handle pointer leave event. + * + * @since S60 v3.2 + * @param aPoint current pointer position + * @return Nothing + */ + IMPORT_C void HandlePointerLeave(const TPoint& aPoint); + + /** + * From CButtonBase + * Cancel pointer down event. + * + * @since S60 v3.2 + * @param aPoint current pointer position + * @return Nothing + */ + IMPORT_C void CancelPointerDownL(); + + /** + * Symbian 2nd phase constructor. + */ + IMPORT_C void ConstructL(); + +private: + + /** + * interval of long press + */ + TTimeIntervalMicroSeconds32 iLongPressInterval; + + /** + * long press timer (Own) + */ + CAknFepTimer* iLongPressTimer; + + /** + * indicates whether long press has occurred + */ + TBool iIsLongPress; + +}; + +#endif // C_CAKNFEPCTRLLONGPRESSBUTTON_H + +// End Of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrlext.h --- a/textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrlext.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonctrls/inc/peninputvkbctrl/peninputvkbctrlext.h Tue May 25 13:03:44 2010 +0300 @@ -186,6 +186,8 @@ * The left top point */ TPoint iLeftTopPoint; +protected: + virtual IMPORT_C void HandleResourceChange(TInt aType); }; #endif // C_CPENINPUTVKBCTRLEXT_H diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp --- a/textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp Tue May 25 13:03:44 2010 +0300 @@ -35,6 +35,7 @@ #include #include #include +#include const TInt KInvalidBmp = -1 ; @@ -2454,6 +2455,10 @@ //PRINTF((_L("CAknFepCtrlRepeatButton::HandleButtonDown()\n"))); //PRINTF((_L("Set long press Timer\n"))); + if( IsDimmed() ) + { + return NULL; + } iLongPressTimer->SetTimer(iLongPressInterval); TInt unicode = Unicode(); TPtrC ptr = (TUint16*)(&unicode); @@ -4099,4 +4104,188 @@ iForground2BmpRect.Move( aOffset ); } +// --------------------------------------------------------- +// Constructor +// --------------------------------------------------------- +// +EXPORT_C CAknFepCtrlLongPressButton* CAknFepCtrlLongPressButton::NewLC(CFepUiLayout* aUiLayout, + TInt aCtrlId, + TInt aEvent, + TInt aUnicode, + TAknsItemID aNormalID, + TAknsItemID aPressedID, + TAknsItemID aInactiveID) + { + //PRINTF((_L("CAknFepCtrlLongPressButton::NewLC(), aCtrlId = %d\n"), aCtrlId)); + CAknFepCtrlLongPressButton *self = new(ELeave) CAknFepCtrlLongPressButton(aUiLayout, + aCtrlId, + aEvent, + aUnicode, + aNormalID, + aPressedID, + aInactiveID); + + CleanupStack::PushL(self); + self->ConstructL(); + + return self; + } + +// --------------------------------------------------------- +// Constructor +// --------------------------------------------------------- +// +EXPORT_C CAknFepCtrlLongPressButton* CAknFepCtrlLongPressButton::NewL(CFepUiLayout* aUiLayout, + TInt aCtrlId, + TInt aEvent, + TInt aUnicode, + TAknsItemID aNormalID, + TAknsItemID aPressedID, + TAknsItemID aInactiveID) + { + //PRINTF((_L("CAknFepCtrlLongPressButton::NewL(), aCtrlId = %d\n"), aCtrlId)); + CAknFepCtrlLongPressButton *self = NewLC(aUiLayout, aCtrlId, aEvent, aUnicode, + aNormalID, aPressedID, aInactiveID); + CleanupStack::Pop(self); + + return self; + } + +// --------------------------------------------------------- +// Destructor +// --------------------------------------------------------- +// +EXPORT_C CAknFepCtrlLongPressButton::~CAknFepCtrlLongPressButton() + { + //PRINTF((_L("CAknFepCtrlLongPressButton::~CAknFepCtrlLongPressButton()\n"))); + CancelTimer(); + + delete iLongPressTimer; + } + +// --------------------------------------------------------- +// Constructor +// --------------------------------------------------------- +// +EXPORT_C CAknFepCtrlLongPressButton::CAknFepCtrlLongPressButton(CFepUiLayout* aUiLayout, + TInt aCtrlId, + TInt aEvent, + TInt aUnicode, + TAknsItemID aNormalID, + TAknsItemID aPressedID, + TAknsItemID aInactiveID) + :CAknFepCtrlEventButton(aUiLayout, aCtrlId, aEvent, aUnicode, + aNormalID, + aPressedID, + aInactiveID) + { + iLongPressInterval = KLongPressInterval; + } + +// --------------------------------------------------------- +// Constructor +// --------------------------------------------------------- +// +EXPORT_C void CAknFepCtrlLongPressButton::ConstructL() + { + //PRINTF((_L("CAknFepCtrlLongPressButton::ConstructL()\n"))); + BaseConstructL(); + iIsLongPress = EFalse; + iLongPressTimer = CAknFepTimer::NewL(this); + } + +// --------------------------------------------------------- +// Time out event handler of long press timer +// --------------------------------------------------------- +// +EXPORT_C void CAknFepCtrlLongPressButton::HandleTimerOut(const CAknFepTimer* aTimer) + { + //PRINTF((_L("CAknFepCtrlLongPressButton::HandleTimerOut()--"))); + if (aTimer == iLongPressTimer) + { + iIsLongPress = ETrue; + CancelTimer(); + TInt unicode = Unicode(); + TPtrC ptr = (TUint16*)(&unicode); + ReportEvent(EPeninputLayoutEventMultiRangeLongPress, ptr); + } + } + +// --------------------------------------------------------- +// Handle button down start long press timer +// --------------------------------------------------------- +// +EXPORT_C CFepUiBaseCtrl* CAknFepCtrlLongPressButton::HandlePointerDownEventL(const TPoint& aPt) + { + //PRINTF((_L("CAknFepCtrlLongPressButton::HandleButtonDown()\n"))); + //PRINTF((_L("Set long press Timer\n"))); + if ( IsDimmed() ) + { + return; + } + + iLongPressTimer->SetTimer(iLongPressInterval); + + return CAknFepCtrlCommonButton::HandlePointerDownEventL(aPt); + } + +// --------------------------------------------------------- +// Handle button up cancel timer +// --------------------------------------------------------- +// +EXPORT_C CFepUiBaseCtrl* CAknFepCtrlLongPressButton::HandlePointerUpEventL(const TPoint& aPt) + { + //PRINTF((_L("CAknFepCtrlLongPressButton::HandleButtonUp()\n"))); + + if ( IsDimmed() ) + { + return; + } + + CancelTimer(); + + if (!iIsLongPress) + { + TInt unicode = Unicode(); + TPtrC ptr = (TUint16*)(&unicode); + ReportEvent(EPeninputLayoutEventMultiRange, ptr); + } + + iIsLongPress = EFalse; + + + return CAknFepCtrlCommonButton::HandlePointerUpEventL(aPt); + } + +// --------------------------------------------------------- +// Handle pointer leave event cancel timer +// --------------------------------------------------------- +// +EXPORT_C void CAknFepCtrlLongPressButton::HandlePointerLeave(const TPoint& aPoint) + { + CAknFepCtrlCommonButton::HandlePointerLeave(aPoint); + + CancelTimer(); + } + +// --------------------------------------------------------------------------- +// CAknFepCtrlLongPressButton::CancelPointerDownL +// Cancel pointer down event +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +EXPORT_C void CAknFepCtrlLongPressButton::CancelPointerDownL() + { + // No implementation needed + } + +// --------------------------------------------------------- +// Cancel timer +// --------------------------------------------------------- +// +EXPORT_C void CAknFepCtrlLongPressButton::CancelTimer() + { + //PRINTF((_L("CAknFepCtrlLongPressButton::CancelTimer()\n"))); + iLongPressTimer->Cancel(); + } // End Of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp --- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp Tue May 25 13:03:44 2010 +0300 @@ -489,8 +489,17 @@ gc->SetPenSize(PenSize()); TBuf buf; - AknBidiTextUtils::ConvertToVisualAndClip(item->iText, buf, *iFont, - itemRect.Width(), itemRect.Width()); + if ( iAlign == CGraphicsContext::ERight ) + { + AknBidiTextUtils::ConvertToVisualAndClip(item->iText, buf, *iFont, + itemRect.Width(), itemRect.Width(), + AknBidiTextUtils::ERightToLeft ); + } + else + { + AknBidiTextUtils::ConvertToVisualAndClip(item->iText, buf, *iFont, + itemRect.Width(), itemRect.Width()); + } gc->DrawText(buf, itemRect, baseLine, iAlign); gc->DiscardFont(); } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp --- a/textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp Tue May 25 13:03:44 2010 +0300 @@ -392,3 +392,8 @@ } CleanupStack::PopAndDestroy( 1 ); } + +EXPORT_C void CPeninputVkbCtrlExt::HandleResourceChange(TInt aType) + { + CVirtualKeyboard::HandleResourceChange(aType); + } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h --- a/textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputcommonlayout/inc/peninputcommonlayoutglobalenum.h Tue May 25 13:03:44 2010 +0300 @@ -71,6 +71,7 @@ EPeninputLayoutEventRightArrow, EPeninputLayoutEventMultiRange, + EPeninputLayoutEventMultiRangeLongPress, EPeninputLayoutEventLast = 2000 // user event starts from here, same as base control }; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwr/data/peninputfingerhwrcn.rss --- a/textinput/peninputfingerhwr/data/peninputfingerhwrcn.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwr/data/peninputfingerhwrcn.rss Tue May 25 13:03:44 2010 +0300 @@ -251,7 +251,7 @@ colormajorskinid=EAknsMajorSkin; textcolorgrp=EAknsMinorQsnTextColors; - textcoloridx=59; + textcoloridx=64; bordercolormajorskinid=EAknsMajorSkin; bordercolorgrp=EAknsMinorQsnOtherColors; @@ -315,7 +315,7 @@ colormajorskinid=EAknsMajorSkin; textcolorgrp=EAknsMinorQsnTextColors; - textcoloridx=59; + textcoloridx=64; bordercolormajorskinid=EAknsMajorSkin; bordercolorgrp=EAknsMinorQsnOtherColors; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwr/src/peninputfingerhwrlayout.cpp --- a/textinput/peninputfingerhwr/src/peninputfingerhwrlayout.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwr/src/peninputfingerhwrlayout.cpp Tue May 25 13:03:44 2010 +0300 @@ -1035,13 +1035,6 @@ // The default candidate cell is not highlight iDataStore->SetHighlight(EFalse); - - iHwrWnd->UpdateLayout(EFalse); - - // Show two empty dropdown list - iHwrWnd->CandidateList()->ResetAndClear(); - iHwrWnd->PredictiveList()->ResetAndClear(); - #else if(iDataStore->PrimaryRange() == ERangeEnglish) { @@ -1052,18 +1045,6 @@ // The default candidate cell is not highlight iDataStore->SetHighlight(EFalse); - iHwrWnd->UpdateLayout(EFalse); - - // Show empty upper row in Native range - // Show fix English Symbol in English range - if(iDataStore->PrimaryRange() != ERangeEnglish) - { - iHwrWnd->CandidateList()->ResetAndClear(); - } - - // Show empty lower row - iHwrWnd->PredictiveList()->ResetAndClear(); - #endif } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwr/src/peninputfingerhwrrangeselector.cpp --- a/textinput/peninputfingerhwr/src/peninputfingerhwrrangeselector.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwr/src/peninputfingerhwrrangeselector.cpp Tue May 25 13:03:44 2010 +0300 @@ -111,7 +111,7 @@ CapturePointer( EFalse ); iPopupVisible = EFalse; - RootControl()->Draw(); + UpdateArea( extendRect, EFalse ); } @@ -183,11 +183,6 @@ CFepUiBaseCtrl* CPeninputFingerHwrRangeSelector::HandlePointerDownEventL( const TPoint& aPoint ) { - // Cancel all highlighted button, when pressing down - iRangeChBtn->SetHighlight( EFalse ); - iRangeEnBtn->SetHighlight( EFalse ); - iRangeNumBtn->SetHighlight( EFalse ); - CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerDownEventL( aPoint ); if ( !ctrl ) @@ -208,16 +203,26 @@ CFepUiBaseCtrl* CPeninputFingerHwrRangeSelector::HandlePointerUpEventL( const TPoint& aPoint ) { + if(IsPopup()) + { + if(iCurRangeActive) + { + if(iCurRange == EFingerHwrNativeRange) + { + iRangeChBtn->SetHighlight(EFalse); + } + else if(iCurRange == EFingerHwrEnglishRange) + { + iRangeEnBtn->SetHighlight(EFalse); + } + else + { + iRangeNumBtn->SetHighlight(EFalse); + } + } + } CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerUpEventL( aPoint ); - // When upCtrl does not equal to down ctrl, restore the highlight button state. - if (ctrl != iCtrlWithPointerDown) - { - iRangeChBtn->SetHighlight( iCurRange == EFingerHwrNativeRange ); - iRangeEnBtn->SetHighlight( iCurRange == EFingerHwrEnglishRange ); - iRangeNumBtn->SetHighlight( iCurRange == EFingerHwrNumberRange ); - } - iRangeChBtn->CancelPointerDownL(); iRangeEnBtn->CancelPointerDownL(); iRangeNumBtn->CancelPointerDownL(); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp --- a/textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp Tue May 25 13:03:44 2010 +0300 @@ -1781,6 +1781,9 @@ { rect = iLafManager->CtrlRect( iVirtualNumpad->ControlId() ); iVirtualNumpad->SetRect( rect ); + + TAknTextLineLayout txtlayout = iLafManager->NumpadKeyTxtLayout(); + iVirtualNumpad->SetTextLineLayout( txtlayout ); const RPointerArray& keys = iVirtualNumpad->KeyArray(); RArray rects; @@ -1802,6 +1805,9 @@ rect = iLafManager->CtrlRect( iVirtualSctpad->ControlId() ); iVirtualSctpad->SetRect( rect ); + TAknTextLineLayout txtlayout = iLafManager->SctpadKeyTxtLayout(); + iVirtualSctpad->SetTextLineLayout( txtlayout ); + const RPointerArray& keys = iVirtualSctpad->KeyArray(); RArray rects; iLafManager->GetVirtualKeyRects( rects ); @@ -1821,6 +1827,9 @@ { rect = iLafManager->CtrlRect( iVirtualSctpadFix->ControlId() ); iVirtualSctpadFix->SetRect( rect ); + + TAknTextLineLayout txtlayout = iLafManager->FixSctpadKeyTxtLayout(); + iVirtualSctpadFix->SetTextLineLayout( txtlayout ); const RPointerArray& keys = iVirtualSctpadFix->KeyArray(); RArray rects; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss --- a/textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/data/peninputfingerhwrarwnd.rss Tue May 25 13:03:44 2010 +0300 @@ -446,20 +446,20 @@ imgmajorskinid=EAknsMajorGeneric; - nactive=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter; - nactivemsk=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter_mask; + nactive=EMbmPeninputfingerhwrarQgn_indi_input_enter; + nactivemsk=EMbmPeninputfingerhwrarQgn_indi_input_enter_mask; - nactivep=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter; - nactivepmsk=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter_mask; + nactivep=EMbmPeninputfingerhwrarQgn_indi_input_enter; + nactivepmsk=EMbmPeninputfingerhwrarQgn_indi_input_enter_mask; - active=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter; - activemsk=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter_mask; + active=EMbmPeninputfingerhwrarQgn_indi_input_enter; + activemsk=EMbmPeninputfingerhwrarQgn_indi_input_enter_mask; - activep=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter; - activepmsk=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter_mask; + activep=EMbmPeninputfingerhwrarQgn_indi_input_enter; + activepmsk=EMbmPeninputfingerhwrarQgn_indi_input_enter_mask; - disable=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter; - disablemsk=EMbmPeninputfingerhwrarQgn_indi_input_arabic_enter_mask; + disable=EMbmPeninputfingerhwrarQgn_indi_input_enter; + disablemsk=EMbmPeninputfingerhwrarQgn_indi_input_enter_mask; } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_arabic_backspace.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_arabic_backspace.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - -]> - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_arabic_enter.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_arabic_enter.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - -]> - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_close.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_close.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - -]> - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_1_2.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_1_2.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - -]> - - - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_1_3.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_1_3.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_2_2.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_2_2.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_2_3.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_2_3.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - -]> - - - - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_3_3.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_page_3_3.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - -]> - - - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_symbol_table.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_symbol_table.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - - - -]> - - - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_writing_area.svg --- a/textinput/peninputfingerhwrar/data/qgn_indi_input_hwr_arabic_writing_area.svg Tue May 11 16:31:42 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/group/bld.inf --- a/textinput/peninputfingerhwrar/group/bld.inf Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/group/bld.inf Tue May 25 13:03:44 2010 +0300 @@ -21,17 +21,6 @@ PRJ_EXPORTS ../rom/peninputfingerhwrar_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH( peninputfingerhwrar_variant.iby ) -../data/qgn_indi_input_hwr_arabic_close.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_close.svg -../data/qgn_indi_input_hwr_arabic_page_1_2.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_page_1_2.svg -../data/qgn_indi_input_hwr_arabic_page_2_2.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_page_2_2.svg -../data/qgn_indi_input_hwr_arabic_page_1_3.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_page_1_3.svg -../data/qgn_indi_input_hwr_arabic_page_2_3.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_page_2_3.svg -../data/qgn_indi_input_hwr_arabic_page_3_3.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_page_3_3.svg -../data/qgn_indi_input_hwr_arabic_symbol_table.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_symbol_table.svg -../data/qgn_indi_input_hwr_arabic_writing_area.svg /epoc32/s60/icons/qgn_indi_input_hwr_arabic_writing_area.svg -../data/qgn_indi_input_arabic_backspace.svg /epoc32/s60/icons/qgn_indi_input_arabic_backspace.svg -../data/qgn_indi_input_arabic_enter.svg /epoc32/s60/icons/qgn_indi_input_arabic_enter.svg - PRJ_MMPFILES peninputfingerhwrar.mmp diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/group/iconlist.txt --- a/textinput/peninputfingerhwrar/group/iconlist.txt Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/group/iconlist.txt Tue May 25 13:03:44 2010 +0300 @@ -64,4 +64,4 @@ -c8,8 qgn_indi_input_hwr_arabic_symbol_table.svg -c8,8 qgn_indi_input_hwr_arabic_writing_area.svg -c8,8 qgn_indi_input_arabic_backspace.svg --c8,8 qgn_indi_input_arabic_enter.svg \ No newline at end of file +-c8,8 qgn_indi_input_enter.svg \ No newline at end of file diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp --- a/textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/group/peninputfingerhwrar.mmp Tue May 25 13:03:44 2010 +0300 @@ -42,6 +42,7 @@ SOURCE peninputfingerhwrarindicator.cpp SOURCE hbufcarrayar.cpp SOURCE peninputfingerhwrarwritingwnd.cpp +SOURCE peninputfingerhwrarnumsymboltable.cpp USERINCLUDE ../inc diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrar.hrh --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrar.hrh Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrar.hrh Tue May 25 13:03:44 2010 +0300 @@ -19,7 +19,7 @@ #ifndef PENINPUTFINGERHWRAR_HRH #define PENINPUTFINGERHWRAR_HRH -#include +#include /** * special scancode as virtual key mark. diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarcontrolid.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarcontrolid.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarcontrolid.h Tue May 25 13:03:44 2010 +0300 @@ -47,16 +47,16 @@ EHwrCtrlIdArrowLeft, EHwrCtrlIdArrowRight, - EHwrCtrlIdArrowUp, - EHwrCtrlIdArrowDown, + EHwrCtrlIdBtnEnter, + EHwrCtrlIdBtnSpace, - EHwrCtrlIdBtnEnter, - EHwrCtrlIdBtnSpace, EHwrCtrlId3Page1Btn, EHwrCtrlId3Page2Btn, EHwrCtrlId3Page3Btn, EHwrCtrlId2Page1Btn, - EHwrCtrlId2Page2Btn + EHwrCtrlId2Page2Btn, + EHwrCtrlIdNumSymbolTableVkb, + EHwrCtrlIdNumSymbolTableVkbGroup }; #endif //PENINPUTFINGERHWRARCONTROLID_H diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrardatastore.h Tue May 25 13:03:44 2010 +0300 @@ -23,10 +23,10 @@ #include #include #include -#include +#include //FEP INCLUDES -#include +#include #include @@ -311,22 +311,6 @@ */ TBool Highlight(); - /** - * Remove duplicate candidate from predictive candidate list - * - * @since Symbian TB9.2 - * @param aSrc The punctuation candidate list - * @param aTgt The predicative candidate list - * @param aSrcStartIdx - * @param aTgtStartIdx - * @return last overlap index - */ - TInt RemoveDuplicateCand(const RPointerArray& aSrc, - RPointerArray& aTgt, - TInt aSrcStartIdx, - TInt aTgtStartIdx); - - /** * Get top guide line from hwr engine * @@ -373,6 +357,24 @@ * @return ETrue if it is, EFalse otherwise */ TBool IsArabicNumber(TUint16 aChar); + + /** + * Check if it is in number only mode. + * + * @since s60 v5.2 + * @param None + * @return ETrue if it is, EFalse otherwise + */ + TBool IsNumberOnlyMode(); + + /** + * check if it is native number mode. + * + * @since s60 v5.2 + * @param None + * @return ETrue if it is, EFalse otherwise + */ + TBool IsNativeNumMode(); private: /** @@ -489,6 +491,11 @@ CRepository* iRepositoryFep; /** + * repository object. + */ + CRepository* iCommonEngineRepository; + + /** * The engine (Own); */ CPeninputFingerHwrArEngine* iHwrEngine; @@ -553,6 +560,11 @@ * First candidate type. */ TFirstCandidateType iFirstCandidateType; + + /** + * the number mode flag + */ + TBool iIsNativeNumMode; }; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarengine.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarengine.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarengine.h Tue May 25 13:03:44 2010 +0300 @@ -22,7 +22,7 @@ // INCLUDES #include #include -#include +#include class CPeninputFingerHwrArDataStore; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlafmanager.h Tue May 25 13:03:44 2010 +0300 @@ -182,6 +182,21 @@ TInt VirtualSctpadColCount(); /** + * get row count of virtual number sctpad. + * + * @since Symbian TB9.2 + * @return row count of virtual number sctpad. + */ + TInt VirtualNumSctpadRowCount(); + + /** + * get column count of virtual number sctpad. + * + * @since Symbian TB9.2 + * @return column count of virtual number sctpad. + */ + TInt VirtualNumSctpadColCount(); + /** * get cell size of virtual sctpad. * * @since Symbian TB9.2 @@ -199,6 +214,15 @@ void GetVirtualKeyRects( RArray& aArrayRects ); /** + * get cell rect of virtual sctpad. + * + * @since Symbian TB9.2 + * @param aArrayRects a TRect array to receive cell rect. + * @return none. + */ + void GetNumVirtualKeyRects( RArray& aArrayRects ); + + /** * get text layout of virtual sctpad. * * @since Symbian TB9.2 @@ -207,6 +231,14 @@ TAknTextLineLayout SctpadKeyTxtLayout(); /** + * get text layout of virtual numpad. + * + * @since Symbian TB9.2 + * @return a TAknTextLineLayout object to layout cell text. + */ + TAknTextLineLayout NumpadKeyTxtLayout(); + + /** * get preview bubble rect. * * @since Symbian TB9.2 @@ -323,6 +355,10 @@ * Get virtual key pad rect */ TRect GetVirtualKeyRect(); + /** + * Get virtual number key pad rect + */ + TRect GetVirtualNumKeyRect(); private: /** @@ -368,7 +404,12 @@ */ void RetrieveLafDataForSymbolTable(); - /** + /** + * Retrieve the laf data for symbol table + */ + void RetrieveLafDataForNumSymbolTable(); + + /** * Retrieve the landscape laf data for symbol table */ void RetrieveLandscapeLafDataForSymbolTable(); @@ -379,6 +420,16 @@ void RetrievePortraitLafDataForSymbolTable(); /** + * Retrieve the landscape laf data for number symbol table + */ + void RetrieveLandscapeLafDataForNumSymbolTable(); + + /** + * Retrieve the portrait laf data for number symbol table + */ + void RetrievePortraitLafDataForNumSymbolTable(); + + /** * Retrieve the laf data for HWR writing box */ void RetrieveLafDataForHwrBox(); @@ -402,8 +453,8 @@ TRect iRectWritingBox; TRect iRectNumpad; TRect iRectSctpad; - TRect iRectSpase; - TRect iRectEnter; + TRect iRectBtnSpace; + TRect iRectBtnEnter; TRect iIndicatorRect; /** @@ -418,6 +469,7 @@ TRect iRectBtnArrowDown; TRect iRectBtnOption; TRect iRectBtnSctPage; + TRect iRectBtnNumType; TSize iArrowPaddingSize; TSize iSizeBtnPadding; @@ -457,7 +509,13 @@ * virtual key rects array */ RArray iSCTrectArray; - + // Number symbol table laf data + TRect iRectOfNumSymbolTable; + TInt iNumSctpadRowCount; + TInt iNumSctpadColCount; + TSize iSizeNumSctpadCell; +// RArray iNumSymBtnRectArray; + RArray iNumSCTrectArray; /** * Preview bubble */ @@ -469,4 +527,4 @@ #endif // C_PENINPUTFINGERHWRARLAFMANAGER_H -// End Of File \ No newline at end of file +// End Of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarlayout.h Tue May 25 13:03:44 2010 +0300 @@ -30,6 +30,7 @@ class CPeninputFingerHwrArDataStore; class CRepository; class CPeninputFingerHwrArWnd; +class CPeninputFingerHwrArCallBack; // class DECLARATIONS @@ -155,7 +156,13 @@ * @return none */ void OnDeActivate(); - + void CallBackL(); + + /** + * Check if the First string will be allowed to submitted directly to editor without selection + */ + TBool IsAllowedToSubmitDefaultCandiate(); + public: //from MEventObserver; /** @@ -453,6 +460,21 @@ */ void ChangeCurStateToStandby(); + /** + * handler of NumMapping changed event. + * + * @since S60 5.0 + * @return none + */ + void OnNumMappingChangedL(); + /** + * revert special characters direction before sending to editor. + * + * @since S60 v5.2 + * @return none + */ + TBool RevertSymbolDirection(TInt aInChar, TInt & aOutChar); + private: /** @@ -489,12 +511,24 @@ */ CRepository* iRepositorySetting; + /** + * repository object. + */ +// CRepository* iCommonEngineRepository; + /** * Check if the stroke of drawing the character on the * HWR box is started */ TBool iIsStrokeOfDrawingCharacerStarted; + CPeninputFingerHwrArCallBack* iCallBack; + + /** + * Check if the editor is MFNE + */ + TBool iIsEditorMFNE; + /** * Last overlap index. */ diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarnumsymboltable.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarnumsymboltable.h Tue May 25 13:03:44 2010 +0300 @@ -0,0 +1,269 @@ +/* +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: header of number mode symbol table. +* +*/ + + +#ifndef C_PENINPUTARABICFINGERHWRNUMSYMBOLTABLE_H +#define C_PENINPUTARABICFINGERHWRNUMSYMBOLTABLE_H + +// INCLUDES +#include +#include +#include + +#include + +// FORWARD DECLARATIONS +class CAknFepCtrlEventButton; +class CVirtualKeyboard; + +// CLASS DECLARATION + +/** + * class CPeninputArabicFingerHwrNumSymbolTable. + * + * The symbol table control for arabic input + * + * @lib peninputfingerhwrar.lib + * @since Symbian TB9.2 + */ +class CPeninputArabicFingerHwrNumSymbolTable : public CControlGroup + { +public: + /** + * Symbian constructor + * + * @since Symbian TB9.2 + * @param aUiLayout The layout + * @param aId The control id + * @return pointer of created object. + */ + static CPeninputArabicFingerHwrNumSymbolTable* NewL( CFepUiLayout* aUiLayout, TInt aId ); + + /** + * Symbian constructor + * + * @since Symbian TB9.2 + * @param aUiLayout The layout + * @param aId The control id + * @return pointer of created object. + */ + static CPeninputArabicFingerHwrNumSymbolTable* NewLC( CFepUiLayout* aUiLayout, TInt aId ); + + /** + * standard c++ destructor. + * + * @since Symbian TB9.2 + */ + ~CPeninputArabicFingerHwrNumSymbolTable(); + +public: + /** + * open the symbol table. + * + * @since Symbian TB9.2 + * + * @return None + */ + void OpenSymbolTable(); + + /** + * cancel the popup. + * + * @since Symbian TB9.2 + * @return None + * + */ + void CloseSymbolTable(); + + /** + * get visibility of popup. + * @since Symbian TB9.2 + * @return ETrue if the popup is visible + */ + TBool IsPopup(); + + /** + * sizechanged + * + */ + void SizeChanged(const TRect aVirtualKeypadRect, const RArray aBtnRects, + const TInt aKeypadRow, const TInt aKeypadCol, TBool aIsLandscape = ETrue); + + /** + * Load VKB image + * + */ + void LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize); + + /** + * Load virutal Key and set key rects. + * + */ + void LoadVirtualKeypadKeyL(const TInt aResId, const RArray& aCellRects); + + /** + * Return keypad control + * + */ + inline CVirtualKeyboard* KeyPad(){return iNumKeypad;} + + /** + * Navigate page + * + */ + void UpdateNumSymbolTable(TInt aNumSctType = ENumSCTLatin); + + /** + * Construct from resource + * This funciton will be called when the resource has changed for example skin was changed + */ + void ConstructFromResourceL(); + + /** + * accept editor's number mapping restriction. + * + * @since S60 v5.0 + * @param aNumMapping a string contains numbers and related char. max length is 16. + * @return none + */ + void SetNumericMapping( const TDesC& aNumMapping ); + + /* + * set arabic number mode. + * @since s60 v5.2 + * @param aIsNativeNumMode a flag to indicate whether it is native number mode. + * @return none. + */ + void SetNativeNumMode(const TBool aIsNativeNumMode); +protected: //virtuals from CControlGroup (CFepUiBaseCtrl) + + /** + * From CControlGroup + * Handle pointer down event + * + * @since Symbian TB9.2 + * @param aPoint The point position relative the layout + * @return The control which handles the event. + */ + CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); + + /** + * From CControlGroup + * Handle pointer up event + * + * @since Symbian TB9.2 + * @param aPoint The point position relative the layout + * @return The control which handles the event. + */ + CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); + + /** + * From CControlGroup + * Handle pointer move event + * + * @since S60 54.0 + * @param aPoint The point position relative the layout + * @return The control which handles the event. + */ + CFepUiBaseCtrl* HandlePointerMoveEventL(const TPoint& aPoint); + + /** + * C++ constructor + * + * @since Symbian TB9.2 + * @param aFepUiLayout A Ui Layout environment (CFepUiLayout) + * @param aControlId Control id + * @return none. + */ + CPeninputArabicFingerHwrNumSymbolTable(CFepUiLayout* aFepUiLayout, TInt aControlId); + + /** + * Symbian second-phase constructor + * + * @since Symbian TB9.2 + * @return None + */ + void ConstructL(); + + /** + * create a virtual keypad + * + * @since Symbian TB9.2 + * @return None + */ + void CreateVirtualKeypadL(); + + /** + * create a new virtual key + * + */ + CVirtualKey* CreateVkbKeyL(TResourceReader& aReader, const TRect aKeyRect); + + /** + * update the virtal key + * + */ + void UpdateVkbKeyL( CVirtualKey* aVirtualKey, TResourceReader& aReader, + const TRect aKeyRect ); + void OnActivate(); + + /** + * Update the virtual key feedback + * + */ + void UpdateAllVirtualKeysFeedback(); + + /** + * Draw group control + */ + void Draw(); + + /** + * Load background from resource + * + */ + void LoadBackgroundFromResourceL(const TInt aResId); + + /* + * map latin number to arabic number. + */ + TInt16 MapLatinNumAccordingToNumMode(TInt16 aUnicode); +private: + /** + * multipage viritual keyboard + * not own. + */ + CVirtualKeyboard* iNumKeypad; + + /** + * visibility of popup list. + */ + TBool iPopupVisible; + + /** + * store the layout mode + */ + TBool iIsLandscape; + + TInt iCurrentNumSCTType; + /* + * Default number mode. + */ + TBool iIsNativeNumMode; + }; + +#endif // C_PENINPUTARABICFINGERHWRNUMSYMBOLTABLE_H diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarstoreconstants.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarstoreconstants.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarstoreconstants.h Tue May 25 13:03:44 2010 +0300 @@ -71,7 +71,12 @@ EPagePosLastPage, EPagePosFirstPage, }; - + +enum TNumSCTType + { + ENumSCTLatin, + ENumSCTArabic + }; // the default end mark const TInt KDefaultStrokeEndMarkX = -65536; const TInt KDefaultStrokeEndMarkY = -65536; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarsymboltable.h Tue May 25 13:03:44 2010 +0300 @@ -260,7 +260,7 @@ * */ void LoadBackgroundFromResourceL(const TInt aResId); - + private: /** * multipage viritual keyboard @@ -268,18 +268,6 @@ */ CMultiPageVirtualKeyboard* iMutiPageKeypad; - /** - * Enter button. - * not own. - */ - CAknFepCtrlEventButton* iEnterBtn; - - /** - * space button. - * not own. - */ - CAknFepCtrlEventButton* iSpaceBtn; - /** * Sct page 0 selction button control. * Not own. diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h --- a/textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/inc/peninputfingerhwrarwnd.h Tue May 25 13:03:44 2010 +0300 @@ -31,6 +31,7 @@ class CPeninputArabicFingerHwrSymbolTable; class CPeninputArabicFingerHwrIndicator; class CPeninputArabicFingerHwrWritingWnd; +class CPeninputArabicFingerHwrNumSymbolTable; /** * class CPeninputFingerHwrArWnd. @@ -240,7 +241,16 @@ * @return none */ void ShowSymbolPage( TInt aPageNo, TInt aPos ); - + /** + * accept editor's number mapping restriction. + * + * @since S60 v5.0 + * @param aNumMapping a string contains numbers and related char. max length is 16. + * @return none + */ + void SetNumericMapping( const TDesC& aNumMapping ); + + public: //child control access /** @@ -260,13 +270,13 @@ */ CFepCtrlDropdownList* CandidateList(); - /** - * retrieve the number candicate list control. - * - * @since Symbian TB9.2 - * @return pointer to candicate list - */ - CFepCtrlDropdownList* NumCandidateList(); +// /** +// * retrieve the number candicate list control. +// * +// * @since Symbian TB9.2 +// * @return pointer to candicate list +// */ +// CFepCtrlDropdownList* NumCandidateList(); /** * dim arrow buttons @@ -327,7 +337,8 @@ */ TBool IsSymbolTableShowingUp(); - /** + + /** * Check if the candidate list was opened up * * @since Symbian TB9.2 @@ -356,7 +367,21 @@ * Handle window open */ void HandleWindowOpenCommandL(); - + /* + * set arabic number mode. + * @since s60 v5.2 + * @param aIsNativeNumMode a flag to indicate whether it is native number mode. + * @return none. + */ + void SetNativeNumMode(const TBool aIsNativeNumMode); + + /* + * set icf language. + * @since s60 v5.2 + * @param aLang language id. + * @return none. + */ + void SetIcfLanguage( TInt aLang ); protected: /** @@ -395,13 +420,13 @@ * @return None */ void CreateCandidateListL(); - /** - * create number candidate lists. - * - * @since Symbian TB9.2 - * @return None - */ - void CreateNumCandidateListL(); +// /** +// * create number candidate lists. +// * +// * @since Symbian TB9.2 +// * @return None +// */ +// void CreateNumCandidateListL(); /** * create writing box. @@ -428,6 +453,14 @@ void CreateSymbolTableL(); /** + * create virtual number modesct pad. + * + * @since Symbian TB9.2 + * @return None + */ + void CreateNumSymbolTableL(); + + /** * EventButton creation helper. * * @since Symbian TB9.2 @@ -464,6 +497,16 @@ void LoadSymbolVirtualKeysL( const TInt aResId, const RArray& aCellRects ); /** + * load virtual number mode sct keys. + * + * @since Symbian TB9.2 + * @param aResId resource id. + * @param aCellRects rects of virtual keys. + * @return None + */ + void LoadNumSymbolVirtualKeysL( const TInt aResId, const RArray& aCellRects ); + + /** * relayout full ui, reset all controls position. * * @since Symbian TB9.2 @@ -550,7 +593,7 @@ * @return None */ void DrawGuideLine(); - + private: // datas /** @@ -568,11 +611,6 @@ /** - * number Candidate list control. - * Not own. - */ - CFepCtrlDropdownList* iNumCandidateList; - /** * Writing box control. * Not own. */ @@ -630,12 +668,28 @@ * Not own. */ CAknFepCtrlEventButton* iSymbolTableBtn; + /** + * enter button control. + * Not own. + */ + CAknFepCtrlEventButton* iEnterBtn; + /** + * space button control. + * Not own. + */ + CAknFepCtrlEventButton* iSpaceBtn; /** * Symbol table control. * Not own. */ CPeninputArabicFingerHwrSymbolTable* iSymbolTable; + + /** + * Number mode Symbol table control. + * Not own. + */ + CPeninputArabicFingerHwrNumSymbolTable* iNumSymbolTable; /** * L&F manager. diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/rom/peninputfingerhwrar_variant.iby --- a/textinput/peninputfingerhwrar/rom/peninputfingerhwrar_variant.iby Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/rom/peninputfingerhwrar_variant.iby Tue May 25 13:03:44 2010 +0300 @@ -24,7 +24,7 @@ #ifdef __PEN_SUPPORT #ifdef FF_CAPACITIVE_DISPLAY -#ifdef __HANDWRITING_RECOGNITION_INPUT +#ifdef FF_ARABIC_HANDWRITING_RECOGNITION_INPUT data = DATAZ_\RESOURCE_FILES_DIR\peninputfingerhwrarwnd.rsc RESOURCE_FILES_DIR\peninputfingerhwrarwnd.rsc @@ -33,7 +33,7 @@ ECOM_PLUGIN(peninputfingerhwrar.dll, peninputfingerhwrar.rsc) -#endif //__HANDWRITING_RECOGNITION_INPUT +#endif //FF_ARABIC_HANDWRITING_RECOGNITION_INPUT #endif //FF_CAPACITIVE_DISPLAY #endif // __PEN_SUPPORT diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrardatastore.cpp Tue May 25 13:03:44 2010 +0300 @@ -18,11 +18,12 @@ //SYSTEM INCLUDE #include #include +#include //FEP INCLUDE #include -#include -#include +#include +#include //USER INCLUDE #include "peninputfingerhwrarlayout.h" @@ -70,6 +71,7 @@ iKeyMappingStringList.Close(); delete iRepositoryFep; + delete iCommonEngineRepository; // delete iTriggerStr; delete iHwrEngine; delete iUserDefinedResource; @@ -449,49 +451,17 @@ return iIsHighlightCell; } -// ----------------------------------------------------------------------------- -// CPeninputFingerHwrArDataStore::RemoveDuplicateCand -// ----------------------------------------------------------------------------- -// -TInt CPeninputFingerHwrArDataStore::RemoveDuplicateCand(const RPointerArray& aSrc, - RPointerArray& aTgt, - TInt aSrcStartIdx, - TInt aTgtStartIdx) - { - TInt lastOverlapIdx = KInvalidIndex; - - // on the assumption that if candidate overlap, - // it is overlap only once - TInt srccandcnt = aSrc.Count(); - - for (TInt i = aSrcStartIdx; i < srccandcnt; i++) - { - for (TInt j = aTgtStartIdx; j < aTgt.Count(); j++) - { - if (aTgt[j]->Compare(*(aSrc[i])) == 0) - { - lastOverlapIdx = i; - delete aTgt[j]; - aTgt.Remove(j); - j--; - break; - } - } - } - - return lastOverlapIdx; - } - // ---------------------------------------------------------------------------- // C++ constructor // ---------------------------------------------------------------------------- // CPeninputFingerHwrArDataStore::CPeninputFingerHwrArDataStore(CPeninputFingerHwrArLayout* aLayout) - :iLayout( aLayout ) + :iLanguage(ELangNone), + iCurrentNumberMode(EAknEditorStandardNumberModeKeymap), + iLayout( aLayout ), + iIsHighlightCell(ETrue), + iIsNativeNumMode(EFalse) { - iLanguage = ELangNone; - iCurrentNumberMode = EAknEditorStandardNumberModeKeymap; - iIsHighlightCell = ETrue; } // ---------------------------------------------------------------------------- @@ -511,6 +481,26 @@ //initialize the key mapping list InitKeyMappingListL(); + + // read number mode flag. + //create the repository for common engine. + iCommonEngineRepository = CRepository::NewL(KCRUidCommonEngineKeys); + TInt displayLang = 0; + iCommonEngineRepository->Get(KGSDisplayTxtLang,displayLang); + if( displayLang == ELangTest ) + { + displayLang = User::Language(); + } + if(displayLang == ELangArabic) + { + iIsNativeNumMode = ETrue; + } + else + { + iIsNativeNumMode = EFalse; + } + iRepositoryFep->Set(KAknFepDefaultArabicNumberMode,iIsNativeNumMode); + } // ---------------------------------------------------------------------------- @@ -701,12 +691,33 @@ // TBool CPeninputFingerHwrArDataStore::IsArabicNumber(TUint16 aChar) { - if(aChar >= 0x0661 && aChar <= 0x0669) + if(aChar >= 0x0660 && aChar <= 0x0669) { return ETrue; } return EFalse; } - + +// ---------------------------------------------------------------------------- +// CPeninputFingerHwrArDataStore::IsNumberOnlyMode +// ---------------------------------------------------------------------------- +// +TBool CPeninputFingerHwrArDataStore::IsNumberOnlyMode() + { + if(PrimaryRange() == ERangeNumber) + { + return ETrue; + } + return EFalse; + } + +// ---------------------------------------------------------------------------- +// CPeninputFingerHwrArDataStore::IsNativeNumMode +// ---------------------------------------------------------------------------- +// +TBool CPeninputFingerHwrArDataStore::IsNativeNumMode() + { + return iIsNativeNumMode; + } // End Of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarengine.cpp Tue May 25 13:03:44 2010 +0300 @@ -17,9 +17,9 @@ //FEP INCLUDES -#include +#include #include -#include +#include #include #include "ptidefs.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarindicator.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarindicator.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarindicator.cpp Tue May 25 13:03:44 2010 +0300 @@ -15,7 +15,7 @@ * */ -#include +#include #include #include "peninputfingerhwrarindicator.h" diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarlafmanager.cpp Tue May 25 13:03:44 2010 +0300 @@ -19,7 +19,7 @@ // INCLUDES #include #include -#include +#include #include "peninputfingerhwrarlafmanager.h" #include "peninputfingerhwrarcontrolid.h" @@ -32,6 +32,8 @@ const TInt KFuncButtonColNum = 4; const TInt KLandscapeVirtualKeypadRow = 4; const TInt KLandscapeVirtualKeypadCol = 6; +const TInt KLandscapeNumpadRow = 4; +const TInt KLandscapeNumpadCol = 4; // --------------------------------------------------------------------------- // Symbian Constructor @@ -81,6 +83,8 @@ { iSCTrectArray.Close(); iSymBtnRectArray.Close(); + iNumSCTrectArray.Close(); +// iNumSymBtnRectArray.Close(); } // --------------------------------------------------------------------------- @@ -268,7 +272,7 @@ { candRowPane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, row).LayoutLine(); candRowPaneRect.LayoutRect( rect, candRowPane ); - + for(TInt col = 0; col < KFuncButtonColNum; col++) { // cell pane @@ -288,14 +292,17 @@ iRectBtnOption = buttonRect[i++]; iRectBtnRangeSmb = buttonRect[i++]; iRectBtnBackspace = buttonRect[i++]; - iRectBtnArrowUp = buttonRect[i++]; - iRectBtnArrowDown = buttonRect[i++]; - iRectBtnArrowLeft = buttonRect[i++]; - iRectBtnArrowRight = buttonRect[i++]; + iRectBtnArrowLeft = buttonRect[i++]; + iRectBtnArrowRight = buttonRect[i++]; + iRectBtnSpace = buttonRect[i++]; + iRectBtnEnter = buttonRect[i++]; buttonRect.Close(); // padding size of Btn - iSizeBtnPadding = TSize(6, 6); + TInt xpad = iRectBtnOption.iTl.iX - iRectBtnClose.iBr.iX; + TInt ypad = iRectBtnArrowLeft.iTl.iY - iRectBtnClose.iBr.iY; + + iSizeBtnPadding = TSize(xpad, ypad); // padding size of arrow button if(iIsLandscape) @@ -345,6 +352,23 @@ } // --------------------------------------------------------------------------- +// CPeninputFingerHwrArLafManager::RetrieveLafDataForNumSymbolTable() +// Retrieve the laf data for number symbol table area +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArLafManager::RetrieveLafDataForNumSymbolTable() + { + if(iIsLandscape) + { + RetrieveLandscapeLafDataForNumSymbolTable(); + } + else + { + RetrievePortraitLafDataForNumSymbolTable(); + } + } + +// --------------------------------------------------------------------------- // CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForSymbolTable() // Retrieve the landscape laf data for symbol table area // --------------------------------------------------------------------------- @@ -363,53 +387,45 @@ candpaneRect.LayoutRect( iLayoutRect, candlistpane ); iRectOfSymbolTable = candpaneRect.Rect(); - // get candidate row1 pane + // get 1st row pane in button area TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 0).LayoutLine(); TAknLayoutRect candrow1paneRect; candrow1paneRect.LayoutRect( iRectOfSymbolTable, candRow1Pane ); iSymBtnRectArray.Reset(); - for(TInt i = 0; i < 2; i++) - { - // get candidate cell pane with row 0 and col i - TAknWindowLineLayout cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 0, i , 0 ). - LayoutLine(); - TAknLayoutRect cellPaneRect; - cellPaneRect.LayoutRect( candrow1paneRect.Rect(), cellPane ); + TAknWindowLineLayout cellPane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 5, 0, 0 ). + LayoutLine(); + TAknLayoutRect cellPaneRect; + cellPaneRect.LayoutRect( candrow1paneRect.Rect(), cellPane ); - // get the candidate cell bg pane with row 0 and col i - TAknWindowLineLayout candbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(1).LayoutLine(); - TAknLayoutRect BgRect; - BgRect.LayoutRect( cellPaneRect.Rect(), candbgpane ); - iSymBtnRectArray.Append(BgRect.Rect()); - } - - TInt xGap = iSymBtnRectArray[1].iTl.iX - iSymBtnRectArray[0].iBr.iX; - TRect thirdBtn(iSymBtnRectArray[1]); - thirdBtn.Move(TPoint(iSymBtnRectArray[1].Width(),0)); - iSymBtnRectArray.Append(thirdBtn); - - TAknWindowLineLayout rowPane, key1bgpane, keypane; - TAknLayoutRect rowRect, key1bgRect, keyRect; - + // get the candidate cell bg pane with row 0 and col i + TAknWindowLineLayout cellbgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(5).LayoutLine(); + TAknLayoutRect cellbgRect; + cellbgRect.LayoutRect( cellPaneRect.Rect(), cellbgpane ); + iSymBtnRectArray.Append(cellbgRect.Rect()); + //get 1st row pane in SCT area TAknWindowLineLayout row1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(1, 0, 1).LayoutLine(); TAknLayoutRect row1Rect; row1Rect.LayoutRect(iRectOfSymbolTable,row1Pane); iRectSctpad.iTl = row1Rect.Rect().iTl; - iRectSctpad.iBr = iRectOfSymbolTable.iBr; +// iRectSctpad.iBr = iRectOfSymbolTable.iBr; + + TAknWindowLineLayout key1bgpane, keypane; + TAknLayoutRect key1bgRect, keyRect; + - keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 0 , 0 ). + keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 0 , 0 ). LayoutLine(); keyRect.LayoutRect(row1Rect.Rect(), keypane); - key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine(); + key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine(); key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane); - keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 1 , 0 ). + keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 1 , 0 ). LayoutLine(); keyRect.LayoutRect(row1Rect.Rect(), keypane); - TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine(); + TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine(); TAknLayoutRect key2bgRect; key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane); @@ -417,10 +433,10 @@ TAknLayoutRect row2Rect; row2Rect.LayoutRect(iRectOfSymbolTable,row2Pane); - keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 3, 0 , 0 ).LayoutLine(); + keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 4, 0 , 0 ).LayoutLine(); keyRect.LayoutRect(row2Rect.Rect(), keypane); - TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(3).LayoutLine(); + TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(4).LayoutLine(); TAknLayoutRect key3bgRect; key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane); @@ -444,6 +460,9 @@ iSCTrectArray.Append(cursorRect); } } + iRectOfSymbolTable.iBr = cursorRect.iBr; + iRectSctpad.iBr = iRectOfSymbolTable.iBr; + } // --------------------------------------------------------------------------- @@ -519,6 +538,144 @@ } // --------------------------------------------------------------------------- +// CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForNumSymbolTable() +// Retrieve the landscape laf data for number symbol table area +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArLafManager::RetrieveLandscapeLafDataForNumSymbolTable() + { +// TAknLayoutScalableParameterLimits candiPaneVariety = AknLayoutScalable_Avkon::fshwr2_func_candi_pane_ParamLimits(2); + + iNumSctpadRowCount = KLandscapeNumpadRow; + iNumSctpadColCount = KLandscapeNumpadCol; + + // get the functional buttons laf data for symbol table + // candidate list + TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(2).LayoutLine(); + TAknLayoutRect candpaneRect; + candpaneRect.LayoutRect( iLayoutRect, candlistpane ); + iRectOfNumSymbolTable = candpaneRect.Rect(); + + // get candidate row1 pane + TAknWindowLineLayout candRow1Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(2, 0, 0).LayoutLine(); + TAknLayoutRect candrow1paneRect; + candrow1paneRect.LayoutRect( candpaneRect.Rect(), candRow1Pane ); + + TAknWindowLineLayout rowPane, key1bgpane, keypane; + TAknLayoutRect rowRect, key1bgRect, keyRect; + + iRectNumpad.iTl = candpaneRect.Rect().iTl; + + keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 0 , 0 ). + LayoutLine(); + keyRect.LayoutRect(candrow1paneRect.Rect(), keypane); + + key1bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine(); + key1bgRect.LayoutRect(keyRect.Rect(), key1bgpane); + + keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 1 , 0 ). + LayoutLine(); + keyRect.LayoutRect(candrow1paneRect.Rect(), keypane); + + TAknWindowLineLayout key2bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine(); + TAknLayoutRect key2bgRect; + key2bgRect.LayoutRect(keyRect.Rect(), key2bgpane); + + TAknWindowLineLayout row2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(2, 0, 1).LayoutLine(); + TAknLayoutRect row2Rect; + row2Rect.LayoutRect(candpaneRect.Rect(),row2Pane); + + keypane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_pane( 6, 1, 0 ).LayoutLine(); + keyRect.LayoutRect(row2Rect.Rect(), keypane); + + TAknWindowLineLayout key3bgpane = AknLayoutScalable_Avkon::fshwr2_func_candi_cell_bg_pane(6).LayoutLine(); + TAknLayoutRect key3bgRect; + key3bgRect.LayoutRect(keyRect.Rect(), key3bgpane); + + TInt keyHorizontalGap = key2bgRect.Rect().iTl.iX - key1bgRect.Rect().iBr.iX; + TInt keyVerticalGap = key3bgRect.Rect().iTl.iY - key1bgRect.Rect().iBr.iY; + + TRect cursorRect(key1bgRect.Rect()); + TRect originRect(key1bgRect.Rect()); + TInt rectHeight = cursorRect.Height(); + TInt rectWidth = cursorRect.Width(); + + iNumSCTrectArray.Reset(); + for(TInt i = 0; i < iNumSctpadRowCount; i++) + { + cursorRect = originRect; + cursorRect.Move(0,i*(rectHeight+keyVerticalGap)); + iNumSCTrectArray.Append(cursorRect); + for(TInt j = 1; j < iNumSctpadColCount; j++) + { + cursorRect.Move((rectWidth+keyHorizontalGap),0); + iNumSCTrectArray.Append(cursorRect); + } + } + + // calculate the symbol table rect + iRectOfNumSymbolTable.iBr = cursorRect.iBr; + iRectNumpad.iBr = iRectOfNumSymbolTable.iBr; + } + +// --------------------------------------------------------------------------- +// CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForNumSymbolTable() +// Retrieve the portrait laf data for number symbol table area +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArLafManager::RetrievePortraitLafDataForNumSymbolTable() + { + + // get the functional buttons laf data for number symbol table + // candidate list + TAknWindowLineLayout candlistpane = AknLayoutScalable_Avkon::fshwr2_func_candi_pane(1).LayoutLine(); + + TAknLayoutRect candpaneRect; + candpaneRect.LayoutRect( iLayoutRect, candlistpane ); + TRect rect = candpaneRect.Rect(); + + // get candidate row2 pane + TAknWindowLineLayout candRow2Pane = AknLayoutScalable_Avkon::fshwr2_func_candi_row_pane(0, 0, 1). + LayoutLine(); + TAknLayoutRect candrow2paneRect; + candrow2paneRect.LayoutRect( rect, candRow2Pane ); + iRectOfNumSymbolTable.iTl = candrow2paneRect.Rect().iTl; + + // get the virtual key rects + TAknWindowLineLayout writingBoxPane; + TAknLayoutRect boxRect; + writingBoxPane = AknLayoutScalable_Avkon::fshwr2_hwr_syb_pane(0).LayoutLine(); + boxRect.LayoutRect(iLayoutRect, writingBoxPane); + iRectNumpad = boxRect.Rect(); + + TAknWindowLineLayout keypane, keybgpane; + TAknLayoutRect keyRect, keybgRect; + + TAknLayoutScalableParameterLimits sctPaneVariety = + AknLayoutScalable_Avkon::cell_fshwr2_syb_pane_ParamLimits(0); + + iNumSctpadRowCount = sctPaneVariety.LastRow() + 1; + iNumSctpadColCount = sctPaneVariety.LastColumn() + 1; + + iNumSCTrectArray.Reset(); + for(TInt i = 0; i < iNumSctpadRowCount; i++) + { + for ( TInt j = 0; j < iNumSctpadColCount; j++ ) + { + keypane = AknLayoutScalable_Avkon::cell_fshwr2_syb_pane(0, j, i).LayoutLine(); + keyRect.LayoutRect(iRectNumpad, keypane); + keybgpane = AknLayoutScalable_Avkon::cell_fshwr2_syb_bg_pane(0).LayoutLine(); + keybgRect.LayoutRect(keyRect.Rect(), keybgpane); + iNumSCTrectArray.Append( keybgRect.Rect()); + } + } + iSizeNumSctpadCell = keybgRect.Rect().Size(); + + // calculate the symbol table rect + iRectOfNumSymbolTable.iBr = iRectNumpad.iBr; + } + +// --------------------------------------------------------------------------- // CPeninputFingerHwrArLafManager::RetrieveLafDataForPreviewBubble() // Retrieve the laf data for preview bubble // --------------------------------------------------------------------------- @@ -566,6 +723,9 @@ // retrieve the laf data of symbol table RetrieveLafDataForSymbolTable(); + // retrieve the laf data of number symbol table + RetrieveLafDataForNumSymbolTable(); + // retrieve the laf data of hwr box RetrieveLafDataForHwrBox(); #endif @@ -624,11 +784,11 @@ iSizeBtnPadding = TSize(6,6); iArrowPaddingSize = TSize(8,8); - iRectSpase = iRectBtnClose; - iRectSpase.Move(TPoint(0,buttonHight)); + iRectBtnSpace = iRectBtnClose; + iRectBtnSpace.Move(TPoint(0,buttonHight)); - iRectEnter = iRectSpase; - iRectEnter.Move(TPoint(buttonWidth,0)); + iRectBtnEnter = iRectBtnSpace; + iRectBtnEnter.Move(TPoint(buttonWidth,0)); // candate position iCandidateLTPos = iRectBtnClose.iTl + TPoint(0,buttonHight); @@ -814,6 +974,10 @@ { return iRectOfSymbolTable; } + case EHwrCtrlIdNumSymbolTableVkbGroup: + { + return iRectOfNumSymbolTable; + } case EHwrCtrlIdClose: { return iRectBtnClose; @@ -826,14 +990,6 @@ { return iRectBtnBackspace; } - case EHwrCtrlIdArrowUp: - { - return iRectBtnArrowUp; - } - case EHwrCtrlIdArrowDown: - { - return iRectBtnArrowDown; - } case EHwrCtrlIdArrowLeft: { return iRectBtnArrowLeft; @@ -842,6 +998,14 @@ { return iRectBtnArrowRight; } + case EHwrCtrlIdBtnEnter: + { + return iRectBtnEnter; + } + case EHwrCtrlIdBtnSpace: + { + return iRectBtnSpace; + } case EHwrCtrlIdLanguageOption: { return iRectBtnOption; @@ -853,7 +1017,7 @@ case EHwrCtrlId2Page2Btn: { return iRectBtnSctPage; - } + } } return TRect(); } @@ -960,6 +1124,24 @@ } // --------------------------------------------------------------------------- +// get row count of virtual number sctpad. +// --------------------------------------------------------------------------- +// +TInt CPeninputFingerHwrArLafManager::VirtualNumSctpadRowCount() + { + return iNumSctpadRowCount; + } + +// --------------------------------------------------------------------------- +// get column count of virtual number sctpad. +// --------------------------------------------------------------------------- +// +TInt CPeninputFingerHwrArLafManager::VirtualNumSctpadColCount() + { + return iNumSctpadColCount; + } + +// --------------------------------------------------------------------------- // get cell size of virtual sctpad. // --------------------------------------------------------------------------- // @@ -1022,13 +1204,58 @@ } // --------------------------------------------------------------------------- +// get cell rect of virtual sctpad. +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArLafManager::GetNumVirtualKeyRects( RArray& aArrayRects ) + { + aArrayRects.Reset(); + + for(TInt i = 0; i < iNumSCTrectArray.Count(); i++) + { + TRect absoluteRect = iNumSCTrectArray[i]; + absoluteRect.Move(-iRectNumpad.iTl.iX, -iRectNumpad.iTl.iY); + aArrayRects.Append(absoluteRect); + } + } + +// --------------------------------------------------------------------------- // get text layout of virtual sctpad. // --------------------------------------------------------------------------- // TAknTextLineLayout CPeninputFingerHwrArLafManager::SctpadKeyTxtLayout() { - TAknTextLineLayout layout = AknLayoutScalable_Avkon:: - cell_fshwr2_syb_bg_pane_t1(0).LayoutLine(); + TAknTextLineLayout layout; + if(iIsLandscape) + { + layout = AknLayoutScalable_Avkon:: + fshwr2_func_candi_cell_pane_t1(4).LayoutLine(); + } + else + { + layout = AknLayoutScalable_Avkon:: + cell_fshwr2_syb_bg_pane_t1(0).LayoutLine(); + } + return layout; + } + +// --------------------------------------------------------------------------- +// get text layout of virtual sctpad. +// --------------------------------------------------------------------------- +// +TAknTextLineLayout CPeninputFingerHwrArLafManager::NumpadKeyTxtLayout() + { + TAknTextLineLayout layout; + if(iIsLandscape) + { + layout = AknLayoutScalable_Avkon:: + fshwr2_func_candi_cell_pane_t1(6).LayoutLine(); + } + else + { + layout = AknLayoutScalable_Avkon:: + cell_fshwr2_syb_bg_pane_t1(0).LayoutLine(); + } return layout; } @@ -1105,6 +1332,15 @@ } // --------------------------------------------------------------------------- +// get rect for virtual number keypad +// --------------------------------------------------------------------------- +// +TRect CPeninputFingerHwrArLafManager::GetVirtualNumKeyRect() + { + return iRectNumpad; + } + +// --------------------------------------------------------------------------- // get rect for hwr indicator // --------------------------------------------------------------------------- // diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarlayout.cpp Tue May 25 13:03:44 2010 +0300 @@ -18,9 +18,9 @@ //SYSTEM INCLUDES #include #include - +#include //FEP Includes -#include +#include #include #include #include @@ -49,6 +49,46 @@ const TInt16 KEmotionKeyMark = 0xFFFE; +class CPeninputFingerHwrArCallBack : public CActive + { + friend class CPeninputFingerHwrArLayout; +public: + void IssueRequestL(); +private: + CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout); + void RunL(); + void DoCancel(); +private: + CPeninputFingerHwrArLayout* iHwrArLayout; + }; + +CPeninputFingerHwrArCallBack::CPeninputFingerHwrArCallBack(CPeninputFingerHwrArLayout* aHwrArLayout) + :CActive(EPriorityHigh) + { + CActiveScheduler::Add(this); + iHwrArLayout = aHwrArLayout; + } +void CPeninputFingerHwrArCallBack::IssueRequestL() + { + if(!IsActive()) + { + iStatus=KRequestPending; + SetActive(); + TRequestStatus *pS=(&iStatus); + + User::RequestComplete(pS,0); + } + } +void CPeninputFingerHwrArCallBack::RunL() + { + iHwrArLayout->CallBackL(); + } + +void CPeninputFingerHwrArCallBack::DoCancel() + { + + } + // ============================ MEMBER FUNCTIONS ============================= // --------------------------------------------------------------------------- @@ -87,7 +127,6 @@ //create the repository for gereral settings iRepositorySetting = CRepository::NewL( KCRUidPersonalizationSettings ); - //create the repository watcher for general settings iGSRepositoryWatcher = CAknFepRepositoryWatcher::NewL( KCRUidPersonalizationSettings, @@ -103,6 +142,8 @@ //retrieve the settings LoadAndPublishDefaultL(); + //iCallBack = new (ELeave) CPeninputFingerHwrArCallBack(this); + //set screen layout extent SetRect( TRect( TPoint( 0, 0 ), ScreenSize() ) ); } @@ -142,6 +183,7 @@ case ECmdPenInputEditorNumericKeyMap: { iDataStore->SetNumberMode( *(TAknEditorNumericKeymap*)aData ); + OnNumMappingChangedL(); } break; case ECmdPenInputEditorCustomNumericKeyMap: @@ -161,6 +203,10 @@ { TInt language = *( TInt* )aData; iDataStore->SetLanguageL( language ); + if(iHwrWnd) + { + iHwrWnd->SetIcfLanguage(language); + } } break; case ECmdPenInputPermittedCase: @@ -225,6 +271,12 @@ iHwrWnd->SetEnableSettingBtn(isEnableSetting); } break; + case ECmdPeninputArabicNumModeChanged: + { + TBool isArabicNativeNum = *aData; + iHwrWnd->SetNativeNumMode(isArabicNativeNum); + } + break; default: ret = KErrUnknown; break; @@ -276,14 +328,16 @@ // but ICF does not offer such API if(aData.iFlag & EFepICFDataDirectionMFNE ) { + iIsEditorMFNE = ETrue; return KErrNone; } - + + iIsEditorMFNE = EFalse; iDataStore->SetFirstCandidateType(ECandDefaultFirst); - if(iDataStore->PrimaryRange() == ERangeEnglish) - { - return KErrNone; - } +// if(iDataStore->PrimaryRange() == ERangeEnglish) +// { +// return KErrNone; +// } TUint16 charBeforeCursor = 0; if(iHwrWnd->GetCharBeforeCursor(aData.iCurSel.LowerPos()-1, charBeforeCursor)) @@ -461,7 +515,7 @@ // --------------------------------------------------------------------------- // void CPeninputFingerHwrArLayout::Replace( const TDesC& aOldCharCode, - const TDesC& aNewCharCode, const TBool aIsPart ) + const TDesC& aNewCharCode, const TBool aIsPart) { // user tries to correct the previous selection // Delete the previous character and append the new one @@ -573,7 +627,18 @@ iRepositorySetting->Get( KSettingsPenInputLang, newValue ); iDataStore->SetLanguageL( newValue ); - + +// TInt displayLang = 0; +// iCommonEngineRepository->Get(KGSDisplayTxtLang,displayLang); +// if(displayLang == ELangArabic) +// { +// iHwrWnd->SetNativeNumMode(ETrue); +// } +// else +// { +// iHwrWnd->SetNativeNumMode(EFalse); +// } + iHwrWnd->SetNativeNumMode(iDataStore->IsNativeNumMode()); } // --------------------------------------------------------------------------- @@ -609,6 +674,8 @@ delete iStateMgr; delete iGSRepositoryWatcher; delete iRepositorySetting; +// delete iCommonEngineRepository; + //delete iCallBack; } // --------------------------------------------------------------------------- @@ -706,7 +773,7 @@ } break; case EHwrCtrlIdBtnEnter: - { + { TBuf<1> bufEnter; bufEnter.Append( EKeyEnter ); SubmitStringToFep( bufEnter ); @@ -749,16 +816,6 @@ SignalOwner( ESignalKeyEvent, aData ); } break; - case EHwrCtrlIdArrowDown: - { - iHwrWnd->Icf()->HandleArrowBtnEventL( CFepLayoutMultiLineIcf::EArrowDown ); - } - break; - case EHwrCtrlIdArrowUp: - { - iHwrWnd->Icf()->HandleArrowBtnEventL( CFepLayoutMultiLineIcf::EArrowUp ); - } - break; default: break; } @@ -773,7 +830,11 @@ iHwrWnd->CancelWriting(); if (iHwrWnd->IsCandidateShowup()) { - // goto standby and clear screen + // goto standby and clear screen + if(IsAllowedToSubmitDefaultCandiate()) + { + SignalOwner( ESignalDeleteLastInput, KNullDesC ); + } ChangeCurStateToStandby(); } else @@ -818,8 +879,19 @@ else { TBuf<1> bufBck; - bufBck.Append( keydata->iScanCode ); - SignalOwner( ESignalKeyEvent, bufBck ); + TInt convertedCode; + TBool converted = EFalse; + converted = RevertSymbolDirection(keydata->iScanCode,convertedCode); + bufBck.Append(convertedCode); +// bufBck.Append(keydata->iScanCode); + if(converted) + { + SignalOwner(ESignalArabicSCTChar,bufBck); + } + else + { + SignalOwner( ESignalKeyEvent, bufBck ); + } } // close the symbol table @@ -860,6 +932,7 @@ // void CPeninputFingerHwrArLayout::OnHwrStrokeStartedL() { + //iCallBack->IssueRequestL(); iHwrWnd->HideIndicator(); // The default candidate cell is not highlight @@ -877,6 +950,25 @@ iStateMgr->HandleEventL( EEventHwrStrokeStarted, KNullDesC ); } +void CPeninputFingerHwrArLayout::CallBackL() + { + iHwrWnd->HideIndicator(); + + // The default candidate cell is not highlight + iDataStore->SetHighlight(EFalse); + + // close the candidate list if it's currently showing up + if(iHwrWnd->IsCandidateShowup()) + { + iHwrWnd->CloseCandidateList(); + } + + // remember the start writing position. + iIsStrokeOfDrawingCharacerStarted = ETrue; + + iStateMgr->HandleEventL( EEventHwrStrokeStarted, KNullDesC ); + } + // --------------------------------------------------------------------------- // handler of StrokeFinished event. // --------------------------------------------------------------------------- @@ -908,6 +1000,15 @@ // --------------------------------------------------------------------------- // get value from repository. // --------------------------------------------------------------------------- +// +TBool CPeninputFingerHwrArLayout::IsAllowedToSubmitDefaultCandiate() + { + return (!iIsEditorMFNE); + } + +// --------------------------------------------------------------------------- +// get value from repository. +// --------------------------------------------------------------------------- // TInt CPeninputFingerHwrArLayout::GetNewValue( CAknFepRepositoryWatcher* aWatcher, const TInt aId ) @@ -1033,5 +1134,73 @@ // set the state to be standby iStateMgr->SetState( CPeninputFingerHwrArStateManagerBase::EStateStandBy ); } +// --------------------------------------------------------------------------- +// handler of NumMapping changed event. +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArLayout::OnNumMappingChangedL() + { + HBufC* mapping = iDataStore->KeyMappingStringL(); + + iHwrWnd->SetNumericMapping( *mapping ); + + delete mapping; + } +// --------------------------------------------------------------------------- +// revert special characters direction before sending to editor. +// --------------------------------------------------------------------------- +// +TBool CPeninputFingerHwrArLayout::RevertSymbolDirection(TInt aInChar, TInt & aOutChar) + { + TBool converted = ETrue; + switch(aInChar) + { + case 0x0028: + { + aOutChar = 0x0029;//convert ( to ). + } + break; + case 0x0029: + { + aOutChar = 0x0028;//convert ) to (. + } + break; + case 0x005B: + { + aOutChar = 0x005D;//convert [ to ]. + } + break; + case 0x005D: + { + aOutChar = 0x005B;//convert ] to [. + } + break; + case 0x003C: + { + aOutChar = 0x003E;//convert < to >. + } + break; + case 0x003E: + { + aOutChar = 0x003C;//convert > to <. + } + break; + case 0x007B: + { + aOutChar = 0x007D;//convert { to }. + } + break; + case 0x007D: + { + aOutChar = 0x007B;//convert } to {. + } + break; + default: + aOutChar = aInChar; + converted = EFalse; + break; + } + return converted; + } //End of file diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarnumsymboltable.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarnumsymboltable.cpp Tue May 25 13:03:44 2010 +0300 @@ -0,0 +1,645 @@ +/* +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of symbol table. +* +*/ + + +// INCLUDE +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "hbufcarrayar.h" +#include "peninputfingerhwrarevent.h" +#include "peninputfingerhwrarcontrolid.h" +#include "peninputfingerhwrarstoreconstants.h" +#include "peninputlayoutvkb.h" +#include "peninputfingerhwrarnumsymboltable.h" + + +// --------------------------------------------------------------------------- +// Symbian Constructor +// --------------------------------------------------------------------------- +// +CPeninputArabicFingerHwrNumSymbolTable* CPeninputArabicFingerHwrNumSymbolTable::NewL( + CFepUiLayout* aUiLayout, TInt aId ) + { + CPeninputArabicFingerHwrNumSymbolTable* self = CPeninputArabicFingerHwrNumSymbolTable::NewLC( + aUiLayout, aId ); + + CleanupStack::Pop( self ); // self; + return self; + } + +// --------------------------------------------------------------------------- +// Symbian Constructor +// --------------------------------------------------------------------------- +// +CPeninputArabicFingerHwrNumSymbolTable* CPeninputArabicFingerHwrNumSymbolTable::NewLC( + CFepUiLayout* aUiLayout, TInt aId ) + { + CPeninputArabicFingerHwrNumSymbolTable* self = new (ELeave) CPeninputArabicFingerHwrNumSymbolTable( + aUiLayout, aId ); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// --------------------------------------------------------------------------- +// C++ constructor. +// --------------------------------------------------------------------------- +// +CPeninputArabicFingerHwrNumSymbolTable::CPeninputArabicFingerHwrNumSymbolTable( + CFepUiLayout* aFepUiLayout, TInt aControlId ) + : CControlGroup( aFepUiLayout, aControlId ),iIsNativeNumMode(EFalse) + { + SetControlType(ECtrlControlGroup|ECtrlTactileFeedback); + SetTactileFeedbackType(ETouchFeedbackSensitiveInput); + } + +// --------------------------------------------------------------------------- +// c++ destructor +// --------------------------------------------------------------------------- +// +CPeninputArabicFingerHwrNumSymbolTable::~CPeninputArabicFingerHwrNumSymbolTable() + { + } + +// --------------------------------------------------------------------------- +// popup the list. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::OpenSymbolTable() + { + CapturePointer( ETrue ); + iPopupVisible = ETrue; + iCurrentNumSCTType = ENumSCTLatin; + UiLayout()->LockArea(UiLayout()->Rect(),this); + UpdateNumSymbolTable(ENumSCTLatin); + } + +// --------------------------------------------------------------------------- +// cancel the popup. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::CloseSymbolTable() + { + CapturePointer( EFalse ); + iPopupVisible = EFalse; + UiLayout()->UnLockArea(UiLayout()->Rect(),this); + } + +// --------------------------------------------------------------------------- +// get visibility of popup. +// --------------------------------------------------------------------------- +// +TBool CPeninputArabicFingerHwrNumSymbolTable::IsPopup() + { + return iPopupVisible; + } + +// --------------------------------------------------------------------------- +// Handle pointer down event. +// --------------------------------------------------------------------------- +// +CFepUiBaseCtrl* CPeninputArabicFingerHwrNumSymbolTable::HandlePointerDownEventL( + const TPoint& aPoint ) + { + CancelPointerDownL(); + CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerDownEventL( aPoint ); + + if(!ctrl) + { + ReportEvent(EHwrEventOutsideEvent); + } + else + { + #ifdef RD_TACTILE_FEEDBACK + if (UiLayout()->SupportTactileFeedback()) + { + UiLayout()->DoTactileFeedback(ETouchFeedbackSensitiveInput); + } + #endif //RD_TACTILE_FEEDBACK + ctrl->UpdateArea(ctrl->Rect(),EFalse); + } + + return ctrl; + } + +// --------------------------------------------------------------------------- +// Handle pointer up event. +// --------------------------------------------------------------------------- +// +CFepUiBaseCtrl* CPeninputArabicFingerHwrNumSymbolTable::HandlePointerUpEventL( + const TPoint& aPoint ) + { + CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerUpEventL( aPoint ); + + if(ctrl) + { + ctrl->UpdateArea(ctrl->Rect(),EFalse); + } + + return ctrl; + } + +// --------------------------------------------------------------------------- +// Handle pointer move event. +// --------------------------------------------------------------------------- +// +CFepUiBaseCtrl* CPeninputArabicFingerHwrNumSymbolTable::HandlePointerMoveEventL( + const TPoint& aPoint ) + { + CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerMoveEventL( aPoint ); + if(ctrl) + { + HandlePointerEnter(aPoint); + ctrl->UpdateArea(ctrl->Rect(),EFalse); + } + else + { + HandlePointerLeave(aPoint); + UpdateArea(iRect,EFalse); + } + + return ctrl; + } + +// --------------------------------------------------------------------------- +// Symbian second-phase constructor. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::ConstructL() + { + BaseConstructL(); + + // disable border + SetBorderSize( TSize(0,0) ); + + // construct virtual keypad + CreateVirtualKeypadL(); + } + +// --------------------------------------------------------------------------- +// SizeChanged +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::SizeChanged( + const TRect aVirtualKeypadRect, const RArray /*aBtnRects*/, + const TInt /*aKeypadRow*/, const TInt /*aKeypadCol*/, TBool aIsLandscape) + { + iIsLandscape = aIsLandscape; + + // relayout the virtual key pad + iNumKeypad->SetRect(aVirtualKeypadRect); + + } + +// --------------------------------------------------------------------------- +// create symbol table keypad. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::CreateVirtualKeypadL() + { + TFontSpec spec; + + iNumKeypad = CVirtualKeyboard::NewL( + TRect(0,0,0,0), + UiLayout(), + EHwrCtrlIdNumSymbolTableVkb, + spec ); + + AddControlL( iNumKeypad ); + iNumKeypad->AddEventObserver( UiLayout() ); + + iNumKeypad->SetKeySkinId( EKeyBmpNormal, KAknsIIDQsnFrKeypadButtonFrNormal ); + iNumKeypad->SetKeySkinId( EKeyBmpHighlight, KAknsIIDQsnFrKeypadButtonFrPressed ); + iNumKeypad->SetKeySkinId( EKeyBmpDim, KAknsIIDQsnFrKeypadButtonFrInactive ); + iNumKeypad->SetResourceId( KInvalidResId ); + + iNumKeypad->SetKeyTextColorGroup( EAknsCIQsnTextColorsCG68 ); + iNumKeypad->SetDrawOpaqueBackground( EFalse ); + } + +void CPeninputArabicFingerHwrNumSymbolTable::OnActivate() + { + CControlGroup::OnActivate(); + } + +// --------------------------------------------------------------------------- +// Read control's background info. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::ConstructFromResourceL() + { + if ( iResourceId == KInvalidResId ) + { + User::Leave( KErrArgument ); + } + + TResourceReader reader; + CCoeEnv::Static()->CreateResourceReaderLC( reader, iResourceId ); + + const TInt32 bgImageResId = reader.ReadInt32(); + LoadBackgroundFromResourceL(bgImageResId); + + CleanupStack::PopAndDestroy( 1 ); //reader + + + CControlGroup::ConstructFromResourceL(); + } + +// --------------------------------------------------------------------------- +// Read control's background info. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::LoadBackgroundFromResourceL( const TInt aResId ) + { + if ( aResId == 0 ) + return; + + if ( BackgroundBmp() ) + { + CFbsBitmap* bkBmp = BackgroundBmp(); + delete bkBmp; + SetBackgroundBmp( NULL ); + } + if ( BkMaskBmp() ) + { + CFbsBitmap* bkMaskBmp = BkMaskBmp(); + delete bkMaskBmp; + SetBackgroundMaskBmp( NULL ); + } + + TResourceReader resReader; + CCoeEnv::Static()->CreateResourceReaderLC( resReader, aResId ); + + TPtrC bmpFileName = resReader.ReadTPtrC(); + TInt32 imgMajorSkinId = resReader.ReadInt32(); + + TAknsItemID id; + TInt skinitemid; + + MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); + const TInt16 bmpId = resReader.ReadInt16(); + const TInt16 bmpMskId = resReader.ReadInt16(); + skinitemid = resReader.ReadInt16(); + id.Set( TInt( imgMajorSkinId ), skinitemid ); + + if ( bmpId != KInvalidImg ) + { + CFbsBitmap* backgroundImg = NULL; + CFbsBitmap* backgroundMaskImg = NULL; + if ( bmpMskId != KInvalidImg ) + { + AknsUtils::CreateIconL( skininstance, id, backgroundImg, + backgroundMaskImg, bmpFileName, bmpId, bmpMskId ); + } + else + { + AknsUtils::CreateIconL( skininstance, id, backgroundImg, + bmpFileName, bmpId ); + } + + SetBackgroundBmp( backgroundImg ); + SetBackgroundMaskBmp( backgroundMaskImg ); + } + CleanupStack::PopAndDestroy( 1 ); //reader + } + +// --------------------------------------------------------------------------- +// Load virtual keys image +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::LoadVkbKeyImageL(TInt aResId, const TSize& aKeySize) + { + TResourceReader reader; + CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId ); + + TPtrC bmpFileName = reader.ReadTPtrC(); + TInt32 imgMajorSkinId = reader.ReadInt32(); + TAknsItemID id; + + TSize keySize = aKeySize; + + for ( TInt index = 0; index <= EKeyBmpLastType ; index += 2 ) + { + // Get the image ids and mask ids from resource + TInt bmpId = reader.ReadInt16(); + TInt bmpMskId = reader.ReadInt16(); + + // read skin item id + const TInt skinitemid = reader.ReadInt16(); + id.Set( TInt( imgMajorSkinId ), skinitemid ); + + if ( bmpId != KInvalidImg ) + { + CFbsBitmap* bmp = NULL; + CFbsBitmap* maskbmp = NULL; + + if ( bmpMskId != KInvalidImg ) + { + AknsUtils::CreateIconL( AknsUtils::SkinInstance(), + id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId ); + + // set maskbmp and size + AknIconUtils::SetSize( maskbmp, keySize, EAspectRatioNotPreserved ); + iNumKeypad->SetNonIrregularKeyBitmapL( + TVirtualKeyBmpType( EKeyBmpNormal + index + 1 ), maskbmp ); + } + else + { + AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id, + bmp, bmpFileName, bmpId ); + } + // set bmp and size + AknIconUtils::SetSize( bmp, keySize, EAspectRatioNotPreserved ); + iNumKeypad->SetNonIrregularKeyBitmapL( + TVirtualKeyBmpType( EKeyBmpNormal + index ), bmp ); + } + } + // Pop and destroy reader + CleanupStack::PopAndDestroy( 1 ); + } + +// --------------------------------------------------------------------------- +// Load virtual keys +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::LoadVirtualKeypadKeyL(const TInt aResId, const RArray& aCellRects) + { + iNumKeypad->SetResourceId(aResId); + + TResourceReader reader; + CCoeEnv::Static()->CreateResourceReaderLC( reader, aResId ); + + // construct keys + TInt resKeyCount = reader.ReadInt16(); + TInt existsKeyCount = iNumKeypad->KeyArray().Count(); + TInt rectCount = aCellRects.Count(); + + for ( TInt i = 0; i < resKeyCount; i++ ) + { + if ( i < existsKeyCount ) + { + CVirtualKey* vk = iNumKeypad->KeyArray()[i]; + UpdateVkbKeyL( vk, reader, aCellRects[i%rectCount] ); + } + else + { + CVirtualKey* vk = CreateVkbKeyL( reader, aCellRects[i%rectCount] ); + CleanupStack::PushL( vk ); + iNumKeypad->AddKeyL( vk ); + + CleanupStack::Pop( vk ); + } + } + + CleanupStack::PopAndDestroy( 1 ); // reader + + iNumKeypad->Draw(); + iNumKeypad->UpdateArea( iNumKeypad->Rect() ); + } + +// --------------------------------------------------------------------------- +// create virtual key. +// --------------------------------------------------------------------------- +// +CVirtualKey* CPeninputArabicFingerHwrNumSymbolTable::CreateVkbKeyL( TResourceReader& aReader, + const TRect aKeyRect ) + { + CHBufCArray* keytexts = CHBufCArray::NewL(); + CleanupStack::PushL( keytexts ); + + for ( TInt i = 0; i <= EPosLast; i++ ) + { + HBufC* unicode = aReader.ReadHBufCL(); + keytexts->Array().AppendL( unicode ); + } + + TInt keyscancode = aReader.ReadInt16(); + + HBufC* text = keytexts->Array()[0]; + + CVirtualKey* vk = NULL; + if ( text ) + { + vk = CVirtualKey::NewL( *text, keyscancode, aKeyRect, aKeyRect, 0 ); + } + else + { + vk = CVirtualKey::NewL( KNullDesC, keyscancode, aKeyRect, aKeyRect, 0 ); + } + + CleanupStack::PopAndDestroy( keytexts ); //keytexts + + + TRect innerrect = aKeyRect; + innerrect.Shrink( TSize(10, 10) ); + vk->SetInnerRect( innerrect ); + + return vk; + } + +// --------------------------------------------------------------------------- +// update virtual key info. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::UpdateVkbKeyL( CVirtualKey* aVirtualKey, + TResourceReader& aReader, const TRect aKeyRect ) + { + CHBufCArray* keytexts = CHBufCArray::NewL(); + CleanupStack::PushL( keytexts ); + + for ( TInt i = 0; i <= EPosLast; i++ ) + { + HBufC* unicode = aReader.ReadHBufCL(); + keytexts->Array().AppendL( unicode ); + } + + TInt keyscancode = aReader.ReadInt16(); + + HBufC* text = keytexts->Array()[0]; + if ( text ) + { + aVirtualKey->SetKeyData( *text ); + } + else + { + aVirtualKey->SetKeyData( KNullDesC ); + } + + aVirtualKey->SetKeyScancode( keyscancode ); + + CleanupStack::PopAndDestroy( keytexts ); //keytexts + + aVirtualKey->SetRect(aKeyRect); + TRect innerrect = aKeyRect; + innerrect.Shrink( TSize(10,10) ); + aVirtualKey->SetInnerRect( innerrect ); + } + +// --------------------------------------------------------------------------- +// accept editor's number mapping restriction. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::SetNumericMapping( const TDesC& aNumMapping ) + { + //format of aNumMapping is "0123456789******" + + //char offset in aNumMapping + //cell 0 using aNumMapping[KNumOffsets[0]] + //cell 1 using aNumMapping[KNumOffsets[1]] + const TInt KNumOffsets[] = + { + 12, 1, 2, 3, + 13, 4, 5, 6, + 14, 7, 8, 9, + 15, 10, 0, 11 + }; + + TInt maxMappingItemCount = sizeof(KNumOffsets)/sizeof(TInt); + TInt mappingItemCount = aNumMapping.Length(); + + //numberpad + TInt keyCount = iNumKeypad->KeyArray().Count(); + for ( TInt i = 0; i < keyCount; i++ ) + { + CVirtualKey* vk = iNumKeypad->KeyArray()[i]; + + TInt offset = ( i < maxMappingItemCount ) ? KNumOffsets[i] : -1; + + if ( offset > -1 && offset < mappingItemCount ) + { + TUint16 unicode = aNumMapping[offset]; + TUint16 mappedCode = MapLatinNumAccordingToNumMode(unicode); + TBuf<1> keydata; + keydata.Append(mappedCode); + vk->SetKeyData(keydata); + vk->SetKeyScancode( mappedCode); + vk->SetDimmed( EFalse ); + } + else + { + vk->SetKeyData( KNullDesC ); + vk->SetKeyScancode( 0xFFFF ); + vk->SetDimmed( EFalse ); + } + } + + + //sync feedback + UpdateAllVirtualKeysFeedback(); + } + +// --------------------------------------------------------------------------- +// Navigate the symbol page +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::UpdateNumSymbolTable( TInt aNumSctType) + { + + iCurrentNumSCTType = aNumSctType; + // Draw the symbol table + Draw(); + + // Update the feedback for the virtual key + UpdateAllVirtualKeysFeedback(); + + // Bitblt the whole symbol table to screen + UpdateArea(iRect); + } + +// --------------------------------------------------------------------------- +// update feedback state of all virtual keys. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::UpdateAllVirtualKeysFeedback() + { + //update sctpad keys + TInt keyCount = iNumKeypad->KeyArray().Count(); + for ( TInt i = 0; i < keyCount; i++ ) + { + CVirtualKey* vk = iNumKeypad->KeyArray()[i]; + TBool enable = !vk->Dimmed(); + iNumKeypad->EnableKeyFeedback( vk, enable ); + } + } + +// --------------------------------------------------------------------------- +// Draw new content to the screen +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::Draw() + { + if(AbleToDraw()) + { + DrawOpaqueMaskBackground( Rect() ); + + if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() ) + { + AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved); + } + // draw background + DrawBackground(); + + // draw group + CControlGroup::Draw(); + + // bitblt the new content to screen + UpdateArea(iRect); + } + } +// --------------------------------------------------------------------------- +// set native number mode on or off. +// --------------------------------------------------------------------------- +// +void CPeninputArabicFingerHwrNumSymbolTable::SetNativeNumMode( + const TBool aIsNativeNumMode) + { + iIsNativeNumMode = aIsNativeNumMode; + } +// --------------------------------------------------------------------------- +// map latin number to arabic native number. +// --------------------------------------------------------------------------- +// +TInt16 CPeninputArabicFingerHwrNumSymbolTable:: MapLatinNumAccordingToNumMode( + TInt16 aUnicode) + { + TInt16 ret = aUnicode; + if(aUnicode >= 0x30 && aUnicode <= 0x39) + { + if(iIsNativeNumMode) + { + ret = aUnicode + 0x0660 - 0x30; + } + } + return ret; + } +// End Of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarstatemanager.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarstatemanager.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarstatemanager.cpp Tue May 25 13:03:44 2010 +0300 @@ -404,9 +404,10 @@ RPointerArray candidates = iDataStore.Candidate(); if ( candidates.Count() > 0 ) { - HBufC* defaultCandiate = candidates[0]; - iStateManager.HwrLayout().SubmitStringToFep( *defaultCandiate ); - + if(iStateManager.HwrLayout().IsAllowedToSubmitDefaultCandiate()) + { + iStateManager.HwrLayout().SubmitStringToFep( *candidates[0]); + } iStateManager.SetState( CPeninputFingerHwrArStateManager:: EPeninputFingerHwrArStateCandidateSelecting ); @@ -516,14 +517,21 @@ TPtrC ptr; ptr.Set( ( aEventData.Left( aEventData.Length() - 1 ) ) ); - RPointerArray candidates = iDataStore.Candidate(); - //the selected char is not same as default - //replace the default candidate - HBufC* defaultCandidate = candidates[0]; - if( *defaultCandidate != ptr ) + if(!iStateManager.HwrLayout().IsAllowedToSubmitDefaultCandiate()) + { + iStateManager.HwrLayout().SubmitStringToFep( ptr); + } + else { - iStateManager.HwrLayout().Replace( *defaultCandidate, ptr ); - } + RPointerArray candidates = iDataStore.Candidate(); + //the selected char is not same as default + //replace the default candidate + HBufC* defaultCandidate = candidates[0]; + if( *defaultCandidate != ptr ) + { + iStateManager.HwrLayout().Replace( *defaultCandidate, ptr, EFalse); + } + } iDataStore.SetArabicSymbolL(); } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarsymboltable.cpp Tue May 25 13:03:44 2010 +0300 @@ -25,12 +25,12 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include #include @@ -221,29 +221,8 @@ { iIsLandscape = aIsLandscape; - // relayout the button group - TRect spaceBtnRect(aBtnRects[0]); - - TInt pdx = (spaceBtnRect.Size().iWidth/3)/2; - MoveIconButton(iSpaceBtn,spaceBtnRect,pdx,KSymbolButtonInnerPadding); - - TRect pieceInnerRect = spaceBtnRect; - pieceInnerRect.Shrink(pdx*2,KSymbolButtonInnerPadding); - - // that's a not good algrithm in funciton AknPenInputDrawUtils::Draw3PiecesColorIcon for drawing 3Pieces icons - // as when the outter rect's height was not equal to the inter rect's height, the target rects the left icons and right icons - // would be bitblited onto are set to be Rect(0.0.0.0.0) [[which should not be that behavior]]. - // Please theck the codes: AknPenInputDrawUtils::Draw3PiecesColorIcon: this function should be Updated. - iSpaceBtn->SetDraw3PieceFrameInfo( - TDraw3PiecesFrame(KAknsIIDQgnIndiInputSpaceL, - KAknsIIDQgnIndiInputSpaceMiddle, - KAknsIIDQgnIndiInputSpaceR, - pieceInnerRect)); - TRect enterBtnRect(aBtnRects[1]); - - MoveIconButton(iEnterBtn,enterBtnRect,pdx,KSymbolButtonInnerPadding); - - TRect pageBtnRect(aBtnRects[2]); + // relayout the button + TRect pageBtnRect(aBtnRects[0]); if(aIsLandscape) { @@ -303,15 +282,6 @@ void CPeninputArabicFingerHwrSymbolTable::CreateButtonGroupL() { - iEnterBtn = CreateEventBtnL(EHwrCtrlIdBtnEnter,R_AKN_FEP_HWR_ENTER); - iSpaceBtn = CreateEventBtnL(EHwrCtrlIdBtnSpace,R_AKN_FEP_HWR_SPACE); - // Create 3-pieces color icon for space button - CPenInput3PiecesColorIcons* colorIcons = - CPenInput3PiecesColorIcons::NewL( R_AKN_FEP_VKB_SPACE_ICON1, - R_AKN_FEP_VKB_SPACE_ICON2, - R_AKN_FEP_VKB_SPACE_ICON3 ); - iSpaceBtn->Set3PiecesColorIcons( colorIcons ); - // create the page button for portrait i3Page1Btn = CreateEventBtnL(EHwrCtrlId3Page1Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_1); i3Page2Btn = CreateEventBtnL(EHwrCtrlId3Page2Btn, R_AKN_FEP_ARABIC_3PAGE_HWR_SCT_PAGE_2); @@ -574,7 +544,7 @@ TRect innerrect = aKeyRect; - innerrect.Shrink( TSize(10, 10) ); + innerrect.Shrink( TSize(2, 2) ); vk->SetInnerRect( innerrect ); return vk; @@ -614,7 +584,7 @@ aVirtualKey->SetRect(aKeyRect); TRect innerrect = aKeyRect; - innerrect.Shrink( TSize(10,10) ); + innerrect.Shrink( TSize(2,2) ); aVirtualKey->SetInnerRect( innerrect ); } @@ -721,15 +691,17 @@ { if(AbleToDraw()) { - DrawOpaqueMaskBackground( Rect() ); - + //Draw button area background. +// DrawOpaqueMaskBackground( Rect() ); +// DrawOpaqueMaskBackground(); + DrawOpaqueMaskBackground(iMutiPageKeypad->Rect()); if( BackgroundBmp() && BackgroundBmp()->SizeInPixels() != Rect().Size() ) { AknIconUtils::SetSize(BackgroundBmp(), Rect().Size(), EAspectRatioNotPreserved); } // draw background - DrawBackground(); - +// DrawBackground(); + DrawBackground(iMutiPageKeypad->Rect()); // draw group CControlGroup::Draw(); @@ -737,5 +709,4 @@ UpdateArea(iRect); } } - // End Of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp --- a/textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputfingerhwrar/src/peninputfingerhwrarwnd.cpp Tue May 25 13:03:44 2010 +0300 @@ -21,11 +21,11 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include @@ -44,6 +44,7 @@ #include "peninputfingerhwrarlayout.h" #include "peninputfingerhwrardatastore.h" #include "peninputfingerhwrarsymboltable.h" +#include "peninputfingerhwrarnumsymboltable.h" #include "peninputfingerhwrarindicator.h" #include "peninputfingerhwrarwritingwnd.h" @@ -85,9 +86,12 @@ // CPeninputFingerHwrArWnd::~CPeninputFingerHwrArWnd() { - #ifdef RD_TACTILE_FEEDBACK - UiLayout()->DeRegisterFeedbackArea(reinterpret_cast(iWritingBox), + #ifdef RD_TACTILE_FEEDBACK + if(UiLayout()) + { + UiLayout()->DeRegisterFeedbackArea(reinterpret_cast(iWritingBox), iWritingBox->Rect()); + } #endif delete iLafManager; } @@ -141,6 +145,38 @@ } CleanupStack::PopAndDestroy(); // reader + + // read keypad image info + if ( iNumSymbolTable ) + { + TSize keysize = iLafManager->VirtualSctpadCellSize().Size(); + iNumSymbolTable->LoadVkbKeyImageL(R_FINGER_HWR_NUMPAD_IMAGE, keysize ); + + RArray rects; + CleanupClosePushL( rects ); + iLafManager->GetVirtualKeyRects( rects ); + LoadNumSymbolVirtualKeysL( R_FINGER_HWR_NUMPAD, rects ); + CleanupStack::PopAndDestroy(); //rects + } + + if ( iSymbolTable ) + { + TSize keysize = iLafManager->VirtualSctpadCellSize().Size(); + iSymbolTable->LoadVkbKeyImageL(R_FINGER_HWR_SCTPAD_IMAGE, keysize ); + + RArray rects; + CleanupClosePushL( rects ); + iLafManager->GetVirtualKeyRects( rects ); + if(iLafManager->IsLandscape()) + { + LoadSymbolVirtualKeysL(R_ARABIC_FINGER_HWR_LANDSCAPE_SYMBOL_TABLE, rects); + } + else + { + LoadSymbolVirtualKeysL(R_ARABIC_FINGER_HWR_PORTRAIT_SYMBOL_TABLE, rects); + } + CleanupStack::PopAndDestroy(); //rects + } if (!iFirstTimeConstruct) { @@ -191,12 +227,6 @@ iLafManager->CandidateLTPos(), 3/*KCandidateCountPerRow*/, 2 ); - iNumCandidateList->SizeChanged( iLafManager->CandidateUnitWidth(), - iLafManager->CandidateUnitHeight(), - iLafManager->CandidateUnitWidth(), - iLafManager->CandidateLTPos(), - 3/*KCandidateCountPerRow*/, - 1 ); iContextField->SetTextMargin ( iLafManager->IcfLeftMargin(), iLafManager->IcfRightMargin(), iLafManager->IcfTopMargin(), @@ -434,14 +464,6 @@ { return iCandidateList; } -// --------------------------------------------------------------------------- -// retrieve the number candicate list control. -// --------------------------------------------------------------------------- -// -CFepCtrlDropdownList* CPeninputFingerHwrArWnd::NumCandidateList() - { - return iNumCandidateList; - } // --------------------------------------------------------------------------- // Open the candidate list @@ -449,34 +471,24 @@ // void CPeninputFingerHwrArWnd::OpenCandidateList() { - CPeninputFingerHwrArLayout* hwrLayout = NULL; - hwrLayout = static_cast( UiLayout() ); - CPeninputFingerHwrArDataStore& datastore = hwrLayout->DataStore(); - - const RPointerArray& candidates = datastore.Candidate(); - - if(candidates.Count() > 0) + CPeninputFingerHwrArLayout* hwrLayout = NULL; + hwrLayout = static_cast( UiLayout() ); + CPeninputFingerHwrArDataStore& datastore = hwrLayout->DataStore(); + + const RPointerArray& candidates = datastore.Candidate(); + + if(candidates.Count() > 0) { - CFepCtrlDropdownList::TListType unexpandable = CFepCtrlDropdownList::EListExpandableMultiRowWithoutIconWithBubble; - - if ( datastore.PrimaryRange() == ERangeNative ) - { - iCandidateList->Hide( EFalse ); - TRAP_IGNORE(iCandidateList->SetCandidatesL( candidates, unexpandable )); - iCandidateList->SetHighlightCell( 0, datastore.Highlight() ); - } - else - { - iNumCandidateList->Hide( EFalse ); - TRAP_IGNORE(iNumCandidateList->SetCandidatesL( candidates, unexpandable )); - iNumCandidateList->SetHighlightCell( 0, datastore.Highlight() ); - } - - iArrowLeftBtn->Hide(ETrue); - iArrowRightBtn->Hide(ETrue); - iArrowUpBtn->Hide(ETrue); - iArrowDownBtn->Hide(ETrue); - } + CFepCtrlDropdownList::TListType unexpandable = CFepCtrlDropdownList::EListExpandableMultiRowWithoutIconWithBubble; + + iCandidateList->Hide( EFalse ); + TRAP_IGNORE(iCandidateList->SetCandidatesL( candidates, unexpandable )); + iCandidateList->SetHighlightCell( 0, datastore.Highlight() ); + iArrowLeftBtn->Hide(ETrue); + iArrowRightBtn->Hide(ETrue); + iSpaceBtn->Hide(ETrue); + iEnterBtn->Hide(ETrue); + } } // --------------------------------------------------------------------------- @@ -486,15 +498,12 @@ void CPeninputFingerHwrArWnd::CloseCandidateList() { iCandidateList->ResetAndClear(CFepCtrlDropdownList::EListExpandableMultiRowWithoutIconWithBubble); - iNumCandidateList->ResetAndClear(CFepCtrlDropdownList::EListExpandableMultiRowWithoutIconWithBubble); // hide all the dropdown list in standby state iCandidateList->Hide( ETrue ); - iNumCandidateList->Hide( ETrue ); - iArrowLeftBtn->Hide(EFalse); iArrowRightBtn->Hide(EFalse); - iArrowUpBtn->Hide(EFalse); - iArrowDownBtn->Hide(EFalse); + iSpaceBtn->Hide(EFalse); + iEnterBtn->Hide(EFalse); } // --------------------------------------------------------------------------- @@ -505,8 +514,8 @@ { iArrowLeftBtn->SetDimmed( aDimArrow ); iArrowRightBtn->SetDimmed( aDimArrow ); - iArrowUpBtn->SetDimmed( aDimArrow ); - iArrowDownBtn->SetDimmed( aDimArrow ); + iSpaceBtn->SetDimmed( aDimArrow ); + iEnterBtn->SetDimmed( aDimArrow ); } // --------------------------------------------------------------------------- @@ -544,11 +553,11 @@ //create candidate lists CreateCandidateListL(); - //create number candidate lists. - CreateNumCandidateListL(); - //create virtual sct pad CreateSymbolTableL(); + + //create number mode virtual sct pad + CreateNumSymbolTableL(); //create control buttons CreateButtonsL(); @@ -675,58 +684,6 @@ } // --------------------------------------------------------------------------- -// create candidate lists. -// --------------------------------------------------------------------------- -// -void CPeninputFingerHwrArWnd::CreateNumCandidateListL() - { - TDropdownListDrawInfo candiDrawInfo( - KAknsIIDQsnFrFunctionButtonInactive, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrItutButtonCandiSideL, - KAknsIIDQsnFrItutButtonCandiMiddle, - KAknsIIDQsnFrItutButtonCandiSideR, - KAknsIIDQsnFrItutButtonCandiPressedSideL, - KAknsIIDQsnFrItutButtonCandiPressedMiddle, - KAknsIIDQsnFrItutButtonCandiPressedSideR, - TRgb( 194, 221, 242 ), - ETrue ); - - TInt unitWidth = iLafManager->CandidateUnitWidth(); - TInt unitHeight = iLafManager->CandidateUnitHeight(); - TPoint ltPosition = iLafManager->CandidateLTPos(); - const CFont *font = iLafManager->CandidateFont(); - TInt horizontalMargin = iLafManager->CandidateHorizontalMargin(); - TInt verticalMargin = iLafManager->CandidateVerticalMargin(); - - iNumCandidateList = CFepCtrlDropdownList::NewL(UiLayout(), - EHwrCtrlIdNumCandidateList, - R_FSHWR_CANDIDATE_DROP_DOWN_LIST, - ltPosition, - font , - TSize(unitWidth,unitHeight), - unitWidth, - 3,1, - unitHeight, - 0, - 0, - CFepCtrlDropdownList::ECandFromRToL, - EFalse); - AddControlL( iNumCandidateList ); - iNumCandidateList->SetCellMargin( horizontalMargin, verticalMargin ); - iNumCandidateList->SetFont( font ); - - // set the needed events - iNumCandidateList->SetEventIdForCandidateSelected( EHwrEventCandidateSelected ); - iNumCandidateList->AddEventObserver( UiLayout() ); - - // hide the candidate list - iNumCandidateList->Hide( ETrue ); - iNumCandidateList->SetDropdownListImgID( candiDrawInfo ); - - } -// --------------------------------------------------------------------------- // create writing box. // --------------------------------------------------------------------------- // @@ -762,10 +719,14 @@ EHwrEventNavKeyClicked, EKeyLeftArrow ); iArrowRightBtn = CreateRepBtnL( EHwrCtrlIdArrowRight, R_AKN_FEP_HWR_ARROWRIGHT, EHwrEventNavKeyClicked, EKeyRightArrow ); - iArrowUpBtn = CreateRepBtnL( EHwrCtrlIdArrowUp, R_AKN_FEP_HWR_ARROWUP, - EHwrEventNavKeyClicked, EKeyUpArrow ); - iArrowDownBtn = CreateRepBtnL( EHwrCtrlIdArrowDown, R_AKN_FEP_HWR_ARROWDOWN, - EHwrEventNavKeyClicked, EKeyDownArrow ); + iEnterBtn = CreateEventBtnL(EHwrCtrlIdBtnEnter,R_AKN_FEP_HWR_ENTER); + iSpaceBtn = CreateEventBtnL(EHwrCtrlIdBtnSpace,R_AKN_FEP_HWR_SPACE); + // Create 3-pieces color icon for space button + CPenInput3PiecesColorIcons* colorIcons = + CPenInput3PiecesColorIcons::NewL( R_AKN_FEP_VKB_SPACE_ICON1, + R_AKN_FEP_VKB_SPACE_ICON2, + R_AKN_FEP_VKB_SPACE_ICON3 ); + iSpaceBtn->Set3PiecesColorIcons( colorIcons ); iSymbolTableBtn = CreateEventBtnL( EHwrCtrlIdSymbolButton, R_AKN_FEP_HWR_SYMBOL_TABLE_BUTTON ); } @@ -784,6 +745,20 @@ } // --------------------------------------------------------------------------- +// create virtual number mode sct pad. +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArWnd::CreateNumSymbolTableL() + { + iNumSymbolTable = CPeninputArabicFingerHwrNumSymbolTable::NewL(UiLayout(),EHwrCtrlIdNumSymbolTableVkbGroup); + iNumSymbolTable->Hide(ETrue); + iNumSymbolTable->SetResourceId(R_FINGERHWR_ARABIC_SYMBOLTABLE); + iNumSymbolTable->ConstructFromResourceL(); + AddControlL( iNumSymbolTable ); + iNumSymbolTable->AddEventObserver( UiLayout() ); + } + +// --------------------------------------------------------------------------- // EventButton creation helper. // --------------------------------------------------------------------------- // @@ -842,6 +817,23 @@ } // --------------------------------------------------------------------------- +// load virtual number mode sct keys. +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArWnd::LoadNumSymbolVirtualKeysL( const TInt aResId, + const RArray& aCellRects ) + { + TAknTextLineLayout txtlayout = iLafManager->NumpadKeyTxtLayout(); + iNumSymbolTable->KeyPad()->SetTextLineLayout( txtlayout ); + + TInt fontid = txtlayout.FontId(); + const CFont* font = AknLayoutUtils::FontFromId( fontid ); + iNumSymbolTable->KeyPad()->SetFont( font ); + + iNumSymbolTable->LoadVirtualKeypadKeyL(aResId,aCellRects); + } + +// --------------------------------------------------------------------------- // relayout full ui, reset all controls position. // --------------------------------------------------------------------------- // @@ -884,18 +876,31 @@ pdx = iLafManager->GetArrowPaddingSize().iWidth; pdy = iLafManager->GetArrowPaddingSize().iHeight; - rect = iLafManager->CtrlRect( iArrowUpBtn->ControlId() ); - MoveIconButton( iArrowUpBtn, rect, pdx, pdy, ETrue ); - rect = iLafManager->CtrlRect( iArrowLeftBtn->ControlId() ); MoveIconButton( iArrowLeftBtn, rect, pdx, pdy, ETrue ); rect = iLafManager->CtrlRect( iArrowRightBtn->ControlId() ); MoveIconButton( iArrowRightBtn, rect, pdx, pdy, ETrue ); - rect = iLafManager->CtrlRect( iArrowDownBtn->ControlId() ); - MoveIconButton( iArrowDownBtn, rect, pdx, pdy, ETrue ); - + rect = iLafManager->CtrlRect( iSpaceBtn->ControlId() ); + MoveIconButton( iSpaceBtn, rect, pdx, pdy, ETrue ); + + TRect pieceInnerRect = rect; + pieceInnerRect.Shrink(pdx*2,pdy); + + // that's a not good algrithm in funciton AknPenInputDrawUtils::Draw3PiecesColorIcon for drawing 3Pieces icons + // as when the outter rect's height was not equal to the inter rect's height, the target rects the left icons and right icons + // would be bitblited onto are set to be Rect(0.0.0.0.0) [[which should not be that behavior]]. + // Please theck the codes: AknPenInputDrawUtils::Draw3PiecesColorIcon: this function should be Updated. + iSpaceBtn->SetDraw3PieceFrameInfo( + TDraw3PiecesFrame(KAknsIIDQgnIndiInputSpaceL, + KAknsIIDQgnIndiInputSpaceMiddle, + KAknsIIDQgnIndiInputSpaceR, + pieceInnerRect)); + + rect = iLafManager->CtrlRect( iEnterBtn->ControlId() ); + MoveIconButton( iEnterBtn, rect, pdx, pdy, ETrue ); + // load vkb key image TSize keysize = iLafManager->VirtualSctpadCellSize().Size(); iSymbolTable->LoadVkbKeyImageL(R_FINGER_HWR_SCTPAD_IMAGE, keysize ); @@ -927,6 +932,31 @@ iSymbolTable->SizeChanged(iLafManager->GetVirtualKeyRect(), iLafManager->GetSymBtnArray(), rows, cols, iLafManager->IsLandscape()); + //number mode symbol table + // load number mode vkb key image + TSize numkeysize = iLafManager->VirtualSctpadCellSize().Size(); + iNumSymbolTable->LoadVkbKeyImageL(R_FINGER_HWR_NUMPAD_IMAGE, numkeysize ); + + // get the key rect + RArray numrects; + CleanupClosePushL( numrects ); + iLafManager->GetNumVirtualKeyRects( numrects ); + + // load keys + LoadNumSymbolVirtualKeysL(R_FINGER_HWR_NUMPAD, numrects); + + CleanupStack::PopAndDestroy();//rects + + //move virtual Sctpad + TInt numpadrows = iLafManager->VirtualNumSctpadRowCount(); + TInt numpadcols = iLafManager->VirtualNumSctpadColCount(); + + rect = iLafManager->CtrlRect(iNumSymbolTable->ControlId()); + iNumSymbolTable->SetRect(rect); + + iNumSymbolTable->SizeChanged(iLafManager->GetVirtualNumKeyRect(), + iLafManager->GetSymBtnArray(), numpadrows, numpadcols, + iLafManager->IsLandscape()); } @@ -938,14 +968,14 @@ { // hide following controls iCandidateList->Hide( ETrue ); - iNumCandidateList->Hide( ETrue ); iSymbolTable->Hide( ETrue); + iNumSymbolTable->Hide(ETrue); // show following controls iArrowLeftBtn->Hide( EFalse ); iArrowRightBtn->Hide( EFalse ); - iArrowUpBtn->Hide( EFalse ); - iArrowDownBtn->Hide( EFalse ); + iSpaceBtn->Hide( EFalse ); + iEnterBtn->Hide( EFalse ); iOptionBtn->Hide( EFalse ); iSymbolTableBtn->SetHighlight( EFalse); iContextField->SetReady(ETrue); @@ -958,18 +988,30 @@ // void CPeninputFingerHwrArWnd::SwitchToSymbolTableView() { + CPeninputFingerHwrArLayout* hwrLayout = NULL; + hwrLayout = static_cast( UiLayout() ); + CPeninputFingerHwrArDataStore& datastore = hwrLayout->DataStore(); + TBool IsNumberOnly = datastore.IsNumberOnlyMode(); // show following controls iWritingBox->Hide( EFalse ); - iSymbolTable->Hide( EFalse ); + if(IsNumberOnly) + { + iSymbolTable->Hide( ETrue ); + iNumSymbolTable->Hide(EFalse); + } + else + { + iSymbolTable->Hide( EFalse ); + iNumSymbolTable->Hide(ETrue); + } iOptionBtn->Hide( EFalse ); // hide follwing controls iCandidateList->Hide( ETrue ); - iNumCandidateList->Hide( ETrue ); iArrowLeftBtn->Hide( ETrue ); iArrowRightBtn->Hide( ETrue ); - iArrowUpBtn->Hide( ETrue ); - iArrowDownBtn->Hide( ETrue ); + iSpaceBtn->Hide( ETrue ); + iEnterBtn->Hide( ETrue ); // set the symboltable button highlighted iSymbolTableBtn->SetHighlight( ETrue ); @@ -978,8 +1020,16 @@ // so set this control to be not ready iContextField->SetReady(EFalse); - iSymbolTable->OpenSymbolTable(); - iSymbolTable->BringToTop(); + if(IsNumberOnly) + { + iNumSymbolTable->OpenSymbolTable(); + iNumSymbolTable->BringToTop(); + } + else + { + iSymbolTable->OpenSymbolTable(); + iSymbolTable->BringToTop(); + } } @@ -1256,39 +1306,26 @@ { if (aShow > 0) { - TRect outrect,innerrect; + TRect outrect,innerrect; iCandidateList->ShowBubble(ETrue); - - // Set priview popup size + + // Set priview popup size iCandidateList->SetBubbleBitmapParam(NULL,NULL,KAknsIIDQsnFrInputCharPreview); - - outrect = iLafManager->PreviewBubbleRect(); - innerrect = iLafManager->PreviewBubbleInnerRect(); - iCandidateList->SetTextFormat(iLafManager->PreviewBubbleTextLayout()); - iCandidateList->SetBubbleTextFont(iLafManager->PreviewBubbleFont()); - iCandidateList->SetBubbleSize(TSize(outrect.Width(),outrect.Height())); // Read laf - iCandidateList->SetFrameDiff(innerrect.iTl.iX - outrect.iTl.iX, - innerrect.iTl.iY - outrect.iTl.iY, - outrect.iBr.iX - innerrect.iBr.iX, - outrect.iBr.iY - innerrect.iBr.iY); - - iNumCandidateList->ShowBubble(ETrue); - - // Set priview popup size - iNumCandidateList->SetBubbleBitmapParam(NULL,NULL,KAknsIIDQsnFrInputCharPreview); - iNumCandidateList->SetTextFormat(iLafManager->PreviewBubbleTextLayout()); - iNumCandidateList->SetBubbleTextFont(iLafManager->PreviewBubbleFont()); - iNumCandidateList->SetBubbleSize(TSize(outrect.Width(),outrect.Height())); // Read laf - iNumCandidateList->SetFrameDiff(innerrect.iTl.iX - outrect.iTl.iX, + + outrect = iLafManager->PreviewBubbleRect(); + innerrect = iLafManager->PreviewBubbleInnerRect(); + iCandidateList->SetTextFormat(iLafManager->PreviewBubbleTextLayout()); + iCandidateList->SetBubbleTextFont(iLafManager->PreviewBubbleFont()); + iCandidateList->SetBubbleSize(TSize(outrect.Width(),outrect.Height())); // Read laf + iCandidateList->SetFrameDiff(innerrect.iTl.iX - outrect.iTl.iX, innerrect.iTl.iY - outrect.iTl.iY, outrect.iBr.iX - innerrect.iBr.iX, outrect.iBr.iY - innerrect.iBr.iY); - + } else { iCandidateList->ShowBubble(EFalse); - iNumCandidateList->ShowBubble(EFalse); } } @@ -1349,7 +1386,7 @@ // void CPeninputFingerHwrArWnd::OpenSymbolTable() { - if(!iSymbolTable->IsPopup()) + if(!iSymbolTable->IsPopup() && !iNumSymbolTable->IsPopup()) { SwitchToSymbolTableView(); } @@ -1367,7 +1404,13 @@ iSymbolTable->CloseSymbolTable(); iSymbolTable->BringToBack(); SwitchToStandbyView(); - } + } + else if(iNumSymbolTable->IsPopup()) + { + iNumSymbolTable->CloseSymbolTable(); + iNumSymbolTable->BringToBack(); + SwitchToStandbyView(); + } } // -------------------------------------------------------------------------- @@ -1377,7 +1420,8 @@ // TBool CPeninputFingerHwrArWnd::IsSymbolTableShowingUp() { - return iSymbolTable->IsPopup(); + TBool ret = iSymbolTable->IsPopup() | iNumSymbolTable->IsPopup(); + return ret; } // -------------------------------------------------------------------------- @@ -1387,7 +1431,7 @@ // TBool CPeninputFingerHwrArWnd::IsCandidateShowup() { - if(!iCandidateList->Hiden() || !iNumCandidateList->Hiden()) + if(!iCandidateList->Hiden()) { return ETrue; } @@ -1423,5 +1467,30 @@ return isFound; } - + +// --------------------------------------------------------------------------- +// accept editor's number mapping restriction. +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArWnd::SetNumericMapping( const TDesC& aNumMapping ) + { + iNumSymbolTable->SetNumericMapping(aNumMapping); + } +// --------------------------------------------------------------------------- +// set native number mode on or off. +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArWnd::SetNativeNumMode(const TBool aIsNativeNumMode) + { + iNumSymbolTable->SetNativeNumMode(aIsNativeNumMode); + } +// --------------------------------------------------------------------------- +// set icf language. +// --------------------------------------------------------------------------- +// +void CPeninputFingerHwrArWnd::SetIcfLanguage( TInt aLang ) + { + iContextField->SetLanguageId(aLang); + } + // End Of File diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericitut/src/peninputgenericitutwindow.cpp --- a/textinput/peninputgenericitut/src/peninputgenericitutwindow.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericitut/src/peninputgenericitutwindow.cpp Tue May 25 13:03:44 2010 +0300 @@ -1250,7 +1250,9 @@ iDataMgr->RequestData( ESpellIndiPaneWithoutTextRect )); TRect iconRect = TItutDataConverter::AnyToRect( iDataMgr->RequestData( ESpellIndiIconWithoutTextRect )); - TSize offset( 0, 6 ); + TSize offset; + offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY; + offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX; TSize size( iconRect.Width(), iconRect.Height()); iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); @@ -1856,7 +1858,6 @@ // reconstruct shift icon when skin changed TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ReConstructL()); - TRAP_IGNORE(iStandardItutKp->StarIcon()->ReConstructL()); if ( iDataMgr->IsPortraitWest()) { TRAP_IGNORE(iStandardItutKp->StarIcon()->ReConstructL()); @@ -2152,7 +2153,9 @@ iDataMgr->RequestData( EIndiPaneWithTextRect )); TRect iconRect = TItutDataConverter::AnyToRect( iDataMgr->RequestData( EIndiIconWithTextRect )); - TSize offset( 60, 6 ); + TSize offset; + offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY; + offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX; TSize size( iconRect.Width(), iconRect.Height()); iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); @@ -2170,7 +2173,9 @@ iDataMgr->RequestData( EIndiPaneWithoutTextRect )); TRect iconRect = TItutDataConverter::AnyToRect( iDataMgr->RequestData( EIndiIconWithoutTextRect )); - TSize offset( 0, 6 ); + TSize offset; + offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY; + offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX; TSize size( iconRect.Width(), iconRect.Height()); iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericitut/src/peninputitutwesternuistatespelling.cpp --- a/textinput/peninputgenericitut/src/peninputitutwesternuistatespelling.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericitut/src/peninputitutwesternuistatespelling.cpp Tue May 25 13:03:44 2010 +0300 @@ -359,7 +359,9 @@ iOwner->DataMgr()->RequestData( ESpellIndiPaneWithoutTextRect )); TRect iconRect = TItutDataConverter::AnyToRect( iOwner->DataMgr()->RequestData( ESpellIndiIconWithoutTextRect )); - TSize offset( 0, 6 ); + TSize offset; + offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY; + offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX; TSize size( iconRect.Width(), iconRect.Height()); iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericitut/srcdata/peninputitutconfig_chinese.rss --- a/textinput/peninputgenericitut/srcdata/peninputitutconfig_chinese.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericitut/srcdata/peninputitutconfig_chinese.rss Tue May 25 13:03:44 2010 +0300 @@ -912,7 +912,7 @@ colormajorskinid=EAknsMajorSkin; textcolorgrp=EAknsMinorQsnTextColors; - textcoloridx=59; + textcoloridx=64; bordercolormajorskinid=EAknsMajorSkin; bordercolorgrp=EAknsMinorQsnOtherColors; @@ -979,7 +979,7 @@ colormajorskinid=EAknsMajorSkin; textcolorgrp=EAknsMinorQsnTextColors; - textcoloridx=59; + textcoloridx=64; bordercolormajorskinid=EAknsMajorSkin; bordercolorgrp=EAknsMinorQsnOtherColors; @@ -1051,7 +1051,7 @@ colormajorskinid=EAknsMajorSkin; textcolorgrp=EAknsMinorQsnTextColors; - textcoloridx=59; + textcoloridx=64; bordercolormajorskinid=EAknsMajorSkin; bordercolorgrp=EAknsMinorQsnOtherColors; @@ -1120,7 +1120,7 @@ colormajorskinid=EAknsMajorSkin; textcolorgrp=EAknsMinorQsnTextColors; - textcoloridx=59; + textcoloridx=64; bordercolormajorskinid=EAknsMajorSkin; bordercolorgrp=EAknsMinorQsnOtherColors; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericvkb/inc/peninputgenericvkblayout.h --- a/textinput/peninputgenericvkb/inc/peninputgenericvkblayout.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericvkb/inc/peninputgenericvkblayout.h Tue May 25 13:03:44 2010 +0300 @@ -194,6 +194,8 @@ * @return pointer of a HBufC storing the string in it */ HBufC* ReadTextInfoHBufCL( TUint16* aStartPtr, TInt aLength ); + + TBool TranslateMirrorUnicode( TUint16 aInputCode, TUint16& aOutputCode ); private: diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h --- a/textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h Tue May 25 13:03:44 2010 +0300 @@ -342,7 +342,7 @@ * @param aText The text to be displayed in ICF * @return None */ - void ShowTooltipL( const TDesC& aText ); + void ShowTooltipL( const TDesC& aText, TInt aLangCode = ELangTest ); /** * Hide tooltip of ICF diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp --- a/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp Tue May 25 13:03:44 2010 +0300 @@ -48,6 +48,8 @@ const TUint16 thaiUnicodeNew[KNumberOfDottedChar] = {0xF731,0xF733,0xF734,0xF735,0xF736,0xF737,0xF738,0xF739, 0xF73A,0xF747,0xF748,0xF749,0xF74A,0xF74B,0xF74C,0xF74D}; +const TInt KNumberOfMirrorChar = 6; +const TUint16 mirrorUnicode[KNumberOfMirrorChar] = {0x0029,0x005D,0x003E,0x003C,0x005B,0x0028}; _LIT(KDisplaySpace, "\x0020"); _LIT(KEmptyString, ""); @@ -221,6 +223,7 @@ break; case ECmdPenInputLanguage: { + iDataMgr->SetData( EPeninputDataTypeInputLanguage, aData ); vkbWindow->SetSwitchlistLanguage(*aData); vkbWindow->SetDeadKey(); if ( iLayoutType == EPluginInputModeFSQ ) @@ -493,6 +496,9 @@ break; } } + + isDottedChar = TranslateMirrorUnicode( inputCode, outputCode ); + if (isDottedChar) { number->Des().Append( outputCode ); @@ -505,6 +511,29 @@ } } +TBool CPeninputGenericVkbLayout::TranslateMirrorUnicode( TUint16 aInputCode, TUint16& aOutputCode ) + { + TBool isMirrorChar = EFalse; + TInt langCode = *( ( TInt* )(iDataMgr->RequestData( EPeninputDataTypeInputLanguage ))); + if (( langCode != ELangArabic ) && + ( langCode != ELangHebrew ) && + ( langCode != ELangFarsi ) && + ( langCode != ELangUrdu )) + { + return isMirrorChar; + } + for (TInt i = 0; i < KNumberOfMirrorChar; i++) + { + if (mirrorUnicode[i] == aInputCode) + { + aOutputCode = mirrorUnicode[KNumberOfMirrorChar - i - 1]; + isMirrorChar = ETrue; + break; + } + } + return isMirrorChar; + } + // --------------------------------------------------------------------------- // Handle show tooltip command. // --------------------------------------------------------------------------- @@ -531,7 +560,7 @@ if (tooltipText) { CleanupStack::PushL(tooltipText); - vkbWindow->ShowTooltipL(*tooltipText); + vkbWindow->ShowTooltipL(*tooltipText, *( ( TInt* )(iDataMgr->RequestData( EPeninputDataTypeInputLanguage )))); CleanupStack::PopAndDestroy(tooltipText); } } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp --- a/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp Tue May 25 13:03:44 2010 +0300 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -167,6 +168,81 @@ } } break; + case EPeninputLayoutEventMultiRangeLongPress: + { + const TInt range = CPeninputDataConverter::AnyToInt( + iLayoutContext->RequestData(EPeninputDataTypeCurrentRange)); + + const TInt langId = IntContext( EPeninputDataTypeInputLanguage ); + + if ( aCtrl->ControlId() == EPeninutWindowCtrlIdMultiRangeBtn ) + { + + if ( range == ERangeAccent ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) + { + ChangeRange(ERangeNative); + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) + { + ChangeRange(ERangeEnglish); + } + } + else if ( range == ERangeNative ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNativeNumber ) ) + { + + if ( langId != ELangArabic && langId != ELangFarsi + && langId != ELangUrdu && langId != ELangThai ) + { + ChangeRange(ERangeNativeNumber); + } + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNumber ) ) + { + if ( langId != ELangArabic && langId != ELangFarsi + && langId != ELangUrdu && langId != ELangThai ) + { + ChangeRange(ERangeNumber); + } + } + } + else if ( range == ERangeEnglish ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNumber ) ) + { + ChangeRange(ERangeNumber); + } + } + else if ( range == ERangeNativeNumber ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) + { + ChangeRange(ERangeNative); + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) + { + ChangeRange(ERangeEnglish); + } + } + else if ( range == ERangeNumber ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) + { + ChangeRange(ERangeNative); + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) + { + ChangeRange(ERangeEnglish); + } + } + + TRAP_IGNORE( UpdateRangeCtrlsL() ); + } + } + break; case EPeninputLayoutVkbEventResetShift: { HandleShiftAndCapslockBtnClicked(); @@ -1150,8 +1226,12 @@ resId = numberRangeResId; } - rangeBtn->SetResourceId( resId ); - rangeBtn->ConstructFromResourceL(); + if( rangeBtn->ResourceId() != resId ) + { + rangeBtn->SetResourceId( resId ); + rangeBtn->ConstructFromResourceL(); + } + rangeBtn->SetDimmed( count < 1 ); } @@ -1496,11 +1576,22 @@ } else { - button = CAknFepCtrlEventButton::NewL( UiLayout(), aControlId, - aEventId, aUnicode, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); + if ( aControlId == EPeninutWindowCtrlIdMultiRangeBtn ) + { + button = CAknFepCtrlLongPressButton::NewL( UiLayout(), aControlId, + aEventId, aUnicode, + KAknsIIDQsnFrFunctionButtonNormal, + KAknsIIDQsnFrFunctionButtonPressed, + KAknsIIDQsnFrFunctionButtonInactive ); + } + else + { + button = CAknFepCtrlEventButton::NewL( UiLayout(), aControlId, + aEventId, aUnicode, + KAknsIIDQsnFrFunctionButtonNormal, + KAknsIIDQsnFrFunctionButtonPressed, + KAknsIIDQsnFrFunctionButtonInactive ); + } } CleanupStack::PushL( button ); @@ -2479,7 +2570,7 @@ // Show tooltip of ICF // -------------------------------------------------------------------------- // -void CPeninputGenericVkbWindow::ShowTooltipL( const TDesC& aText ) +void CPeninputGenericVkbWindow::ShowTooltipL( const TDesC& aText, TInt aLangCode ) { CFepLayoutMultiLineIcf* icf = static_cast (Control(EPeninputWindowCtrlIdMultiLineICF)); @@ -2506,7 +2597,7 @@ tooltipRect.iBr = innerRect.iBr + TPoint( KTooltipRightMargin, KTooltipBottomMargin ); // Set tooltip rect in terms of inner rect - icf->ShowTooltipL( aText, tooltipRect ); + icf->ShowTooltipL( aText, tooltipRect, aLangCode ); } // -------------------------------------------------------------------------- @@ -2801,7 +2892,9 @@ TAknTextLineLayout textLine = iLafMgr->IndiText(); TRect bubbleRect = iLafMgr->IndiPaneRectWithText(); TRect iconRect = iLafMgr->IndiIconRectWithText(); - TSize offset( 60, 6 ); + TSize offset; + offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY; + offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX; TSize size( iconRect.Width(), iconRect.Height()); icf->MsgBubbleCtrl()->SetRect( bubbleRect ); @@ -2819,7 +2912,9 @@ { TRect bubbleRect = iLafMgr->IndiPaneRectWithoutText(); TRect iconRect = iLafMgr->IndiIconRectWithoutText(); - TSize offset( 0, 6 ); + TSize offset; + offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY; + offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX; TSize size( iconRect.Width(), iconRect.Height()); icf->MsgBubbleCtrl()->SetRect( bubbleRect ); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericvkb/srcdata/peninputvkbwindowconfiginfo_50.rss --- a/textinput/peninputgenericvkb/srcdata/peninputvkbwindowconfiginfo_50.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericvkb/srcdata/peninputvkbwindowconfiginfo_50.rss Tue May 25 13:03:44 2010 +0300 @@ -775,8 +775,8 @@ }, PENINPUT_LAYOUT_UNIT_KEY { - unicode=<0x200C>; - scancode=0x200C; + unicode=<0x0631>; + scancode=0x0631; beginrow=2; begincolumn=4; highlightbmpindex=0; @@ -784,8 +784,8 @@ }, PENINPUT_LAYOUT_UNIT_KEY { - unicode=<0x200D>; - scancode=0x200D; + unicode=<0x0630>; + scancode=0x0630; beginrow=2; begincolumn=5; highlightbmpindex=0; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputgenericvkb/srcdata/peninputvkbwindowconfiginfo_94.rss --- a/textinput/peninputgenericvkb/srcdata/peninputvkbwindowconfiginfo_94.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputgenericvkb/srcdata/peninputvkbwindowconfiginfo_94.rss Tue May 25 13:03:44 2010 +0300 @@ -739,8 +739,8 @@ }, PENINPUT_LAYOUT_UNIT_KEY { - unicode=<0x200C>; - scancode=0x200C; + unicode=<0x0642>; + scancode=0x0642; beginrow=2; begincolumn=0; highlightbmpindex=0; @@ -748,8 +748,8 @@ }, PENINPUT_LAYOUT_UNIT_KEY { - unicode=<0x200D>; - scancode=0x200D; + unicode=<0x0641>; + scancode=0x0641; beginrow=2; begincolumn=1; highlightbmpindex=0; @@ -766,8 +766,8 @@ }, PENINPUT_LAYOUT_UNIT_KEY { - unicode=<0x200E>; - scancode=0x200E; + unicode=<0x0633>; + scancode=0x0633; beginrow=2; begincolumn=3; highlightbmpindex=0; @@ -793,8 +793,8 @@ }, PENINPUT_LAYOUT_UNIT_KEY { - unicode=<0x200F>; - scancode=0x200F; + unicode=<0x0639>; + scancode=0x0639; beginrow=2; begincolumn=6; highlightbmpindex=0; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputsplititut/src/peninputsplititutwindow.cpp --- a/textinput/peninputsplititut/src/peninputsplititutwindow.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputsplititut/src/peninputsplititutwindow.cpp Tue May 25 13:03:44 2010 +0300 @@ -1683,7 +1683,9 @@ TRect iconRect = TItutDataConverter::AnyToRect( iDataMgr->RequestData( EIndiIconWithoutTextRect )); - TSize offset( 0, 6 ); + TSize offset; + offset.iHeight = iconRect.iTl.iY - bubbleRect.iTl.iY; + offset.iWidth = iconRect.iTl.iX - bubbleRect.iTl.iX; TSize size( iconRect.Width(), iconRect.Height()); iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp --- a/textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp Tue May 25 13:03:44 2010 +0300 @@ -57,6 +57,7 @@ #include "peninputsplitqwertylayout.h" #include +#include // Constants const TInt KPeninputVkbWndInvalidIndex = -1; @@ -481,7 +482,82 @@ switch ( aEventType ) { - case EEventButtonUp: + case EPeninputLayoutEventMultiRangeLongPress: + { + const TInt range = CPeninputDataConverter::AnyToInt( + iLayoutContext->RequestData(EPeninputDataTypeCurrentRange)); + + const TInt langId = CPeninputDataConverter::AnyToInt( + iLayoutContext->RequestData(EPeninputDataTypeInputLanguage)); + + if ( aCtrl->ControlId() == EPeninutWindowCtrlIdRangeBtn ) + { + if ( range == ERangeAccent ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) + { + ChangeRange(ERangeNative); + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) + { + ChangeRange(ERangeEnglish); + } + } + else if ( range == ERangeNative ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNativeNumber ) ) + { + + if ( langId != ELangArabic && langId != ELangFarsi + && langId != ELangUrdu && langId != ELangThai ) + { + ChangeRange(ERangeNativeNumber); + } + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNumber ) ) + { + if ( langId != ELangArabic && langId != ELangFarsi + && langId != ELangUrdu && langId != ELangThai ) + { + ChangeRange(ERangeNumber); + } + } + } + else if ( range == ERangeEnglish ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNumber ) ) + { + ChangeRange(ERangeNumber); + } + } + else if ( range == ERangeNativeNumber ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) + { + ChangeRange(ERangeNative); + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) + { + ChangeRange(ERangeEnglish); + } + } + else if ( range == ERangeNumber ) + { + if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeNative ) ) + { + ChangeRange(ERangeNative); + } + else if ( ConfigInfo()->RangeBarInfo()->FindRange( ERangeEnglish ) ) + { + ChangeRange(ERangeEnglish); + } + } + + TRAP_IGNORE( UpdateRangeCtrlsL() ); + } + } + break; + case EPeninputLayoutEventMultiRange: { if ( ctrlId == EPeninutWindowCtrlIdRangeBtn ) { @@ -1293,12 +1369,13 @@ // void CPeninputSplitQwertyWindow::AddRangeBarL() { - CAknFepCtrlCommonButton* button = CAknFepCtrlCommonButton::NewL( - UiLayout(), - EPeninutWindowCtrlIdRangeBtn, - KAknsIIDQsnFrFunctionButtonNormal, - KAknsIIDQsnFrFunctionButtonPressed, - KAknsIIDQsnFrFunctionButtonInactive ); + CAknFepCtrlLongPressButton* button = CAknFepCtrlLongPressButton::NewL( + UiLayout(), + EPeninutWindowCtrlIdRangeBtn, + 0xffff, 0, + KAknsIIDQsnFrFunctionButtonNormal, + KAknsIIDQsnFrFunctionButtonPressed, + KAknsIIDQsnFrFunctionButtonInactive ); CleanupStack::PushL( button ); button->SetResourceId( R_PENINPUT_LAYOUT_VKB_RANGE_DEFAULT ); diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputvkbcn/ctrlsrc/peninputvkbcompositionfield.cpp --- a/textinput/peninputvkbcn/ctrlsrc/peninputvkbcompositionfield.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputvkbcn/ctrlsrc/peninputvkbcompositionfield.cpp Tue May 25 13:03:44 2010 +0300 @@ -783,7 +783,7 @@ UpdateTextL(); Draw(); - UpdateArea(Rect(),EFalse); + //UpdateArea(Rect(),EFalse); } // --------------------------------------------------------- diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputvkbcn/ctrlsrc/peninputvkbwindow.cpp --- a/textinput/peninputvkbcn/ctrlsrc/peninputvkbwindow.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputvkbcn/ctrlsrc/peninputvkbwindow.cpp Tue May 25 13:03:44 2010 +0300 @@ -206,6 +206,7 @@ // void CAknFepVkbWindow::ChangeImLayout(TInt aRange, TBool aChangeVkb) { + UiLayout()->DisableLayoutDrawing(ETrue); TInt imLayout = iDataProvider->RequestData(EAknFepDataTypeIMLayout); if ( iArrowLeftButton ) @@ -219,6 +220,7 @@ iClientArea->ChangeImLayout(aRange, aChangeVkb); SizeChangedForTitle(); + UiLayout()->DisableLayoutDrawing(EFalse); Draw(); } diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputvkbcn/src/peninputvkblayout.cpp --- a/textinput/peninputvkbcn/src/peninputvkblayout.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputvkbcn/src/peninputvkblayout.cpp Tue May 25 13:03:44 2010 +0300 @@ -254,6 +254,7 @@ case ECmdPenInputWindowClose: iVkbWindow->Hide(ETrue); LayoutOwner()->Hide(ETrue); + iVkbWindow->HideTooltipOnFSQ(); break; case ECmdPenInputRange: SetCurrentRange(*data); @@ -605,6 +606,13 @@ case EVkbEventCompFieldNoChars: SendEventToVkbControl(EVkbEventComposition2Standby,NULL); + SendEventToVkbControl( aEventType, aCtrl, aEventData ); + if ( iUiStateMgr ) + { + iUiStateMgr->SetCurrentUiState( iUiStateMgr->UiStateStandbycn()); + ForceEditGainFocus( EInputContextFieldGetFocus ); + } + break; case EVkbEventClearContent: SendEventToVkbControl(aEventType,aCtrl,aEventData); break; diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputvkbcn/src/peninputvkbuistatecompositionwithchars.cpp --- a/textinput/peninputvkbcn/src/peninputvkbuistatecompositionwithchars.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputvkbcn/src/peninputvkbuistatecompositionwithchars.cpp Tue May 25 13:03:44 2010 +0300 @@ -124,27 +124,9 @@ // ----------------------------------------------------------------------------- // TBool CAknFepVkbUiStateCompositionWithChars::HandleBackEvent(TInt /*aEventType*/, - const TDesC& aEventData) - { - TInt lengthPendown = iContext->RequestData(EAknFepDataTypeLengthWhenButtondownOnBack); - - TInt* data = (TInt*) aEventData.Ptr(); - - //Get the flag of pen up or timer out, true when timer out, false when pen up - data++; - - if ( 1 >= iContext->CompositionFieldStringLength() ) // if no chars - { - iContext->SendEventToVkbControl(EVkbEventComposition2Standby,NULL); - - if ( *data == EFalse ) // pen up - { - iUiStateMgr->SetCurrentUiState(iUiStateMgr->UiStateStandbycn()); - iContext->ForceEditGainFocus(EInputContextFieldGetFocus); - } - } - return EFalse; // If no chars, needn't send to composition again - + const TDesC& /*aEventData*/) + { + return EFalse; // If no chars, needn't send to composition again } // ----------------------------------------------------------------------------- diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp --- a/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp Tue May 25 13:03:44 2010 +0300 @@ -15,8 +15,8 @@ * */ -#include -#include +#include +#include #include #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102072F3.rss --- a/textinput/ptienginev2/languages/102072F3.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102072F3.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818A5.rss --- a/textinput/ptienginev2/languages/102818A5.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818A5.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818A6.rss --- a/textinput/ptienginev2/languages/102818A6.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818A6.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818A7.rss --- a/textinput/ptienginev2/languages/102818A7.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818A7.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818A8.rss --- a/textinput/ptienginev2/languages/102818A8.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818A8.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818A9.rss --- a/textinput/ptienginev2/languages/102818A9.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818A9.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818AA.rss --- a/textinput/ptienginev2/languages/102818AA.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818AA.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818AB.rss --- a/textinput/ptienginev2/languages/102818AB.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818AB.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818AC.rss --- a/textinput/ptienginev2/languages/102818AC.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818AC.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818AD.rss --- a/textinput/ptienginev2/languages/102818AD.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818AD.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818AE.rss --- a/textinput/ptienginev2/languages/102818AE.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818AE.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818AF.rss --- a/textinput/ptienginev2/languages/102818AF.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818AF.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818B0.rss --- a/textinput/ptienginev2/languages/102818B0.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818B0.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818B1.rss --- a/textinput/ptienginev2/languages/102818B1.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818B1.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818B2.rss --- a/textinput/ptienginev2/languages/102818B2.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818B2.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818B9.rss --- a/textinput/ptienginev2/languages/102818B9.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818B9.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818BA.rss --- a/textinput/ptienginev2/languages/102818BA.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818BA.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818BB.rss --- a/textinput/ptienginev2/languages/102818BB.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818BB.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/102818BC.rss --- a/textinput/ptienginev2/languages/102818BC.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/102818BC.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B72.rss --- a/textinput/ptienginev2/languages/10281B72.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B72.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B74.rss --- a/textinput/ptienginev2/languages/10281B74.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B74.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B76.rss --- a/textinput/ptienginev2/languages/10281B76.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B76.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B78.rss --- a/textinput/ptienginev2/languages/10281B78.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B78.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B7A.rss --- a/textinput/ptienginev2/languages/10281B7A.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B7A.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B7C.rss --- a/textinput/ptienginev2/languages/10281B7C.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B7C.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B7E.rss --- a/textinput/ptienginev2/languages/10281B7E.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B7E.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B80.rss --- a/textinput/ptienginev2/languages/10281B80.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B80.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B82.rss --- a/textinput/ptienginev2/languages/10281B82.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B82.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B84.rss --- a/textinput/ptienginev2/languages/10281B84.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B84.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B88.rss --- a/textinput/ptienginev2/languages/10281B88.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B88.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B89.rss --- a/textinput/ptienginev2/languages/10281B89.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B89.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B8D.rss --- a/textinput/ptienginev2/languages/10281B8D.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B8D.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B8E.rss --- a/textinput/ptienginev2/languages/10281B8E.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B8E.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B8F.rss --- a/textinput/ptienginev2/languages/10281B8F.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B8F.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B90.rss --- a/textinput/ptienginev2/languages/10281B90.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B90.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B92.rss --- a/textinput/ptienginev2/languages/10281B92.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B92.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B93.rss --- a/textinput/ptienginev2/languages/10281B93.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B93.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B94.rss --- a/textinput/ptienginev2/languages/10281B94.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B94.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B95.rss --- a/textinput/ptienginev2/languages/10281B95.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B95.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B96.rss --- a/textinput/ptienginev2/languages/10281B96.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B96.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10281B97.rss --- a/textinput/ptienginev2/languages/10281B97.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10281B97.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10282545.rss --- a/textinput/ptienginev2/languages/10282545.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10282545.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10282547.rss --- a/textinput/ptienginev2/languages/10282547.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10282547.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10282549.rss --- a/textinput/ptienginev2/languages/10282549.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10282549.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/1028255C.rss --- a/textinput/ptienginev2/languages/1028255C.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/1028255C.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10282562.rss --- a/textinput/ptienginev2/languages/10282562.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10282562.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/10282568.rss --- a/textinput/ptienginev2/languages/10282568.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/10282568.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/2000B17D.rss --- a/textinput/ptienginev2/languages/2000B17D.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/2000B17D.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/2001FDFA.rss --- a/textinput/ptienginev2/languages/2001FDFA.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/2001FDFA.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/2002BC83.rss --- a/textinput/ptienginev2/languages/2002BC83.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/2002BC83.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/languages/2002BC85.rss --- a/textinput/ptienginev2/languages/2002BC85.rss Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/languages/2002BC85.rss Tue May 25 13:03:44 2010 +0300 @@ -26,8 +26,8 @@ -#include -#include +#include +#include RESOURCE REGISTRY_INFO theInfo diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/src/PtiDefaultCore.cpp --- a/textinput/ptienginev2/src/PtiDefaultCore.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/src/PtiDefaultCore.cpp Tue May 25 13:03:44 2010 +0300 @@ -22,7 +22,7 @@ #include "PtiLanguage.h" #include "PtiEngine.h" #include "PtiKeyMappings.h" -#include +#include #include "PtiDefaultNumberModeMappingdata.h" #include diff -r c8fb4cf7b3ae -r 5e18d8c489d6 textinput/ptienginev2/src/PtiEngineImpl.cpp --- a/textinput/ptienginev2/src/PtiEngineImpl.cpp Tue May 11 16:31:42 2010 +0300 +++ b/textinput/ptienginev2/src/PtiEngineImpl.cpp Tue May 25 13:03:44 2010 +0300 @@ -23,7 +23,7 @@ #include "PtiEngineImpl.h" #include "PtiDefaultCore.h" #include "PtiLanguage.h" -#include +#include #include "PtiUserDicEntry.h" #include "PtiEngine.h" #include "PtiKeyMappings.h" @@ -149,6 +149,8 @@ aMainCode = ELangSpanish; break; case ELangEnglish_Taiwan: + case ELangEnglish_HongKong: + case ELangEnglish_Prc: aMainCode = ELangEnglish; break; default: