fep/aknfep/inc/AknFepManager.h
branchRCL_3
changeset 44 ecbabf52600f
child 50 5a1685599b76
equal deleted inserted replaced
43:ebd48d2de13c 44:ecbabf52600f
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:           
       
    15 *       Provides the CAknFepManager definition.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #ifndef __AKN_FEP_MANAGER_H__
       
    31 #define __AKN_FEP_MANAGER_H__
       
    32 
       
    33 #include "AknFepGlobalEnums.h"          //TKeyPressLength
       
    34 #include "AknFepManagerUIInterface.h"   //MAknFepManagerUIInterface
       
    35 #include "AknFepLanguageManager.h"      //CAknFepLanguageManager
       
    36 #include <gulicon.h>  
       
    37 #include "aknfepuiinterface.h"
       
    38 #include "aknfepuimenus.h"
       
    39 #include <fepbase.h>                    //CCoeFep
       
    40 #include <coeinput.h>                   //TCoeInputCapabilities
       
    41 #include <fepitfr.h>                    //MFepInlineTextFormatRetriever
       
    42 #include <aknedstsobs.h>                //MAknEdStateObserver
       
    43 #include <uikon.hrh>                    //TAknEditorNumericKeymap
       
    44 #include <aknEditStateIndicator.h>      //TAknEditingState
       
    45 #include <frmtlay.h>
       
    46 #include <biditext.h>
       
    47 #include <PtiDefs.h>
       
    48 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    49 #include <tagmalayoutandsource.h>
       
    50 #endif
       
    51 
       
    52 #include <aknextendedinputcapabilities.h>
       
    53 #ifdef RD_SCALABLE_UI_V2
       
    54 #include <peninputclient.h>
       
    55 #endif //#ifdef RD_SCALABLE_UI_V2
       
    56 
       
    57 #include <AknNullService.h>             // CAknNullService
       
    58 #include <AknServerApp.h>               // MAknServerAppExitObserver
       
    59 #include <aknfeppensupportinterface.h>
       
    60 #include "avkon.hrh"
       
    61 #ifdef RD_HINDI_PHONETIC_INPUT	
       
    62 #include <PtiIndicDefs.h>
       
    63 #endif
       
    64 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
    65 // Predictive QWERTY (XT9) changes ---->
       
    66 class MAknFepUiWordPopupContent;
       
    67 #include "AknFepCandidatePopup.h"
       
    68 #include "AknFepCandidatePopupCallback.h"
       
    69 // Predictive QWERTY (XT9) changes <----
       
    70 #endif //RD_INTELLIGENT_TEXT_INPUT
       
    71 class CAknFepPluginManager;
       
    72 class CAknFepKeyCatcherInterface;
       
    73 class MAknFepManagerInterface;
       
    74 class CAknFepIndicator;
       
    75 class CAknEdwinState;
       
    76 class CPeriodic;
       
    77 class MAknEditingStateIndicator;
       
    78 class CAknFepCaseManager;
       
    79 class CAknFepHashKeyManager;
       
    80 class CAknKeySoundSystem;
       
    81 class CPtiEngine;
       
    82 class CAknFepSharedDataInterface;
       
    83 class CApaDocument; // User Dictionary
       
    84 class CAknFepInlineTextDecorator;
       
    85 class CTextView;
       
    86 class MPeninputServerEventHandler;
       
    87 class MAknFepDocumentNavigation;
       
    88 class CAknFepUIInterface;
       
    89 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
    90 class CAknFepFnKeyManager;
       
    91 #endif
       
    92 //phrase creation
       
    93 class CZhuyinKeyHandler;
       
    94 class CAknFepZhuyinAnalyser;
       
    95 class CZhuyinAnalyserDbFeed;
       
    96 //User DB view
       
    97 class CAknFepUserdbDlg;
       
    98 class CAknFepThaiSCTSelector;
       
    99 class CAknNavigationDecorator;
       
   100 // This could be moved inside FepManager class?
       
   101 enum TWesternNaviEvent
       
   102     {
       
   103     ENullNaviEvent,
       
   104     ELeftNaviEvent,
       
   105     ERightNaviEvent,
       
   106     EBackspaceEvent,
       
   107     EUpNaviEvent,
       
   108     EDownNaviEvent
       
   109     };
       
   110 enum TSpecialTextField
       
   111 		{
       
   112  		/**
       
   113  		* Constraints
       
   114  		*/
       
   115     ESplAny,
       
   116     ESplMailAddr,
       
   117     ESplNumeric,
       
   118     ESplPhoneNumber,
       
   119     ESplUrl,
       
   120     ESplDecimal,
       
   121     /**
       
   122      * Modifiers
       
   123      */
       
   124     ESplPassword=0x10000,
       
   125     ESplUneditable=0x20000,
       
   126     ESplSensitive=0x40000,
       
   127     ESplNonPredictive=0x80000,
       
   128     ESPlInitialCapsWord=0x100000,
       
   129     ESplInitialCapsWordSentence=0x200000,
       
   130     ESplConstraintMask=0xFFFF
       
   131  		};    
       
   132 
       
   133 const TInt KChrKeyMultitapTimeout = 1000000;
       
   134 const TInt KFnKeyLongPressTimeout = 600000;
       
   135 /**
       
   136  * Translates ET9Eng language codes into localised descriptors and command Id's
       
   137  */
       
   138 class TFepLanguageTranslation
       
   139     {
       
   140     public:
       
   141         void ReadFromResource(TResourceReader& aReader);
       
   142     public:
       
   143         TPtrC           iName;
       
   144         TInt            iLanguageId;
       
   145         TInt            iCommandId;
       
   146     };
       
   147 class CChrMultiTapTimer : public CTimer
       
   148     {
       
   149     public:
       
   150         static CChrMultiTapTimer* NewL(TCallBack aCallback);
       
   151         void After(TTimeIntervalMicroSeconds32 aInterval);
       
   152     private:
       
   153         CChrMultiTapTimer(TCallBack aCallback);
       
   154         void ConstructL();
       
   155         // from CActive
       
   156         virtual void RunL();
       
   157     private:
       
   158         TCallBack iCallback;
       
   159     };
       
   160 /**
       
   161  * The CCoeFep derived class of AknFep
       
   162  * Controls mode in the Fep. Handles all interaction with the editor
       
   163  * Creates and owns the UI Manger, the Key Catcher and the edit state indicators
       
   164  */
       
   165 class CAknFepManager :
       
   166     public CCoeFep,
       
   167     public MAknFepManagerUIInterface,
       
   168     public MFepInlineTextFormatRetriever,
       
   169     public MFepPointerEventHandlerDuringInlineEdit,
       
   170     public MAknFepUiInterfaceMenuObserver,
       
   171     public MAknServerAppExitObserver,   //embedding
       
   172     private MAknEdStateObserver,
       
   173 #ifdef RD_SCALABLE_UI_V2  
       
   174     public CAknExtendedInputCapabilities::MAknEventObserver,
       
   175 #endif
       
   176     private MFormCustomDraw
       
   177 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   178     ,public MAknFepCandidatePopupCallback // Predictive QWERTY (XT9) changes
       
   179 #endif //RD_INTELLIGENT_TEXT_INPUT
       
   180     {
       
   181 
       
   182 private:
       
   183     class TTextDirectionalInfo
       
   184         {
       
   185         public:
       
   186 
       
   187             enum TTextDirectionalStatus
       
   188                 {
       
   189                 EUnknown,
       
   190                     ENotInDocument,
       
   191                     ENoDirectionalChunks,
       
   192                     ERightToLeft,
       
   193                     ELeftToRight
       
   194                 };
       
   195 
       
   196             enum TDirectionalBlockEnvironment
       
   197                 {
       
   198                 EUndefined,
       
   199                     EInsideBlock,
       
   200                     EAtRightEndOfLine,
       
   201                     EAtLeftEndOfLine,
       
   202                     EAtRightEndOfBlockFacingOppositeDirectionalBlock,
       
   203                     EAtLeftEndOfBlockFacingOppositeDirectionalBlock,
       
   204                     EAtRightEndOfBlockFacingSameDirectionBlock,
       
   205                     EAtLeftEndOfBlockFacingSameDirectionBlock
       
   206                 };
       
   207         public:
       
   208             // Constructor
       
   209             TTextDirectionalInfo();
       
   210             void SetDirectionFromChunk( const CTmTextLayout::TTmChunkDescription& aChunk);
       
   211         public:
       
   212             TTextDirectionalStatus iDirectionalStatus;
       
   213             TDirectionalBlockEnvironment iBlockEnvironment;
       
   214         };
       
   215 
       
   216 public:
       
   217     /**
       
   218      * values for the flags required to maintain the internal
       
   219      * state of the Fep Manager during operation
       
   220      */
       
   221     enum
       
   222         {
       
   223         EFlagInsideMultitapInlineEditingTransaction     =0x00000001,
       
   224         EFlagLaunchEditMenu                             =0x00000002,
       
   225         EFlagLongShiftKeyPress                          =0x00000004,
       
   226         EFlagNoActionDuringShiftKeyPress                =0x00000008,
       
   227         EFlagShiftKeyDepressed                          =0x00000010,
       
   228         EFlagInsideInlineEditingTransaction             =0x00000020,
       
   229         EFlagPassNextKey                                =0x00000040,
       
   230         EFlagQwertyChrKeyDepressed                      =0x00000080,  // Not used. Qwerty mode is not supported.
       
   231         EFlagLineFeedCharacter                          =0x00000100,
       
   232         EFlagEditorFull                                 =0x00000200,
       
   233         EFlagNewSharedDataInputMode                     =0x00000400,
       
   234         EFlagNoActionDuringChrKeyPress                  =0x00000800,
       
   235 
       
   236         EFlagSupressAutoUpdateAtEditorStart             =0x00001000,
       
   237         EFlagNoMatches                                  =0x00002000,
       
   238         EFlagSuppressInputStateChange                   =0x00004000,
       
   239         EFlagCompoundWord                               =0x00008000,
       
   240         EFlagChangeInputMode                            =0x00010000,
       
   241         EFlagForegroundUIComponentVisible               =0x00020000,
       
   242         EFlagMenuPaneVisible                            =0x00040000,
       
   243         EFlagRemoveMatchesMenuItem                      =0x00080000,
       
   244         EFlagInlineEditInBackground                     =0x00100000,
       
   245         EFlagNewSharedDataInputLanguage                 =0x00200000,
       
   246         EFlagLastCharacterInEditor                      =0x00400000,
       
   247 
       
   248         EFlagSpaceCharacter                             =0x00800000,        // adding for japanese
       
   249         EFlagFullWidthSpaceCharacter                    =0x01000000,        // adding for japanese
       
   250         EFlagBidiCursorIsInitialized                    =0x02000000,
       
   251         EFlagCursorPointsRightToLeft                    =0x04000000,
       
   252         EFlagAtDirectionallyAmbiguousPoint              =0x08000000,
       
   253         EFlagCharacterAdded                             =0x10000000,
       
   254         EFlagNoInlineEditFormatting                     =0x20000000,  // Not really used yet!
       
   255         EFlagQwertyShiftMode                            =0x40000000,  // Not used. Qwerty mode is not supported.
       
   256         EFlagSupressAutoUpdate                          =0x80000000
       
   257         };
       
   258     
       
   259      enum
       
   260      	{
       
   261 		EExtendedFlagShortPressHashKey                    =0x00000001,
       
   262      	EExtendedFlagNoModeChange                         =0x00000002,
       
   263      	EExtendedFlagShiftReleasedOnPopup                 =0x00000004,
       
   264      	EExtendedFlagOkKeyPressOnCandidatePopup           =0x00000008,
       
   265      	/* Flag to take care of graceful exit for FEP launched dialog when the underneath editor is closed */
       
   266         EExtendedFlagEdwinEditorDestroyed                 =0x00000010,
       
   267         /* Flag to set decide when to set multiple observer for FEP. Set this flag whenever a FEP aware dialog is launched */
       
   268         EExtendedFlagFepAwareDialogLaunched               =0x00000020,
       
   269         /* Flag to specify that pointer event type EDrag has happened */ 
       
   270         EExtendedFlagPointerEventTypeEDrag                =0x00000040
       
   271     	};		
       
   272 
       
   273     //public constants
       
   274 
       
   275     enum
       
   276         {
       
   277         ESingleCharacter                            =1,
       
   278         EMaximumFepWordLength                       =63
       
   279         };
       
   280 
       
   281 private:
       
   282     /**
       
   283      * private constants
       
   284      */
       
   285     enum
       
   286         {
       
   287         EShiftKeyRepeatDelay                        =800000, // 0.8s
       
   288         EQueryBufferLength                          =63,
       
   289         EDefaultNumericCharMapResId                 =0,
       
   290         EDefaultSCTResourceId                       =-1,
       
   291         ENoCharacters                               =0,
       
   292         EAknFepUid                                  =0x100056de,
       
   293         EStarKeyUnicodeValue                        =0x2A,
       
   294         EHashKeyUnicodeValue                        =0x23,
       
   295         ELeftSoftkeyIndex                           =CAknFepUIInterface::ELeftSoftkeyIndex,
       
   296         ERightSoftkeyIndex                          =CAknFepUIInterface::ERightSoftkeyIndex,
       
   297         EMiddleSoftkeyIndex                         =CAknFepUIInterface::EMiddleSoftkeyIndex,
       
   298         EWordConcatenationTimeout                   =2000000, // 2.0s
       
   299         ELanguageArrayGranularity                   =20,
       
   300         EChrKeyRepeatDelay                          =1000000, // 1.0s
       
   301         EHalfQwertyChrKeyRepeatDelay                =600000   //0.6 secs from Default actions UI spec
       
   302         };
       
   303 
       
   304     enum TChineseFepCursorType
       
   305         {
       
   306         EActive,
       
   307         EPassive
       
   308         };
       
   309         
       
   310 public:            
       
   311 	enum
       
   312 		{
       
   313 		ECcpuStateNone       = 0,
       
   314 		ECcpuStateStartCopy  = 0x01,
       
   315 		ECcpuStateCopy       = 0x02,	
       
   316 		ECcpuStateStartCut   = 0x04,
       
   317 		ECcpuStateCut        = 0x08,
       
   318 		ECcpuStateButton     = 0x10,
       
   319 		ECcpuStatePosted               = 0x20,
       
   320 		ECcpuStateHashDown             = 0x40,
       
   321 		ECcpuStateSelectionEventPosted = 0x80,
       
   322 		ECcpuStateEdwinInSelectionMode = 0x100,
       
   323 		ECcpuStateIgnoreStarUp          = 0x200,
       
   324 		ECcpuSupressEditMenuFromShiftUp = 0x400,		
       
   325 		ECcpuStateCbaSymbol             = 0x800,
       
   326 		ECcpuStateIgnoreNextFocusChange = 0x1000,
       
   327 		ECcpuStataCommitPredictiveWord  = 0x2000,
       
   328 		ECcpuStateIgnoreNextEdwinSyncEvent = 0x4000,
       
   329 		ECcpuStateLosingFocus			   = 0x8000,	
       
   330 		ECcpuStateUncommitWhenFocused = 0x10000,				
       
   331         ECcpuStateHashKeyDeleteDone = 0x20000,
       
   332         ECcpuStateSupressCursorMoveToEnd = 0x40000,
       
   333         ECcpuStateChangeToPredictionMode = 0x80000,
       
   334 		ECcpuStateNewPredictiveWord = 0x100000,
       
   335 		ECcpuStateShiftkeyWasPressedBeforeLosingFocus = 0x200000,
       
   336 		ECcpuStateCbaShown = 0x400000
       
   337         };
       
   338 
       
   339 	enum TShowSctMode 
       
   340 	    {
       
   341 	    EShowSctFirst=0, 
       
   342 	    EShowPctFirst, 
       
   343 	    EShowSmileyFirst 
       
   344 	    };
       
   345 	
       
   346 private:
       
   347 	 // These are needed to remember editor's ccpu state 
       
   348 	 // for editing options submenu.
       
   349      enum
       
   350      	{
       
   351      	ECcpuStatusFlagCanCopy  = 0x01,
       
   352      	ECcpuStatusFlagCanCut   = 0x02,
       
   353      	ECcpuStatusFlagCanPaste = 0x04,     	
       
   354      	};
       
   355   
       
   356 
       
   357 private:
       
   358     class TLanguageCapabilities
       
   359         {
       
   360         public:
       
   361             TInt iInputLanguageCode;        // Symbian language code.
       
   362             TBool iLocalInputLanguageInUse;
       
   363             TBool iArabicIndicDigitsAllowed;
       
   364             TBool iEasternArabicIndicDigitsAllowed;
       
   365             TBool iIndicDigitsAllowed;	
       
   366             TDigitType iLocalDigitType;
       
   367             TDigitType iNumericEditorDigitType;
       
   368             TBool iSupportsCase;
       
   369             TBool iSupportsWesternPredictive;
       
   370 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   371             // Predictive QWERTY changes ---->
       
   372             TBool iSupportsWesternQwertyPredictive; // predicitve QWERTY
       
   373             // Predictive QWERTY changes <----
       
   374 #endif //RD_INTELLIGENT_TEXT_INPUT
       
   375             TBool iRightToLeftLanguage;
       
   376 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   377 #ifdef __HALF_QWERTY_KEYPAD            
       
   378             TBool iSupportsWesternHalfQwertyPredictive;
       
   379 #endif //__HALF_QWERTY_KEYPAD            
       
   380 #endif //RD_INTELLIGENT_TEXT_INPUT 
       
   381         };
       
   382 
       
   383 public:
       
   384     /**
       
   385      * C++ Constructor
       
   386      */
       
   387     CAknFepManager(CCoeEnv& aConeEnvironment);
       
   388 
       
   389     /**
       
   390      *  Second phase construction
       
   391      */
       
   392     void ConstructL(const CCoeFepParameters& aFepParameters);
       
   393 
       
   394     /**
       
   395      * destructor
       
   396      */
       
   397     virtual ~CAknFepManager();
       
   398 
       
   399 
       
   400 public: //from MAknFepManagerUIInterface
       
   401 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   402      /**
       
   403      Returns the keyboard layout
       
   404      */
       
   405      TPtiKeyboardType KeyboardLayout() const;
       
   406      /**
       
   407      Returns the current keyboard layout in use.
       
   408      */	 
       
   409      CAknFepFnKeyManager::TFnKeyState FnKeyState();
       
   410      void SetFnKeyState(CAknFepFnKeyManager::TFnKeyState aState);
       
   411     /**
       
   412      * Returns the resource ID of the numeric editor in use
       
   413      */
       
   414     
       
   415     TInt GetNumericSCTResID();
       
   416     
       
   417 
       
   418 #ifdef __REVERSE_FN_KEY_SUPPORTED
       
   419      /**
       
   420     Returns if the input is in reverse Fn key input mode.
       
   421     */
       
   422     virtual TBool IsReverseFnkeyInput();
       
   423     
       
   424     void SetReverseFnkeyInputMode(TBool iIsOn);
       
   425     
       
   426     /**
       
   427      * Returns true if the aChar is allowed in the numeric editor
       
   428      */
       
   429     TBool IsValidCharInNumericEditorL( TChar aChar ) const;
       
   430     
       
   431     /**
       
   432      * Filter the char for Fn reverse mode in case of
       
   433      * numeric editor. This function should call
       
   434      * in case of numeric editor reverse mapping.
       
   435      */
       
   436     TBool IsValidCharForNumericInFnReverseL(TInt aKey, TPtiTextCase aCase) ;
       
   437 
       
   438 #endif //__REVERSE_FN_KEY_SUPPORTED
       
   439     virtual void AddOneSpaceOrMoveCursorL();
       
   440 #endif
       
   441 	virtual TBool IsAllowedKeymappingForNumberMode(TChar aChar) const;
       
   442 	/**
       
   443      * closes the UI
       
   444      * commits any character in multitap
       
   445      */
       
   446     virtual TBool TryCloseUiL();
       
   447 
       
   448     /**
       
   449      * Used by the UI manager to inform the Fep Manager that the UI has activated.
       
   450      */
       
   451     virtual void SendUIActivatedNotification();
       
   452 
       
   453     /**
       
   454      * Used by the UI manager to inform the Fep Manger that the UI has not activated.
       
   455      */
       
   456     void SendUIDeActivatedNotification();
       
   457 
       
   458 
       
   459     /**
       
   460      * Plays sound
       
   461      */
       
   462     virtual void PlaySound(TAvkonSystemSID aSound) const;
       
   463     
       
   464     /**
       
   465      * Set current long clear key press
       
   466      */     
       
   467     virtual void SetLongClearAfterCloseUI(TBool aLongClear);
       
   468 
       
   469 	/**
       
   470 	 * Align the Logical and Visual cursor positions.
       
   471 	 *
       
   472      * @since 3.2
       
   473      * @param aType Cursor type.
       
   474      * @param aToLeft ETrue if the position to the left is to be found,
       
   475      *			 	  EFalse if the position to the right is to be found.
       
   476      * @return None
       
   477 	 */
       
   478 	void AlignLogicalAndVisualCursorL( TTmDocPosSpec::TType aType, TBool aToLeft );
       
   479 	
       
   480 	/**
       
   481 	 * This method removes the Repha character. The function goes to the 
       
   482 	 * start of the syllable, checks if repha character is present and 
       
   483 	 * removes it.
       
   484 	 *
       
   485 	 * @since 3.2
       
   486 	 * @param None.
       
   487 	 * @return None.
       
   488 	 */							
       
   489 	void RemoveRephaCharacterL();
       
   490 	
       
   491 	/**
       
   492 	 * Checks if the Repha character has been attached to the syllable
       
   493 	 *
       
   494 	 * @since 3.2
       
   495 	 * @param None.
       
   496 	 * @return ETrue if present else EFalse.
       
   497 	 */	
       
   498 	TBool IsRephaPresent();
       
   499 	
       
   500 	/**
       
   501 	 * Retrieve the Previous to previous character during multitapping.
       
   502 	 *
       
   503 	 * @since 3.2
       
   504 	 * @param aContextSensitive EFalse is the default parameter.
       
   505 	 *						    ETrue is used for requesting the function
       
   506 	 *						    to check for extraction of the character
       
   507 	 *						    two positions before the seleted text.
       
   508 	 *
       
   509 	 * @return The previous to previous character if any.
       
   510 	 */
       
   511 	TText PreviousToPreviousChar( TBool aContextSensitive = EFalse );
       
   512 
       
   513 	 /**
       
   514 	 * This method is called for removing the Rakar character. The function 
       
   515 	 * checks if Rakar (Virama+Ra)  is present.
       
   516 	 *
       
   517 	 * @since 3.2
       
   518 	 * @param None.
       
   519 	 * @return None.
       
   520 	 */
       
   521 	void RemoveRakarCharacterL();
       
   522 
       
   523     /**
       
   524 	 * This method is called for removing the N characters from the 
       
   525 	 * specified position. If the text to be removed is not yet
       
   526 	 * committed, it is updated with NULL descriptor and committed.
       
   527 	 *
       
   528 	 * @since 5.0
       
   529 	 * @param TInt aPos position to start searching from. By default
       
   530 	 *              Searching will start from the cursor position.
       
   531 	 * @param TInt aNumOfCharacters Number of characters to remove.
       
   532 	 * @param TBool Should cursor be positioned at the original location.
       
   533 	 * @return None.
       
   534 	 */
       
   535     void RemoveTextFromEditorL( TInt aNumOfCharacters, TInt aPos = 0, 
       
   536                                 TBool aIsToAlignCursor = ETrue );
       
   537     
       
   538    	/**
       
   539 	 * Align the Logical and Visual cursor positions.
       
   540 	 * Overloaded method which uses FindDocPos
       
   541 	 *
       
   542      * @since 5.0
       
   543      * @param None
       
   544      * @return None
       
   545 	 */
       
   546 	void AlignLogicalAndVisualCursorL();
       
   547 	
       
   548 	CAknFepPluginManager* PluginUIManager();
       
   549     //Phrase creation	
       
   550 	MZhuyinKeyHandler* ZhuyinKeyHandler();
       
   551 	CAknFepZhuyinAnalyser* ZhuyinAnalyser();
       
   552 	void UpdateStickyState();
       
   553 	
       
   554 #ifdef RD_MARATHI
       
   555 	/**
       
   556 	 * This function checks if the previous two characters are
       
   557 	 * the combination of Chandra-A
       
   558 	 *
       
   559 	 * @since 5.0
       
   560 	 * @param None
       
   561 	 * @return TBool.
       
   562 	 */
       
   563 	TBool IsChandraAPresentL();
       
   564 
       
   565 	/**
       
   566 	 * This function checks if the previous Chandra-A is present
       
   567 	 * before the cursor position
       
   568 	 *
       
   569 	 * @since 5.0
       
   570 	 * @param None
       
   571 	 * @return TBool.
       
   572 	 */
       
   573 	TBool IsEyeLashRaPresentL();
       
   574 #endif // RD_MARATHI
       
   575 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   576     /**
       
   577 	 * This function returns the current case.
       
   578 	 * Required for Shift key handling.
       
   579 	 *
       
   580 	 * @since 3.2
       
   581 	 * @param None
       
   582 	 * @return TBool.
       
   583 	 */
       
   584 	TInt GetCurrentCase();
       
   585 	
       
   586 	 /**
       
   587 	 * This function set the flag of chr composition key
       
   588 	 * in mini qwerty
       
   589 	 *
       
   590 	 * @since 3.2
       
   591 	 * @param aFlag ETrue if it is chr composition key.
       
   592 	 * @return None.
       
   593 	 */
       
   594 	void  SetComposChrFlag( TBool aFlag );
       
   595 	
       
   596 	/**
       
   597 	 * This function get the flag of chr composition key
       
   598 	 * in mini qwerty
       
   599 	 *
       
   600 	 * @since 3.2
       
   601 	 * @param None.
       
   602 	 * @return ETrue if it is chr composition key..
       
   603 	 */
       
   604 	TBool GetComposChrFlag();
       
   605 	/**
       
   606 	 * Hides the exact word popup.
       
   607 	 */
       
   608 	void HideExactWordPopUp();
       
   609 	/**
       
   610     * @return   ETrue   If the exact word pop up is shown.
       
   611     */
       
   612 	
       
   613 	TBool IsExactWordPopUpShown();		
       
   614 #endif
       
   615 #ifdef RD_HINDI_PHONETIC_INPUT
       
   616     //hindi_phonetic_fixes
       
   617    	/*
       
   618     * This functions toggles the case from upper to lower
       
   619     * @since 5.0
       
   620     * @param None
       
   621     * @return  void
       
   622     */
       
   623     virtual void HandleIndicCaseL();
       
   624 #endif
       
   625 
       
   626 public: //interface to the key catcher
       
   627     /**
       
   628      * Handles key events passed from the Key Catcher, excluding the shift key event
       
   629      * which is dealt with separately in the HandleShiftKeyEventL function.
       
   630      * State will always be Intital or UIActive.
       
   631      */
       
   632     TKeyResponse HandleKeyEventL(TUint aCode, TKeyPressLength aLength, TEventCode aEventCode = EEventKey);
       
   633 
       
   634     /**
       
   635      *  Shift keys are dealt with in a different way to other keys, the action is on the up
       
   636      *  key event.
       
   637      */
       
   638     TKeyResponse HandleShiftKeyEventL(TEventCode aEventCode);
       
   639 
       
   640     /**
       
   641      *  Thai 0 key is handled differently. If 0 key is up before long keypress, we show SCT.
       
   642      */
       
   643     TKeyResponse HandleThai0KeyEvent(TEventCode aEventCode, TKeyPressLength aLength, 
       
   644                                      TBool& aThai0KeyHandling);
       
   645 
       
   646     /**
       
   647      *  Chr key handling
       
   648      */
       
   649     TBool HandleQwertyChrKeyEventL( TEventCode aEventCode );
       
   650 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   651 #ifdef __HALF_QWERTY_KEYPAD
       
   652 	/**
       
   653 	*	Chr Key handling in half qwerty
       
   654 	*/
       
   655 	TKeyResponse HandleChrKeyForHalfQwertyL( TEventCode aEventCode);
       
   656 #endif //__HALF_QWERTY_KEYPAD
       
   657 #endif //RD_INTELLIGENT_TEXT_INPUT    
       
   658     /**
       
   659     *  Control key handling
       
   660     */
       
   661     TKeyResponse HandleQwertyControlKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode);
       
   662 
       
   663     /**
       
   664     * Handles key events for qwerty input mode.
       
   665     *
       
   666     * @since 3.0
       
   667     * @param aKeyEvent An event to be handled.
       
   668     * @param aResponse Repsonse (consumed / not consumed) will be stored here.
       
   669     * @return ETrue if evenat was handled by this method.
       
   670     *         EFalse otrherwise.
       
   671     */
       
   672     TBool HandleQwertyKeyEventL(const TKeyEvent& aKeyEvent, TKeyResponse& aResponse);
       
   673     
       
   674   	/**
       
   675     * Returns boolean value indicating whether it is ok to set edwin into "copy/paste"
       
   676     * mode.
       
   677     *    
       
   678     * @since 3.1
       
   679     * @return ETrue if it is ok to editor into selectuion mode.
       
   680     *         EFalse otherwise.
       
   681     */
       
   682 	TBool OkToActivateSelectionMode() const;    
       
   683 	
       
   684     /**                
       
   685     * Returns the status of arabic-indic digit mode setting.
       
   686     *
       
   687     * @since 3.0
       
   688     */
       
   689     TBool ArabicIndicDigitsInUse() const;    	
       
   690 	
       
   691 	/**                
       
   692     * Returns the status of Eastern arabic-indic digit mode setting.
       
   693     *
       
   694     * @since 3.0
       
   695     */
       
   696 	TBool EasternArabicIndicDigitsInUse() const;
       
   697 	void NumberModeChangeGSNotification();
       
   698 	void DimInputmodeMenuItems(CAknFepUiInterfaceMenuPane* aMenuPane);
       
   699 	 
       
   700 	 /**
       
   701      * Dims the item corresponding to the mode aMode, in the edit mode menu
       
   702      *
       
   703      * @param aMenuPane the edit menu pane
       
   704      * @param aMode the mode to be dimmed
       
   705      */
       
   706     void DimMenuItem(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aMode);
       
   707     
       
   708     TInt FepShowVkbPreviewStatus();
       
   709 
       
   710     TInt PluginInputMode() const;
       
   711 private: // from CCoeFep
       
   712     /**
       
   713      * from CCoeFep - not used
       
   714      */
       
   715     virtual void CancelTransaction();
       
   716 
       
   717     /**
       
   718      * from CCoeFep - not used
       
   719      */
       
   720     virtual void IsOnHasChangedState();
       
   721 
       
   722     /**
       
   723      * from CCoeFep - not used
       
   724      */
       
   725     virtual void OfferKeyEventL(TEventResponse& aEventResponse, const TKeyEvent& aKeyEvent, 
       
   726                                 TEventCode aEventCode);
       
   727 
       
   728     /**
       
   729      * from CCoeFep - not used
       
   730      */
       
   731     virtual void OfferPointerEventL(TEventResponse& aEventResponse, 
       
   732                                     const TPointerEvent& aPointerEvent, 
       
   733                                     const CCoeControl* aWindowOwningControl);
       
   734 
       
   735     /**
       
   736      * from CCoeFep - not used
       
   737      */
       
   738     virtual void OfferPointerBufferReadyEventL(TEventResponse& aEventResponse, 
       
   739                                                const CCoeControl* aWindowOwningControl);
       
   740 
       
   741 private:    // from MFepAttributeStorer (via CCoeFep)
       
   742     /**
       
   743      * from MFepAttributeStorer (via CCoeFep) - not used
       
   744      */
       
   745     virtual TInt NumberOfAttributes() const;
       
   746 
       
   747     /**
       
   748      * from MFepAttributeStorer (via CCoeFep) - not used
       
   749      */
       
   750     virtual TUid AttributeAtIndex(TInt aIndex) const;
       
   751 
       
   752     /**
       
   753      * from MFepAttributeStorer (via CCoeFep) - not used
       
   754      */
       
   755     virtual void WriteAttributeDataToStreamL(TUid aAttributeUid, RWriteStream& aStream) const;
       
   756 
       
   757     /**
       
   758      * from MFepAttributeStorer (via CCoeFep) - not used
       
   759      */
       
   760     virtual void ReadAttributeDataFromStreamL(TUid aAttributeUid, RReadStream& aStream);
       
   761 
       
   762 private:    // from MCoeForegroundObserver (via CCoeFep)
       
   763     /**
       
   764      * from MCoeForegroundObserver (via CCoeFep) - not used
       
   765      */
       
   766     virtual void HandleGainingForeground();
       
   767 
       
   768     /**
       
   769      * from MCoeForegroundObserver (via CCoeFep) - not used
       
   770      */
       
   771     virtual void HandleLosingForeground();
       
   772 
       
   773 private:        // from MCoeFocusObserver (via CCoeFep)
       
   774 
       
   775     virtual void HandleChangeInFocus();
       
   776 
       
   777     /**
       
   778      * in queries the editor is destroyed before the call to HandleChangeInFocus
       
   779      * so NULL the iInputCapabilities variables to prevent trying to save to an unreferenced object
       
   780      */
       
   781     virtual void HandleDestructionOfFocusedItem();
       
   782 
       
   783 public: // from MAknEdStateObserver
       
   784     /**
       
   785      * from MAknEdStateObserver - not used
       
   786      */
       
   787     virtual void HandleAknEdwinStateEventL(CAknEdwinState* aAknEdwinState, 
       
   788                                            EAknEdwinStateEvent aEventType);
       
   789 
       
   790 private:    // from MEikCommandObserver (via MAknFepUiInterfaceMenuObserver)
       
   791     /**
       
   792      * from MEikCommandObserver
       
   793      * Processes user commands, in this case only commands from the edit menu
       
   794      */
       
   795     virtual void ProcessCommandL(TInt aCommandId);
       
   796 
       
   797     /**
       
   798      * Constructs the component fully. This method is called when a
       
   799      * fep aware editor is first time focused for text input.
       
   800      */
       
   801     void ConstructFullyL();
       
   802 
       
   803     /**
       
   804      * Deletes the objects constructed with ConstructFullyL() method.
       
   805      */
       
   806     void CommonDestroyFep();
       
   807 
       
   808 private:    // from MAknFepUiInterfaceMenuObserver
       
   809     /*
       
   810      * not used as DynInitMenuPaneL() is now called before SetEmphasis() and HandleChangeInFocus()
       
   811      */
       
   812     virtual void SetEmphasis(CBase* aMenuControl,TBool aEmphasis);
       
   813 
       
   814     /**
       
   815      * removes app menu panes and adds the FEP edit menu pane to the menu bar
       
   816      */
       
   817     virtual void DynInitMenuBarL(TInt aResourceId,CAknFepUiInterfaceMenuBar* aMenuBar);
       
   818 
       
   819     /**
       
   820      * dynamically changes the edit menu depending on fep and editor state
       
   821      */
       
   822     virtual void DynInitMenuPaneL(TInt aResourceId,CAknFepUiInterfaceMenuPane* aMenuPane);
       
   823 
       
   824 private:        //from MFepPointerEventHandlerDuringInlineEdit
       
   825     /**
       
   826      * from MFepPointerEventHandlerDuringInlineEdit - not needed, has to be implemented for MCoeFepAwareTextEditor interface
       
   827      * No pointer in Chinese Series 60
       
   828      */
       
   829     virtual void HandlePointerEventInInlineTextL(TPointerEvent::TType aType, TUint aModifiers, 
       
   830                                                  TInt aPositionInInlineText);
       
   831 
       
   832 private:        //from MFepInlineTextFormatRetriever
       
   833     /**
       
   834      * from MFepInlineTextFormatRetriever - not needed, has to be implemented for MCoeFepAwareTextEditor interface
       
   835      */
       
   836     virtual void GetFormatOfFepInlineText(TCharFormat& aFormat, 
       
   837                                           TInt& aNumberOfCharactersWithSameFormat, 
       
   838                                           TInt aPositionOfCharacter) const;
       
   839 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   840 
       
   841 // Predictive QWERTY changes (XT9) ---->
       
   842 public:         
       
   843 	//from MAknFepCandidatePopupCallback ---->
       
   844     /**
       
   845     * Callback the get the current set of candidates
       
   846     * @param    aArray      An output parameter for the candidate strings
       
   847     * @param    aActiveIdx  An output parameter for the index of the 
       
   848     *                       currently active candidate
       
   849     */
       
   850     virtual void GetCandidatesL( CDesCArray& aArray, TInt& aActiveIdx );
       
   851 	
       
   852 	/**
       
   853 	* Callback get new position for candidate list
       
   854 	* @param aRect  New rect position for candidate list.
       
   855 	*/
       
   856     virtual void GetUpdateCandidatePositionL(TRect& aRect);
       
   857     
       
   858 	//from MAknFepManagerUIInterfaceWestern ---->
       
   859     
       
   860     /**
       
   861      * Function to get the text direction for current language.
       
   862      * @return ETrue if language id RTL, EFalse if it is not
       
   863      */
       
   864     TBool IsRightToLeftLanguage();
       
   865     TBool IsLanguageSupportPrediction();
       
   866 // Predictive QWERTY changes (XT9) <----
       
   867 #endif //RD_INTELLIGENT_TEXT_INPUT
       
   868 
       
   869 public:
       
   870 
       
   871     /**
       
   872      * Launches the mode selection menu
       
   873      */
       
   874     void LaunchSelectModeMenuL();
       
   875     
       
   876     /**
       
   877      * Launches the edit word query in western predictive text mode
       
   878      */
       
   879     void LaunchEditWordQueryL();
       
   880     
       
   881 	/**
       
   882 	* Returns the status of given extended input capability flag.
       
   883 	*/
       
   884     TUint ExtendedInputCapabilities() const;	
       
   885 
       
   886 	/**
       
   887 	* Exit plugin itut spell mode by press ok btn
       
   888 	*/
       
   889     void ExitPluginSpellModeByOk();
       
   890 
       
   891 	/**
       
   892 	* Exit plugin itut spell mode by press cancel btn
       
   893 	*/
       
   894     void ExitPluginSpellModeByCancel();
       
   895     
       
   896     void SynCCPSoftKey();
       
   897     
       
   898      /**
       
   899      * checks that the editor the editor has free space to add another character
       
   900      * An editor of unlimited length will return its maximum size as zero
       
   901      */
       
   902     TBool EditorHasFreeSpace( TInt aNumberOfCharacter = 0 ) const;
       
   903 		TBool IsSpecialNumericEditor();
       
   904 		
       
   905 	void TryPopExactWordInICFL();
       
   906     
       
   907     /**
       
   908      * checks whether the current editor is a Java Secret editor.
       
   909      * return value: Etrue when it is a Java Secret editor.
       
   910      * Efalse when it is not.
       
   911      */
       
   912     TBool IsJavaSecretEditor();    
       
   913 	
       
   914 	void HandleChangeInFocusForSettingFep();
       
   915 
       
   916 private:
       
   917 
       
   918     /**
       
   919      * Handles notifications that the UI has changed focus
       
   920      * <ul>
       
   921      * <\li>When moving away from a fep aware text editor saves the mode of the old editor
       
   922      * <\li>When moving to fep aware text editor gets the the mode if it has previously been saved
       
   923      * and checks if the editor supports secret text
       
   924      * <\ul>
       
   925      */
       
   926     void HandleChangeInFocusL();
       
   927 
       
   928     /**
       
   929      * cleans up the fep after trapping a leave
       
   930      */
       
   931     void CleanUpFep();
       
   932 
       
   933     /**
       
   934      *
       
   935      * @param aKeyCode the value of the key to simulate
       
   936      */
       
   937     void SimulateKeyEventL(TUint aKeyCode, TBool aActiveObj=EFalse);
       
   938 
       
   939     /**
       
   940      * Tries to Reset the Shift Key Monitor
       
   941      * Cleans up FEP if failed
       
   942      *
       
   943      * @return KErrNone if succeed, KErrDied if failed
       
   944      */
       
   945     static TInt ResetShiftKeyMonitorCallback(TAny* aObj);
       
   946 
       
   947     /**
       
   948      * Cancels the shift monitor
       
   949      * tells the editor to up date its cba
       
   950      * to enable copy/paste support on cba. We simulate via CCoeEnv
       
   951      * to avoid fep SimulateL adding shift modifiers
       
   952      */
       
   953     void ResetShiftKeyMonitorL();
       
   954 
       
   955     /**
       
   956      * Cancels the shift key and concatenation timers if they are active
       
   957      */
       
   958     void CancelAllTimerActivity();
       
   959 
       
   960     /**
       
   961      * checks whether a mode is permitted by the current editor
       
   962      *
       
   963      * @return ETrue is aMode is permitted, EFalse if it is not
       
   964      */
       
   965     TBool IsModePermitted(TInt aMode, TWidthChar aWidth = ENoneWidthChar) const;
       
   966 
       
   967     /**
       
   968      *
       
   969      *
       
   970      * @return
       
   971      */
       
   972     TUint EditorMode(TInt aMode, TWidthChar aWidth) const;
       
   973 
       
   974     /**
       
   975      * Synchronises the states of the Fep Manager and the Key Catcher
       
   976      *
       
   977      * @return System wide error code.
       
   978      */
       
   979     TInt SyncStates(TAknFepManagerState aState);
       
   980 
       
   981     /**
       
   982      * Launches the matches popup list
       
   983      */
       
   984     void LaunchMatchesPopupListL();
       
   985 
       
   986 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
   987     // Predictive QWERTY (XT9) changes ---->
       
   988     /**
       
   989      * Launches the compact match candidate list which follows the inline editor.
       
   990      * @param   aFocusedIndex   The index of the word focused by default. 
       
   991      *                          If KErrNotFound is given, the currently active
       
   992      *                          word will be focused.
       
   993      */
       
   994     void LaunchCandidatePopupListL( TInt aFocusedIndex = KErrNotFound );
       
   995     void StartInlineEditingWithSelectedWord(TDesC& aTextToUncommit);
       
   996     /**
       
   997      * Shows the exactly typed word above the inline editor if it differs from the 
       
   998      * best guess word shown inline.
       
   999      */
       
  1000     void ShowExactWordPopupIfNecessaryL();
       
  1001     
       
  1002     /**
       
  1003      * Launches the predictive setting dialog.
       
  1004      */
       
  1005     void LaunchPredictiveSettingDialogL();
       
  1006 #ifdef FF_DUAL_LANGUAGE_SUPPORT
       
  1007     void  LaunchWritingLanguageSettingDialogL();
       
  1008     
       
  1009     void  LaunchDualLanguageSettingDialogL();
       
  1010 #endif //FF_DUAL_LANGUAGE_SUPPORT
       
  1011     
       
  1012     // Predictive QWERTY (XT9) changes <----
       
  1013     
       
  1014     /**
       
  1015      * Handle shift loop in chinese variant for half qwerty
       
  1016      */
       
  1017     
       
  1018     void HandleShiftHalfQwertyChineseL(TEventCode aEventCode);
       
  1019     
       
  1020     /**
       
  1021      * Handle shift key loop in chinese variant for qwerty and mini qwerty
       
  1022      */
       
  1023     void HandleShiftQwertyChineseL(TEventCode aEventCode);
       
  1024 #endif //RD_INTELLIGENT_TEXT_INPUT    
       
  1025     
       
  1026     void GetCandidatesWithIndexL(CDesCArray* aArray, 
       
  1027 						TInt& aActiveIdx, TInt& aSecondaryIdx);
       
  1028     void TryPopExactWordInOtherPlaceL();
       
  1029     
       
  1030     /**
       
  1031      * Launches the insert word query in western predictive text mode
       
  1032      */
       
  1033     void LaunchInsertWordQueryL(const TDesC& aInitialText, TCursorSelection aTextSpanToReplace);
       
  1034 
       
  1035     /**
       
  1036      * Actual query dialog for LaunchInsertWordQueryL and LaunchEditWordQueryL
       
  1037      */
       
  1038     void LaunchFepQueryDialogL(TInt aResourceId, const TDesC& aInitialText, 
       
  1039                                TCursorSelection aTextSpanToReplace);
       
  1040 
       
  1041      /**
       
  1042      * Inserts a text directly into the editor which previously had focus
       
  1043      */
       
  1044     void InsertTextFromDialogL(const TDesC& aTextFromDialog, 
       
  1045                                TCursorSelection aExtentOfTextToReplace);
       
  1046 
       
  1047     /**
       
  1048      * Launch the KutenCodeQuery
       
  1049      */
       
  1050     void LaunchKutenCodeQueryL();
       
  1051 
       
  1052     /**
       
  1053      * Returns the resource ID for the numeric mode special character map
       
  1054      * available in the current editor.
       
  1055      */
       
  1056     TInt NumericModeSCTResourceId() const;
       
  1057 
       
  1058     /**
       
  1059     * Handles the hash key
       
  1060     * <ul>
       
  1061     * <\li>a short hash cycles through the modes
       
  1062     * <\li>a long key press moves to number mode unless the mode is already number, in which case
       
  1063     * it goes to default
       
  1064     * <\ul>
       
  1065     */
       
  1066     TKeyResponse HandleHashKeyL(TKeyPressLength aLength);
       
  1067 
       
  1068     /**
       
  1069     *
       
  1070     * @return Editor's numeric keymap for # and * keys of ITU-T mode.
       
  1071     */
       
  1072     TInt EditorNumericKeymap() const;
       
  1073 
       
  1074     /**
       
  1075      * dims the item on the edit menu corresponding to the current mode
       
  1076      * the user can press cancel to remain in the same mode
       
  1077      *
       
  1078      * @param aMenuPane the edit menu pane
       
  1079      */
       
  1080     void DimEditMenuModeItems(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  1081 
       
  1082     /**
       
  1083      * Launch confirmation note.
       
  1084      *
       
  1085      * @param aResourceId Confirmation note resource Id.
       
  1086      */
       
  1087     void LaunchConfirmationNoteL(TInt aResourceId);
       
  1088 
       
  1089     /**
       
  1090      * Enters a new character into the editing window
       
  1091      * <p> Secret Text Editors do not use the MCoeFepAwareTextEditorInterface,
       
  1092      * they interact with the editor by simlulating key events. When in Multitap, simultating a
       
  1093      * numeric key event causes an extra key to be added to the control stack because the numeric
       
  1094      * keys exist on the Series 60 keypad; the flag EFlagPassNextKey is used to ignore this.
       
  1095      * <p> When secret editing in multitap, a backspace is simulated to replace the last
       
  1096      * character in the editor.
       
  1097      */
       
  1098     void NewCharacterL(const TDesC& aChar);
       
  1099     /**
       
  1100      * Enters a new phrase into the editing window
       
  1101      *
       
  1102      */
       
  1103     void NewTextL(const TDesC& aText);
       
  1104 
       
  1105     /**
       
  1106      * Commits given string in the editing window. This function checks that
       
  1107      * the editor has enough space to insert given string. If it not,
       
  1108      * given string is cut, then it is committed.
       
  1109      */
       
  1110     void CommitInlineEditL(const TDesC& aText, TInt aUncommitedTextChange);
       
  1111 
       
  1112     /**
       
  1113       * Cansel inline input.
       
  1114       */
       
  1115     void CancelInlineEdit();
       
  1116 
       
  1117     /**
       
  1118       * Used by editing window when it draws inline input characters.
       
  1119       */
       
  1120     void GetScreenCoordinatesL(TPoint& aLeftSideOfBaseLine, TInt& aHeight,
       
  1121                                TInt& aAscent, TInt aDocumentOffset);
       
  1122 
       
  1123     /**
       
  1124       * Used by Chinese UI to get cursor baseline position.
       
  1125       */
       
  1126     void GetScreenCoordinatesL(TPoint& aLeftSideOfBaseLine,TInt& aHeight,TInt& aAscent);
       
  1127 
       
  1128 
       
  1129 
       
  1130     /**
       
  1131      * checks that the editor the editor has free space to add another character
       
  1132      * An editor of unlimited length will return its maximum size as zero
       
  1133      */
       
  1134     TBool IsEditorHasFreeSpace()const;
       
  1135 
       
  1136     /**
       
  1137      * Returns the free space left in the Editor.
       
  1138      *
       
  1139      * @param aUnlimit.	Set to EFalse in case of Editors with limited text 
       
  1140 	 *				  	size
       
  1141 	 *		  isToCountUncommittedTextLength. Pass ETrue if the lenght of
       
  1142 	 *					Uncommitted text is to be counted.
       
  1143 	 *
       
  1144 	 * @return TInt. Free space left in the Editor.
       
  1145      */
       
  1146     TInt EditorFreeSpace(TBool& aUnlimit, 
       
  1147     				TBool isToCountUncommittedTextLength = EFalse ) const;
       
  1148 #ifdef RD_INTELLIGENT_TEXT_INPUT    
       
  1149     /**
       
  1150      * Returns the free space left in the Editor. ITI Specific Implementation
       
  1151      *
       
  1152      * @param aUnlimit.	Set to EFalse in case of Editors with limited text 
       
  1153 	 *				  	size
       
  1154 	 *		  isToCountUncommittedTextLength. Pass ETrue if the lenght of
       
  1155 	 *					Uncommitted text is to be counted.
       
  1156 	 *
       
  1157 	 * @return TInt. Free space left in the Editor.
       
  1158      */
       
  1159 	TInt EditorFreeSpaceForAutoWordCompletion(TBool& aUnlimit, 
       
  1160                                             TBool isToCountUncommittedTextLength = EFalse ) const;
       
  1161 #endif    																	
       
  1162   	
       
  1163 #ifdef __ITI_LONGPRESS_NUM_SHIFT_COPYPASTE__
       
  1164 #ifdef RD_INTELLIGENT_TEXT_INPUT    
       
  1165     /**
       
  1166     * Gives the amount of characters in the document.
       
  1167     * @return   The number of characters in the active editor.
       
  1168     */
       
  1169     TInt DocumentLength() const;
       
  1170     
       
  1171     /**
       
  1172     * Tells if the given key event will replace the latest character in editor
       
  1173     * because of multitapping or long press handling.
       
  1174     */
       
  1175     TBool KeyEventWillReplaceCharacter( const TKeyEvent& aKeyEvent );
       
  1176 
       
  1177 #endif
       
  1178 #endif    																	
       
  1179 
       
  1180     /**
       
  1181      * Uses TLocale to access the localized decimal separator in the kernel
       
  1182      */
       
  1183     TChar CurrentDecimalSeparator() const;
       
  1184 
       
  1185     /**
       
  1186      * Sets up the FEP state from the Editor State
       
  1187      * Called by HandleChangeInFocusL()
       
  1188      */
       
  1189     void ConfigureFEPFromEditorStateL();
       
  1190 
       
  1191     /**
       
  1192      * Sets up the FEP State(character width) from the Editor Mode
       
  1193      * @return FepMode
       
  1194      */
       
  1195     TInt ConfigureFepModeFromEditorMode(TInt aEditorMode);
       
  1196 
       
  1197     /**
       
  1198      * launch query which contains instructions on how to enter
       
  1199      * chinese text using the FEP
       
  1200      */
       
  1201     void LaunchHelpTextQueryL();
       
  1202 
       
  1203     /**
       
  1204      * ensure that the UI is aware of the current editor context
       
  1205      */
       
  1206     void UpdateEditorContext() const;
       
  1207 
       
  1208     /**
       
  1209      * query whether the text is valid in the current editor
       
  1210      */
       
  1211     TBool TextIsValidInEditor(const TDesC& aText);
       
  1212 
       
  1213 
       
  1214     /**
       
  1215      * Sets the style of the cursor to aType
       
  1216      */
       
  1217     void SetCursorType(TChineseFepCursorType aType);
       
  1218 
       
  1219    /**
       
  1220     * Returns the current editing state indicator
       
  1221     */
       
  1222     MAknEditingStateIndicator* EditingStateIndicator() const;
       
  1223 
       
  1224     /**
       
  1225     * Adds space at the end of the buffer if the feature is enabled.
       
  1226     */
       
  1227     TBool TryHandleArrowRightEventL(TInt aDocumentLength);
       
  1228 
       
  1229     /**
       
  1230     * Remove spaces from the end of the buffer if the cursor
       
  1231     * is in last position. Only in Japanese variant.
       
  1232     * Opposite functionality of TryHandleArrowRightEventL().
       
  1233     */
       
  1234     TBool TryHandleArrowLeftEventL(TInt aDocumentLength);
       
  1235 
       
  1236     /**
       
  1237     * Adds enter to the buffer if the cursor is at the end of the buffer and
       
  1238     * feature KAknFepEnterWithScrollDown is enabled.
       
  1239     *
       
  1240     * @since 2.6
       
  1241     * @param aDocumentLength Editor's document length
       
  1242     * @return Boolean if the down key event was handled.
       
  1243     */
       
  1244     TBool TryHandleArrowDownEventL(TInt aDocumentLength);
       
  1245 
       
  1246     inline void ResetFlags();
       
  1247 
       
  1248     /**
       
  1249      * Handle the Chr Key Monitor
       
  1250      * for Japanese variant only.
       
  1251      *
       
  1252      * @since 3.0
       
  1253      * @return KErrNone if succeed, KErrDied if failed
       
  1254      */
       
  1255     static TInt HandleChrKeyMonitorCallback(TAny* aObj);
       
  1256 
       
  1257 	/**
       
  1258 	 * Enters a new ligature into the editing window.
       
  1259 	 *
       
  1260      * @since 3.2
       
  1261      * @param aText Unicode value of the ligature.
       
  1262      * @return None
       
  1263 	 */
       
  1264 	void NewLigatureL( const TDesC& aText );
       
  1265    /**
       
  1266      * Sets the current state to aState based on the input mode 
       
  1267      * used to show the indicator
       
  1268      * @since 3.2
       
  1269      */
       
  1270     void SetPredictiveIndicatorState(TAknEditingState& aState);
       
  1271     static TInt HandleResourceChangedCallback(TAny* aObj);
       
  1272     
       
  1273     void ResourceChangedTimeroutL();
       
  1274     /**
       
  1275     * Exit plugin itut spell mode by press ok btn
       
  1276     */
       
  1277     void ExitPluginSpellModeByOkL();    
       
  1278 	
       
  1279 #ifdef RD_SCALABLE_UI_V2
       
  1280 	/**
       
  1281      * Unregisters Fep as observer
       
  1282      */
       
  1283     void UnregisterObserver();
       
  1284     
       
  1285     /**
       
  1286      * Unregisters Fep as observer
       
  1287      */
       
  1288     void RegisterObserver();
       
  1289     
       
  1290 #endif // RD_SCALABLE_UI_V2	    
       
  1291 private:
       
  1292     TUint EditorModeFromFepMode(TInt aFepMode);
       
  1293 
       
  1294     // returns sound system
       
  1295     CAknKeySoundSystem* SoundSystem() const;
       
  1296 
       
  1297     void SetHashKeyStyle();
       
  1298     void ReadHashKeyLoopL();
       
  1299 
       
  1300     TBool IsValidInLineCharacter(TChar aCharacter) const;
       
  1301     TBool HandleLoopingInNaviEventL(TWesternNaviEvent aNaviEvent);
       
  1302 
       
  1303     static TInt WordConcatenationTimerTimeoutCallback(TAny* aObj);
       
  1304     void WordConcatenationTimerTimeoutL();
       
  1305     
       
  1306 	void AddInputLanguageItemL(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex);    
       
  1307 	void SetQwertyModeToInputcapbility();
       
  1308 	void SetExtendedInputCapabilities( TUint aCapabilities);
       
  1309 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  1310 
       
  1311     // Predictive QWERTY (XT9) changes ---->
       
  1312     /**
       
  1313     * Adds the "Input Options" option and its sub menu to the given menu.
       
  1314     * @param    aMenuPane   The menu where the option should be added.
       
  1315     * @param    aIndex      The location in the menu where the option should be added.
       
  1316     */
       
  1317    
       
  1318     void AddPredictiveModeOptionsL(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex) const;
       
  1319     
       
  1320     /**
       
  1321      * Adds the XT9 Edit menu options to the given menu.
       
  1322      * @param    aMenuPane   The menu where the option should be added.
       
  1323      * @param    aIndex      The location in the menu where the option should be added.
       
  1324      */
       
  1325     
       
  1326      void AddPredictiveModeEditMenuL(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex) const;
       
  1327     
       
  1328     // Predictive QWERTY (XT9) changes <----
       
  1329 #endif //RD_INTELLIGENT_TEXT_INPUT
       
  1330     /* Sets default number mode when arabic language is used.
       
  1331     * @param aMode either Latin or Arabic
       
  1332     * @param aNbrModeType number mode type from GSLangPlugin.hrh
       
  1333     */
       
  1334     void SetDefaultNumberMode( TInt aMode, TInt aNbrModeType );
       
  1335 
       
  1336     /**
       
  1337     * Loads an icon from avkon bitmap file.
       
  1338     * @param aIcons The array into which the icon will be added. Icons will be 
       
  1339     *        owned by this array.
       
  1340     * @param aBitmapId ID of the actual bitmap.
       
  1341     * @param aMaskId ID of the mask.
       
  1342     */
       
  1343     void LoadIconL( CArrayPtr<CGulIcon>* aIcons, TInt aBitmapId, TInt aMaskId );
       
  1344 
       
  1345     /**
       
  1346       * Add a menu item for User DB management. 
       
  1347       * phrase creation
       
  1348       * @since S60 5.0 S60_version
       
  1349       * @param aMenuPane The menu into which the mune item will be added. 
       
  1350       * @param aIndex Index of the menu item to insert.
       
  1351       * @return none
       
  1352       */
       
  1353      void AddUserDBDlgItemL( CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex );
       
  1354 
       
  1355      /**
       
  1356        * Return wether ipnut mode is change by press shift+space. 
       
  1357        * This is for half-qwerty.
       
  1358        * @return ETure is change by press shift+space, otherwise EFalse.
       
  1359        */
       
  1360      TBool IsChangeModeByShiftAndSpace();
       
  1361      
       
  1362      /**
       
  1363        * Set wether ipnut mode is change by press shift+space. 
       
  1364        * This is for half-qwerty.
       
  1365        * @return none
       
  1366        */
       
  1367      void SetChangeModeByShiftAndSpace( TBool aFlag );
       
  1368      
       
  1369      /**
       
  1370       * Handle the Fn Key Monitor
       
  1371       *
       
  1372       * @since 3.0
       
  1373       * @return KErrNone if succeed, KErrDied if failed
       
  1374       */
       
  1375      static TInt HandleFnKeyPressMonitorCallback(TAny* aObj);
       
  1376      
       
  1377      /**
       
  1378       * Handle the Fn Key Monitor
       
  1379       * for Qwerty only.
       
  1380       *
       
  1381       * @since 3.0
       
  1382       */
       
  1383      void HandleFnKeyPressMonitor();
       
  1384      
       
  1385      /**
       
  1386      * Activate fn key press monitor to detect long pressing event
       
  1387      */
       
  1388      void ActivateFnkeyPressMonitor();
       
  1389      
       
  1390      /**
       
  1391      * Deactivate fn key press monitor
       
  1392      */
       
  1393      void DeactivateFnkeyPressMonitor();
       
  1394 
       
  1395 public:
       
  1396     //Hash Key Manager Interface
       
  1397     TBool IsOnlyNumericPermitted() const;
       
  1398     void TryIncrementModeL(TInt aCurrentMode);
       
  1399     void TryIncrementModeChineseQwertyL(TInt aCurrentMode);
       
  1400     void TryIncrementChineseModeForQwertyL(TInt aCurrentMode);
       
  1401     void TryChangeToSharedDataModeL();
       
  1402     void TryChangeToModeBeforeL();
       
  1403     TBool TryChangeModeL(TInt aMode);
       
  1404     void ChangeInputLanguageL(TInt aInputLanguage);
       
  1405     void RemovePreviousCharacterL();
       
  1406     void  TryChangePredictiveInputModeL(TBool aFlag);
       
  1407     
       
  1408     /**
       
  1409      * To Handle Indic Hash key 
       
  1410      * 
       
  1411      *
       
  1412      * @since 3.2
       
  1413      * @return the language id of the Input Language as in Cenral Repository (General Settings)
       
  1414      */
       
  1415     TLanguage GetInputLanguageFromSharedDataInterface();
       
  1416 
       
  1417     
       
  1418     /**
       
  1419      * To Handle Hash key 
       
  1420      * 
       
  1421      *
       
  1422      * @since 3.2
       
  1423      * @return ETrue if the Last Key press was Hash key.
       
  1424      */
       
  1425     TBool WasLastKeyPressAHashKey();
       
  1426 
       
  1427     /**
       
  1428      * To Handle Hash key 
       
  1429      * To set or Reset the status maintained to know if last key pressed was Hash Key	 
       
  1430      *
       
  1431      * @since 3.2
       
  1432      * @return nothin
       
  1433      */
       
  1434 	void SetLastPressedHashKeyStatus(TBool aStatus);
       
  1435 
       
  1436     //Case Manager Interface
       
  1437     MCoeFepAwareTextEditor* FepAwareTextEditor() const;
       
  1438     
       
  1439     TBool IsFepAwareTextEditor() const;
       
  1440     
       
  1441     TCursorSelection UncommittedText() const;
       
  1442     void SetCase(TCase aCase);
       
  1443 
       
  1444     //made public for western
       
  1445 
       
  1446     /**
       
  1447      * Retreives the State of the current editor
       
  1448      *
       
  1449      * @return the current editors state object
       
  1450      */
       
  1451     CAknEdwinState* EditorState() const;
       
  1452 
       
  1453     /**
       
  1454      * update the edit indicators when moving into a new input mode
       
  1455      */
       
  1456     void UpdateIndicators();
       
  1457 
       
  1458     /**
       
  1459      * Checks if the editor is in a state where a Special Character Table can be launched
       
  1460      */
       
  1461     TBool IsAbleToLaunchSCT() const;
       
  1462     
       
  1463     /**
       
  1464      * Get SCT Chars' Length to judge it's null
       
  1465      */
       
  1466     TBool GetSctLengthL(TInt resourceId)const;
       
  1467     
       
  1468     /**
       
  1469      * Get current editor's SCT resource id
       
  1470      */
       
  1471     TInt GetCurrentEditorSCTResId() const;
       
  1472     
       
  1473     /**
       
  1474      * Launch the Special Character Table
       
  1475      */
       
  1476     void LaunchSpecialCharacterTableL(TInt aResourceId = EDefaultNumericCharMapResId,
       
  1477                                       TBool aLaunchedByTouchWin=EFalse, 
       
  1478                                       TBool aSmileyFirst=EFalse);
       
  1479 
       
  1480     /**
       
  1481      * Checks if the editor is in a state where a Pictograph Character Table can be launched
       
  1482      */
       
  1483     TBool IsAbleToLaunchPCT() const;
       
  1484     
       
  1485     /**
       
  1486      * Checks if the editor is in a state where a Pictograph Character Table can be launched
       
  1487      */
       
  1488     TBool IsAbleToLaunchSmiley() const;
       
  1489 
       
  1490     /**
       
  1491      * Launch the Pictograph Character Table
       
  1492      */
       
  1493     void LaunchPictographCharacterTableL();
       
  1494 
       
  1495     //MAknFepManagerUIInterfaceWestern
       
  1496     virtual void UpdateInlineEditL(const TDesC& aNewInlineText, 
       
  1497                                    TInt aPositionOfInsertionPointInInlineText);
       
  1498     virtual void StartInlineEditL();
       
  1499     virtual void StartInlineEditL(const TDesC& aText);
       
  1500     virtual void StartInlineEditL(TCursorSelection aCursorSelection, 
       
  1501                                   const TDesC& aInitialInlineText, 
       
  1502                                   TInt aPositionOfInsertionPointInInlineText, 
       
  1503                                   TBool aCursorVisibility);
       
  1504 
       
  1505     virtual TBool CloseUiIfWordDeletedL();
       
  1506     virtual TBool TryGetTextToUncommitL(TDes& aText, TInt aCode, TBool& aComsumeKey);
       
  1507 
       
  1508     /**
       
  1509      * Addition for ITI features on FSQ.
       
  1510      * To check which characters will be underlined.
       
  1511      */
       
  1512     TBool TryGetTextToUncommitL(TDes& aText, TBool& aComsumeKey);
       
  1513     
       
  1514     virtual void UpdateCbaL(TInt aResourceId);
       
  1515     virtual TBool TryRemoveNoMatchesIndicatorL();
       
  1516     virtual TBool IsMoreGoodWordsComing(TInt aNewWordLength) const;
       
  1517 #ifndef RD_INTELLIGENT_TEXT_INPUT
       
  1518     virtual TBool IsMoreGoodAutoCompleteWordsComing(TInt aInputMode, TInt aPreviousWordLengh, 
       
  1519                                                     TInt aNewWordLength) const;
       
  1520 #endif //RD_INTELLIGENT_TEXT_INPUT
       
  1521     virtual void TryStartCompoundWord();
       
  1522     virtual void AddCompoundWordToUdbL();
       
  1523 
       
  1524     //MAknFepManagerUIInterfaceWestern made public for western
       
  1525     inline TBool IsFlagSet(TInt aFlag) const;
       
  1526     inline void SetFlag(TInt aFlag);
       
  1527     inline void ClearFlag(TInt aFlag);
       
  1528     
       
  1529     inline TBool IsExtendedFlagSet(TInt aExtendedFlag) const;
       
  1530     inline void SetExtendedFlag(TInt aExtendedFlag);
       
  1531     inline void ClearExtendedFlag(TInt aExtendedFlag);
       
  1532     inline void ResetExtendedFlags();
       
  1533 
       
  1534     inline TCoeInputCapabilities& InputCapabilities();
       
  1535 
       
  1536     void SetWesternPredictive( const TBool aWesternPredictive );
       
  1537     void SetWesternAutoComplete( const TBool aWesternAutoComplete );
       
  1538     void SetJapanesePredictive(const TBool aJapanesePredictive);
       
  1539     void SetQwertyMode(const TBool aQwertyMode); // Empty implementation. Qwerty mode is not supported.
       
  1540 
       
  1541     TBool WesternPredictive(TInt aMode = 0) const;
       
  1542     TBool IsPredictive(TInt aMode = 0) const;
       
  1543     TBool Japanese() const;
       
  1544     TBool IsOnlyFullWidthCharacterPermitted() const;
       
  1545     TBool IsOnlyHalfWidthCharacterPermitted() const;
       
  1546     TBool IsHalfAndFullKatakanaPermitted() const;
       
  1547     TBool IsHalfAndFullLatinPermitted() const;
       
  1548     TBool IsHalfAndFullNumberPermitted() const;
       
  1549     virtual TWidthChar CharacterWidth() const;
       
  1550 
       
  1551     virtual CPtiEngine* PtiEngine() const;
       
  1552     virtual void SetInlineEditingCursorVisibilityL(TBool aCursorVisibility);
       
  1553 
       
  1554     TInt  InputMode() const;
       
  1555     TInt CangJieMode() const;
       
  1556 
       
  1557     TBool InputLanguageSupportsCaseChanges() const;
       
  1558 
       
  1559     /**
       
  1560      * Queries supportting of KAknFepScrollLatinPredictive feature
       
  1561      *
       
  1562      * @since 2.6
       
  1563      * @return ETrue if ScrollLatinPredictive was supported
       
  1564      */
       
  1565     TBool IsAbleScrollLatinPredictive() const;
       
  1566 
       
  1567     /**
       
  1568      * Previous case is returned.
       
  1569      *
       
  1570      * @since 2.6
       
  1571      * @return TInt  EAknEditorTextCase or EAknEditorUpperCase or EAknEditorLowerCase
       
  1572      *               If case cannot be saved, 0 value is returned.
       
  1573      */
       
  1574     inline TInt CaseBefore() const;
       
  1575 
       
  1576     /**
       
  1577     * @return true if current input language is one of Chinese input languages.
       
  1578     */
       
  1579     inline TBool IsChineseInputLanguage() const;
       
  1580     
       
  1581     /**
       
  1582     * @return true if current input language is arabic input languages.
       
  1583     */
       
  1584     inline TBool IsArabicInputLanguage() const;    
       
  1585     
       
  1586     /**
       
  1587     * @return true if current input language is Korean input language.
       
  1588     */
       
  1589     
       
  1590     inline TBool IsKoreanInputLanguage() const;
       
  1591 
       
  1592     /**
       
  1593      * Check Qwerty keypad
       
  1594      *
       
  1595      * @since 3.0
       
  1596      * @return ETrue is Qwerty
       
  1597      */
       
  1598     inline TBool IsQwerty() const;
       
  1599     
       
  1600     
       
  1601     /**
       
  1602     * Returns boolean value indicating whether hash key is in selection mode or
       
  1603     * in traditional mode.
       
  1604     *  
       
  1605     * @since 3.1
       
  1606     * @return  ETrue if hash key is in text selection mode.
       
  1607     *          EFalse otherwise.
       
  1608     */
       
  1609     TBool HashKeySelectionInUse() const;
       
  1610 
       
  1611     /**
       
  1612     * Returns the UI interface implementation used in the current app.
       
  1613     *
       
  1614     * @since 3.2
       
  1615     * @return  The UI interface object used in the current app.
       
  1616     */
       
  1617     CAknFepUIInterface* UiInterface();
       
  1618   
       
  1619     /**
       
  1620     * Returns boolean value indicating whether edit submenu functionality is in use.    
       
  1621     *  
       
  1622     * @since 3.1
       
  1623     * @return  ETrue if edit submenu functionality is in use.
       
  1624     *          EFalse otherwise.
       
  1625     */        
       
  1626     TBool EditSubmenuInUse() const; 
       
  1627     
       
  1628     /**
       
  1629      * Set MultiTap Timer
       
  1630      *
       
  1631      * @since 3.0
       
  1632      * @param aMultiTapTimer value of KAknFepMultiTapTimer setting
       
  1633      */
       
  1634     void SetMultiTapTimer(const TInt aMultiTapTimer);
       
  1635 
       
  1636     /**
       
  1637      * Set Japanese Qwerty Flags
       
  1638      *
       
  1639      * @since 3.0
       
  1640      * @param aJapaneseQwertyFlags value of KAknFepJapaneseSpecialCharFlag setting
       
  1641      */
       
  1642     void SetJapaneseQwertyFlags(const TInt aJapaneseQwertyFlags);
       
  1643 
       
  1644 	/**
       
  1645 	* Calling this method will raise a flag which will cause predictive 
       
  1646 	* word to be commited during next call to TryCloseUiL-method. This
       
  1647 	* is needed because of Japanese ReadingTextL. 
       
  1648 	*
       
  1649 	* @since 3.1
       
  1650 	*/	
       
  1651 	void SetDelayedCommit();
       
  1652 
       
  1653     /**
       
  1654      * from MAknFepManagerUIInterface
       
  1655      * query whether the special char is valid in the current editor
       
  1656      *
       
  1657      * @param aChar Checking a chracter
       
  1658      */
       
  1659     TBool CharIsValidInEditor(TChar aChar);
       
  1660 
       
  1661    /**
       
  1662      * from MAknFepManagerUIInterface
       
  1663     * Returns the status of predictive input.
       
  1664     *
       
  1665     * @since 3.2
       
  1666     * @return ETrue is available predictive input.
       
  1667     */
       
  1668     TBool IsAbleToChangePrediction() const;
       
  1669     
       
  1670     /**
       
  1671      * Commits uncommitted text in the editing window. For secret text editors,
       
  1672      * only inline editing flags are changed
       
  1673      */
       
  1674     void CommitInlineEditL();    
       
  1675     
       
  1676     TBool GetIndicatorImgID(TInt& aIndicatorImgID, TInt& aIndicatorTextID);   
       
  1677     
       
  1678     TInt CurrentInputLangCode();
       
  1679 
       
  1680     inline TFepSymbolOfHardwareOne SymbolInfoOfHardKey1();
       
  1681 public:
       
  1682 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  1683     /*
       
  1684     Sets the keyboard layout.
       
  1685     **/
       
  1686     void SetKeyboardLayout(TPtiKeyboardType aType);
       
  1687 #endif
       
  1688     virtual TText PreviousChar( TBool aContextSensitive = EFalse );
       
  1689     virtual TText NextChar();
       
  1690     virtual TBool IsZWSCharacterPresent( TBool aLigaturePresent = EFalse );
       
  1691     void RemoveZWSCharacterL( TBool aIsViramaInputted, 
       
  1692                               TBool aIsInMultitappingHalant = EFalse, 
       
  1693                               TBool aIsCharModifier = EFalse, 
       
  1694                               TBool aIsLigaturePresent = EFalse );
       
  1695     void NewCharacterSequenceL(const TDesC& aText, TIndicInputResponse aResponse);
       
  1696     TBool IsValidInlineIndicCharacter(TChar aCharacter) const;
       
  1697 #ifdef RD_HINDI_PHONETIC_INPUT	
       
  1698     TBool IsIndicPhoneticInputLanguage() const;
       
  1699     TInt SetPhoneticIndicator(TLanguage aInputLanguage);
       
  1700     void TryChangePhoneticModeL();
       
  1701 #endif
       
  1702     TDigitType LocalDigit();
       
  1703 public:
       
  1704      /**
       
  1705      * Auto word Completion is Enabled
       
  1706      *
       
  1707      * @since 3.2
       
  1708      */    
       
  1709     void SetAutoCompletionState(TInt aValue);
       
  1710 #ifndef RD_INTELLIGENT_TEXT_INPUT
       
  1711     void RemoveSuggestedCompletionL();
       
  1712 #endif	//RD_PRED_AW_COMPLETION
       
  1713 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  1714     TBool IsFnKeyMappedL(TPtiKeyboardType aKeyboardType = EPtiKeyboardNone);
       
  1715     TBool IsFnKeyMapped();
       
  1716     void SetFnKeyMappingState();
       
  1717     TBool KeyMapsDifferentCharacterWithFn( TPtiKey aKey ) const;
       
  1718      
       
  1719      /**
       
  1720 	 * Setter for the advanced predictive typing correction.
       
  1721 	 * @param    aLevel   The level to be set.
       
  1722 	 */
       
  1723 	 void SetTypingCorrectionLevel(TInt aLevel);
       
  1724 	
       
  1725 	 /**
       
  1726 	 * Resetter for the advanced predictive Number Candidate setting.
       
  1727 	 * @param    aValue   The value to be set.
       
  1728 	 */
       
  1729 	 void SetNumberCandidateState(TInt aValue);
       
  1730 	 
       
  1731 	 /**
       
  1732 	* Setes the primary candidate from GS to the local state
       
  1733 	*/
       
  1734 	 void SetPrimaryCandidate(TInt aValue);
       
  1735 #endif
       
  1736        
       
  1737     void SetStopProcessFocus(TBool aStop, TBool aClose = ETrue);
       
  1738 
       
  1739     TBool StopProcessFocus();
       
  1740     
       
  1741     TBool CloseUiOnFocusChange();
       
  1742     
       
  1743 
       
  1744 public:
       
  1745     void HandleOwnedSimulateKeyL();
       
  1746     
       
  1747     TBool HandleCcpuModeKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode,
       
  1748                                  TKeyResponse& aRetCode, TBool aLongPressFlag = EFalse);
       
  1749     
       
  1750 	/**
       
  1751  	*  Sets aFlag bitfield in iCcpuFlags
       
  1752  	*/
       
  1753 	inline void SetCcpuFlag(TInt aFlag);
       
  1754 
       
  1755 	/**
       
  1756  	* Clears aFlag bitfield in iCcpuFlags
       
  1757  	*/
       
  1758 	inline void ClearCcpuFlag(TInt aFlag);
       
  1759 
       
  1760 	/**
       
  1761  	* Clears all flags in iCcpuFlags
       
  1762  	*/
       
  1763 	inline void ResetCcpuFlags();
       
  1764 
       
  1765 	/**
       
  1766  	* Returns ETrue if the aFlag bitfield in iCcpuFlags is set, EFalse if it
       
  1767  	* is clear
       
  1768  	*/
       
  1769 	inline TBool IsCcpuFlagSet(TInt aFlag) const;    
       
  1770         /**
       
  1771      * Check if Auto word Completion is Enabled
       
  1772      *
       
  1773      * @since 3.2
       
  1774      * @return ETrue if Auto word Completion is enabled
       
  1775      */
       
  1776     inline TBool IsAutoCompleteOn() const;
       
  1777 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  1778 
       
  1779     
       
  1780     
       
  1781     /**
       
  1782     * @return	TInt 	Typing correction level.
       
  1783     */
       
  1784     inline TInt AdvancedPredictiveTypingCorrectionLevel() const;
       
  1785     
       
  1786     /**
       
  1787     * @return   ETrue   If the number candidate shown. EFalse otherwise.
       
  1788     */
       
  1789     inline TBool IsAdvancedPredictiveNumberCandidateShown() const;
       
  1790     
       
  1791     /**
       
  1792     * Cuts off the automatically completed tail of the suggested word candidate.
       
  1793     */
       
  1794     virtual void RemoveSuggestedAdvanceCompletionL();
       
  1795     
       
  1796     /**
       
  1797     * @return   ETrue   If the number candidate shown. EFalse otherwise.
       
  1798     */
       
  1799     inline TBool AdvancedPredictivePrimaryCandidate() const;
       
  1800     TBool LongPressNumberEntryOnQwerty() const;
       
  1801     
       
  1802     // Predictive QWERTY (XT9) changs <----
       
  1803 #endif //RD_INTELLIGENT_TEXT_INPUT
       
  1804     /**
       
  1805     * Returns ETrue if Feature manager supports Japanese.
       
  1806     */
       
  1807     inline TBool IsFeatureSupportedJapanese() const;
       
  1808     
       
  1809  	/**
       
  1810     * Cancels shift key timer.
       
  1811     */        
       
  1812 	void CancelShiftKeyTimer();
       
  1813     
       
  1814     /**
       
  1815      * Queries supportting of SecretText
       
  1816      *
       
  1817      * @since 2.6
       
  1818      * @return ETrue if SecretText was supported
       
  1819      */
       
  1820     TBool IsSupportsSecretText() const;
       
  1821     
       
  1822     void SendEventsToPluginManL( TInt aEventType, TInt aEventData = 0 );
       
  1823 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  1824     /**
       
  1825     Sends the key event received to the Fn key handler and sets the Fn key state.
       
  1826     */
       
  1827     TKeyResponse HandleFnKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aEventCode );
       
  1828 #endif
       
  1829     
       
  1830     MAknFepManagerInterface* FepUI() const;
       
  1831   
       
  1832     TTmDocPosSpec DocPos();
       
  1833     
       
  1834     void HandleCopyCutEventL(TInt aCommandId);
       
  1835     
       
  1836     void LaunchPenSupportMenuL(); 
       
  1837 
       
  1838 private: //navigation
       
  1839     void FindStartOfWord(TInt& aAnchorPos) const;
       
  1840     void FindEndOfWord(TInt& aCursorPos) const;
       
  1841     TBool CursorInsideWord();
       
  1842     void MoveCursorToStartOfWordL();
       
  1843     void MoveCursorToEndOfWordL();
       
  1844     TKeyResponse HandleNaviEventOutsideInlineEditL(TUint aCode, TKeyPressLength aLength);
       
  1845     TKeyResponse HandleWesternPredictiveArrowKeyL(TInt aCode, TKeyPressLength aLength);
       
  1846     TBool TryHandleTextSelectedNaviEventL(TInt aCode, TKeyResponse& aResponse);
       
  1847     TBool TryHandleCommonArrowAndBackspaceFunctionalityL(TInt aCode, TKeyResponse& aResponse);
       
  1848     void TransferFepStateToEditorL(TBool aFnLockSync=ETrue);
       
  1849     inline MAknFepManagerInterface* InternalFepUI();
       
  1850 
       
  1851 
       
  1852     void LaunchLanguagesPopupListL(TBool aLaunchedByTouchWin = EFalse);
       
  1853     void LaunchRecognitionWithDictionaryPopupListL();
       
  1854     void LaunchWritingSpeedPopupListL();
       
  1855     void LaunchGuidingLinePopupListL();
       
  1856     TBool IsInputModeAvailable(TInt aMode) const;
       
  1857     TInt NewInputModeAfterLanguageChange() const;
       
  1858 
       
  1859     /**
       
  1860       * Launch User DB dialog
       
  1861       * phrase creation
       
  1862       * @since S60 5.0 S60_version
       
  1863       * @param none
       
  1864       * @return none
       
  1865       */
       
  1866      void LaunchUserDBDlgL();
       
  1867 
       
  1868     /**
       
  1869     * Set current input language and the capabilities of the language to
       
  1870     * the iLanguageCapabilities member variable.
       
  1871     *
       
  1872     * @param aInputLanguage New (current) input language.
       
  1873     */
       
  1874     void SetInputLanguageCapabilities(const TInt aInputLanguage);
       
  1875 
       
  1876     /**
       
  1877     * Returns input language code that corresponds to UI language.
       
  1878     *
       
  1879     * @param aUiLanguage Ui language code.
       
  1880     * @return Input language code that corresponds to the UI language code.
       
  1881     */
       
  1882     TInt SubstituteSublanguageId(const TInt aUiLanguage) const;
       
  1883 
       
  1884     CTextView* TextView() const;
       
  1885     CTextLayout* TextLayout() const;
       
  1886     CPlainText* PlainText() const;
       
  1887 
       
  1888     void DoWesternMenu(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  1889     void DoChineseMenu(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  1890     void DoJapaneseMenu(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  1891     void DoChineseSubMenu(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  1892 
       
  1893     TBool IsRightToLeftParagraph(TTmDocPosSpec aPos) const;
       
  1894     void FindAdjacentChunks(const TTmDocPosSpec& aPos,
       
  1895                             CTmTextLayout::TTmChunkDescription& aLeft, 
       
  1896                             CTmTextLayout::TTmChunkDescription& aRight) const;
       
  1897 
       
  1898     TBool GetNextVisualRightCharacter( TInt& aPosition );
       
  1899     TBool GetNextVisualLeftCharacter( TInt& aPosition );
       
  1900     void FindVisualRightOfWord(TInt& aPosition);
       
  1901     void FindVisualLeftOfWord(TInt& aPosition);
       
  1902 
       
  1903     //
       
  1904     // Remaining methods here are candidates for turning into TextViewUtility methods. Some
       
  1905     // have been made static already in anticipation of this.
       
  1906     //
       
  1907     /**
       
  1908     * Obtains the visual beginning of the document. This may be the left or right the right
       
  1909     * end of the first line, depending on first paragraph's direction. If the beginning of the document
       
  1910     * is currently not formatted, then EFalse is returned
       
  1911     *
       
  1912     * @param    aEndPos     DocPosSpec is returned for the visual beginning of the document.
       
  1913     * @return   ETrue if the value is successfully calculated, that is the first line is formatted
       
  1914     */
       
  1915     TBool GetVisualDocStart( TTmDocPosSpec& aStartPos ) const;
       
  1916 
       
  1917     /**
       
  1918     * Obtains the visual end of the document. This may be the left or right the right
       
  1919     * end of the last line, depending on last paragraphs direction. If the end of the document
       
  1920     * is currently not formatted, then EFalse is returned
       
  1921     *
       
  1922     * @param    aEndPos     DocPosSpec is returned for the visual end of the document.
       
  1923     * @return   ETrue if the value is successfully calculated, that is the last line is formatted
       
  1924     */
       
  1925     TBool GetVisualDocEnd( TTmDocPosSpec& aEndPos ) const;
       
  1926 
       
  1927     /**
       
  1928     * Get the document position of the visual extrem of the line in which the passed position
       
  1929     * is in.
       
  1930     *
       
  1931     * @param aPos       A position within the line you are interested in
       
  1932     * @param aToRight   ETrue if you want the right hand end.
       
  1933     * @param aExtreme   Output value of the doc pos spec for the end of the line
       
  1934     * @return           ETrue if the line was formatted. If False, the value of eExtreme
       
  1935     * cannot be trusted.
       
  1936     */
       
  1937     TBool GetAknFepLineExtreme( const TTmDocPosSpec& aPos, TBool aToRight,
       
  1938         TTmDocPosSpec& aExtreme) const;
       
  1939 
       
  1940     /**
       
  1941     * This is a very general routine for finding the visual extreme (according to
       
  1942     * Avkon rules) of a piece of selected text.
       
  1943     * - Text may in general have many varying directional sections.
       
  1944     * - It may extend from one paragraph to another.
       
  1945     * - If the paragraph directions are different the current input language is
       
  1946     *
       
  1947     * @param aSelection     Logical range for which the visual extreme is required
       
  1948     * @param aEvent         The direction being navigated (Right/Left/Up/Down); eg. ELeftNaviEvent if moving to the left end
       
  1949     * @param aLimitPos      returned position in document
       
  1950     * @param aEffectiveRightOrLeftEvent  Pointer to TWesternNaviEvent, if passed from the client, will
       
  1951     *                       return either ERightNaviEvent or ELeftNaviEvent
       
  1952     */
       
  1953     void GetAvkonDefinedVisualLimitsOfSelection(
       
  1954         const TCursorSelection& aSelection,
       
  1955         TWesternNaviEvent aEvent,
       
  1956         TTmDocPosSpec& aLimitPos,
       
  1957         TWesternNaviEvent* aEffectiveRightOrLeftEvent) const;
       
  1958 
       
  1959     /**
       
  1960     * Returns the position at the visual left extreme end for a logical range
       
  1961     *
       
  1962     * @param    aStartPos   Starting position for the search
       
  1963     * @param    aMinPos     minimum logical position of the logical range
       
  1964     * @param    aMaxPos     maximum logical position of the logical range
       
  1965     * @return   TTmDocPosSpec for the visual left end
       
  1966     */
       
  1967     TTmDocPosSpec LeftVisualExtremePos( const TTmDocPosSpec& aStartPos, 
       
  1968                                         TInt aMinPos, TInt aMaxPos ) const;
       
  1969 
       
  1970     /**
       
  1971     * Returns the position at the visual right extreme end for a logical range. The range may consist
       
  1972     * of many directional chunks.  They are iterated through until the visual end is found.
       
  1973     *
       
  1974     * @param    aStartPos   Starting position for the search
       
  1975     * @param    aMinPos     minimum logical position of the logical range
       
  1976     * @param    aMaxPos     maximum logical position of the logical range
       
  1977     * @return   TTmDocPosSpec for the visual right end
       
  1978     */
       
  1979     TTmDocPosSpec RightVisualExtremePos( const TTmDocPosSpec& aStartPos, 
       
  1980                                          TInt aMinPos, TInt aMaxPos ) const;
       
  1981 
       
  1982     /**
       
  1983     * Gets the visual left-most position in a chunk within a logical range
       
  1984     */
       
  1985     TBool LeftEndOfChunkWithinRange( const CTmTextLayout::TTmChunkDescription& aChunk, 
       
  1986                                      TInt aMinPos, TInt aMaxPos, TTmDocPosSpec& aNewPos) const;
       
  1987 
       
  1988     /**
       
  1989     * Gets the visual right-most position in a chunk within a logical range
       
  1990     */
       
  1991     TBool RightEndOfChunkWithinRange( const CTmTextLayout::TTmChunkDescription& aChunk, 
       
  1992                                       TInt aMinPos, TInt aMaxPos, TTmDocPosSpec& aNewPos) const;
       
  1993 
       
  1994     /**
       
  1995     * Adjust the passed docpos to reflect the avkon principal that after a left navigation
       
  1996     * the cursor should adhere to the bordering directional run on the left of that point.
       
  1997     * This may mean that the logical position and leading/trailing feature of aPos are adjusted
       
  1998     * This method does not perform the navigation, but may be called after a navigation.
       
  1999     */
       
  2000     void AdjustPosSpecForAmbiguityAfterLeftOrRightNavigation( TTmDocPosSpec& aPos, 
       
  2001                                                               TWesternNaviEvent aEvent ) const;
       
  2002 
       
  2003     /**
       
  2004     * Do not move the visual position, but ensure that the docpos passed is adhering to the left
       
  2005     * side of the right chunk passed in.
       
  2006     */
       
  2007     static void AttachToRightChunk( TTmDocPosSpec& aPos, 
       
  2008                                     const CTmTextLayout::TTmChunkDescription& aRightChunk );
       
  2009 
       
  2010     /**
       
  2011     * Do not move the visual position, but ensure that the docpos passed is adhering to the
       
  2012     * right side of the left chunk passed in.
       
  2013     */
       
  2014     static void AttachToLeftChunk( TTmDocPosSpec& aPos, 
       
  2015                                    const CTmTextLayout::TTmChunkDescription& aRightChunk );
       
  2016 
       
  2017     /**
       
  2018     * Modify the cursor position after a jump to the start or end of a document.
       
  2019     * The current input direction is used to modify the position, so as to avoid attaching the
       
  2020     * new cursor position to a block of the opposite input directionality
       
  2021     *
       
  2022     * @param aPos   target position of the jump; may be modified by the routine.
       
  2023     * @param aEvent navigation event that caused the loop.
       
  2024     * @param aLoopToTop ETrue if the looping is from bottom to top; EFalse if from top to bottom
       
  2025     *
       
  2026     */
       
  2027     void AdjustPosSpecForInputLanguageAfterDocumentLoop( TTmDocPosSpec& aPos, 
       
  2028                                                          TWesternNaviEvent aEvent, 
       
  2029                                                          TBool aLoopToTop ) const;
       
  2030 
       
  2031     /**
       
  2032     * Tests a chunk for validity.
       
  2033     *
       
  2034     * @return ETrue if the chunk is valid - is a real chunk.
       
  2035     */
       
  2036     static TBool ChunkIsValid( const CTmTextLayout::TTmChunkDescription& aChunk );
       
  2037 
       
  2038     /**
       
  2039     * Finds the current input direction. This is determined as best as it can using
       
  2040     * - iT9Interface as the preferred source of information
       
  2041     * if that is not active/defined then
       
  2042     * - shared data (via AknTextUtils) if that fails
       
  2043     * - localLanguage overrides may be in place
       
  2044     *
       
  2045     * - when fep is in numeric mode it returns LTR
       
  2046     * - if FEP is in an irelevant mode, then LTR is returned
       
  2047     *
       
  2048     * Note that secret alpha modes return LTR always, as entry is alwas LTR for these
       
  2049     *
       
  2050     * @return TDirectionality::ERightToLeft when in an alpha mode and direction is RTL;
       
  2051     *                           Otherwise returns ELeftToRight
       
  2052     */
       
  2053     TBidiText::TDirectionality CurrentInputDirectionality() const;
       
  2054 
       
  2055     /**
       
  2056     * Access the local language if defined
       
  2057     *
       
  2058     * @param aLanguage - returns the Symbian OS language code for the local language
       
  2059     * @return EFalse iff no local language is in force
       
  2060     */
       
  2061     TBool GetLocalLanguage( TLanguage& aLanguage ) const;
       
  2062 
       
  2063     /**
       
  2064     * Looks through the FEP aware editor's text starting at character aPos, looking for a
       
  2065     * strongly directional character.  Direction of search can be set.
       
  2066     * Search is carried out until a strong character is found or the end (or beginning)
       
  2067     * of the editor text has been reached.
       
  2068     * The value returned in aIsRightToLeft should not be used unless the method returns ETrue
       
  2069     * @param aPos       First character to look at
       
  2070     * @param aForward   If EFalse, then search is backward (decreasing index) in logical buffer
       
  2071     * @param aIsRightToLeft     Set to ETrue on return if first strong character found is RTL
       
  2072     *
       
  2073     * @return           EFalse if no strong character was found.
       
  2074     */
       
  2075     TBool GetExposedDirectionOfText( TInt aPos, TBool aForward, TBool& aIsRightToLeft ) const;
       
  2076 
       
  2077     /**
       
  2078     * Looks through the passed descriptor, looking for a strongly directional character.
       
  2079     * Direction of search can be set. Search starts at the begining if searching forward;
       
  2080     * starts at the end if searching backwards.
       
  2081     *
       
  2082     * Search is carried out until a strong character is found or the end (or beginning)
       
  2083     * of the descriptor has been reached.
       
  2084     * The value returned in aIsRightToLeft should not be used unless the method returns ETrue
       
  2085     *
       
  2086     * @param aText      Descriptor to search.
       
  2087     * @param aForward   If EFalse, then search is backward (decreasing index) in logical buffer
       
  2088     * @param aIsRightToLeft     Set to ETrue on return if first strong character found is RTL
       
  2089     *
       
  2090     * @return           EFalse if no strong character was found.
       
  2091     */
       
  2092     TBool GetExposedDirectionOfTextInDescriptor( const TDesC& aText, TBool aForward, 
       
  2093                                                  TBool& aIsRightToLeft ) const;
       
  2094 
       
  2095     /**
       
  2096     * Access character in editor text at index aPos.
       
  2097     *
       
  2098     * @param    aPos    Index of character to access. Must be a valid index or panic may ensue.
       
  2099     * @return           charater at index aPos; returns TChar(0) if cannot get at the text.
       
  2100     */
       
  2101     TChar CharAt( TInt aPos ) const;
       
  2102 
       
  2103     /**
       
  2104     * Navigate off of selected text using an Up/Down/Right/Left navigation event
       
  2105     *
       
  2106     * The code takes account of the paragraph directionality that the passed selection is
       
  2107     * found in.
       
  2108     *
       
  2109     * The new cursor position is resolved for ambiguity and then set using SetCursorPosition, and
       
  2110     * so it has the same side-effects:
       
  2111     *   iUncommittedText is set to the zero-width "cursor" state with the new cursor position
       
  2112     *   iUncommittedText is set into the FepAwareTextEditor state
       
  2113     *   iCaseManager is updated with a ENullNaviEvent
       
  2114     *   the doc pos is set in TextView object if present
       
  2115     *
       
  2116     * @param    aSelection  currently selected text
       
  2117     * @param    aNaviEvent  navigation event. One of ERight/Left/Down/UpNaviEvent. Others are ignored
       
  2118     * @param    aPos        Ouput, new position of the cursor
       
  2119     * @return   EKeyWasNotConsumed if the key is not consumed
       
  2120     */
       
  2121     TKeyResponse NavigateFromSelectionL(
       
  2122         const TCursorSelection& aSelection,
       
  2123         TWesternNaviEvent aNaviEvent,
       
  2124         TTmDocPosSpec& aPos );
       
  2125 
       
  2126 
       
  2127     /**
       
  2128     * This method is the standard way for the FEP to move the cursor when there is
       
  2129     * no inline edit or selection.
       
  2130     * Side effects:
       
  2131     * iUncommittedText is set to the zero-width "cursor" state with the passed position
       
  2132     * iUncommittedText is set into the FepAwareTextEditor state
       
  2133     * iCaseManager is updated with a ENullNaviEvent
       
  2134     * the doc post is set in TextView object if present
       
  2135     *
       
  2136     * @param aNewCursorPos - defines the position to set the cursor at, including leading/trailing
       
  2137     * @param aDragSelectOn - iff EFalse, do not keep old anchor position (that is, cancel any selection)
       
  2138     * properties.
       
  2139     */
       
  2140     void SetCursorPositionL( const TTmDocPosSpec& aNewCursorPos, TBool aDragSelectOn = EFalse );
       
  2141 
       
  2142     /**
       
  2143     * Returns ETrue if the passed position is formatted and is in the first line
       
  2144     */
       
  2145     TBool InFirstLineAndFormatted( const TTmDocPosSpec& aPos ) const;
       
  2146 
       
  2147     /**
       
  2148     * Returns ETrue if the passed position is formatted and is in the last line
       
  2149     */
       
  2150     TBool InLastLineAndFormatted( const TTmDocPosSpec& aPos ) const;
       
  2151 
       
  2152     /**
       
  2153     * Returns ETrue if the passed position is in the
       
  2154     * @param aCheckFirstLine    if ETrue, check for first line; else check last line
       
  2155     * @return ETrue if the passed position is formatted and is first (or last - depending on switch)
       
  2156     */
       
  2157     TBool DocPosInFirstOrLastLineAndFormatted( const TTmDocPosSpec& aPos, 
       
  2158                                                TBool aCheckFirstLine ) const;
       
  2159 
       
  2160     /**
       
  2161     * Method to determine if the passed position is equivalent visually to the "canonical"
       
  2162     * value determined by the limit algorithms.  The methods allow two visually equivalent,
       
  2163     * but logically different TTmDocPosSpecs to be be checked for equivalence.
       
  2164     * @param aCurrentPos    Position in document as returned by GetDocPos
       
  2165     * @param aLimitPos      Visual start of document as returned by GetVisualDocStart
       
  2166     * @returns              ETrue if the positions are visully equivalent
       
  2167     */
       
  2168     TBool AtVisualStart( const TTmDocPosSpec& aCurrentPos, const TTmDocPosSpec& aLimitPos ) const;
       
  2169 
       
  2170     /**
       
  2171     * Method to determine if the passed position is equivalent visually to the "canonical"
       
  2172     * value determined by the limit algorithms.  The methods allow two visually equivalent,
       
  2173     * but logically different TTmDocPosSpecs to be be checked for equivalence.
       
  2174     * @param aCurrentPos    Position in document as returned by GetDocPos
       
  2175     * @param aLimitPos      The visual end of document as returned by GetVisualDocStart
       
  2176     * @returns              ETrue if the positions are visully equivalent
       
  2177     */
       
  2178     TBool AtVisualEnd( const TTmDocPosSpec& aCurrentPos, const TTmDocPosSpec& aLimitPos, 
       
  2179                        TInt aDocLength ) const;
       
  2180 
       
  2181     void SetCursorType(TBool aIsLeftToRight);
       
  2182     TBool DeviceSupportsRTLLanguageL();
       
  2183 
       
  2184 	/**
       
  2185 	 * Performs calculations of digit mode; 
       
  2186 	 * used in UpdateLocalDigitMode() and in UpdateNumericEditorDigitType()
       
  2187 	 */
       
  2188 	void CalculateEditorDigitType(TDigitType& aDestination);
       
  2189 
       
  2190     void UpdateNumericEditorDigitType();
       
  2191 
       
  2192     /**
       
  2193     * Updates FEP digit mode from global locale settings.
       
  2194     */
       
  2195     void UpdateLocalDigitMode();
       
  2196 
       
  2197     /**
       
  2198     * Checks to see if the cursor position is at an ambiguous point (one where the text blocks
       
  2199     * on either side are of different directionality) and potentially moves the cursor from
       
  2200     * one block to the other, depending on the key identity.
       
  2201     *
       
  2202     * To be called before key event is processed by the FEP in the usual way.
       
  2203     * If the key is acted upon to move the cursor, then the event is "eaten" and it is not
       
  2204     * to be passed on for processing.
       
  2205     *
       
  2206     * @param aCode      Key code from standard TKeyEvent key event structure
       
  2207     * @return           EKeyWasConsumed if a cursor adjustement was made;
       
  2208     *                   else EKeyWasNotConsumed
       
  2209     */
       
  2210     // TKeyResponse AttemptCursorFlipAtAmbiguousPointL( const TKeyEvent& aKeyEvent, TEventCode aEventCode );
       
  2211     TKeyResponse AttemptCursorFlipAtAmbiguousPointL( const TUint aCode );
       
  2212 
       
  2213     /**
       
  2214     * Call back method for the "Post Event Check" mechanism. Called from a CIdle after
       
  2215     * any event that might required a check of the new cursor position or other invariant
       
  2216     */
       
  2217     static TInt PostEventCheckCallback(TAny* aObj);
       
  2218 
       
  2219     /**
       
  2220     * Access method for whether bidirectional cursor is to be used
       
  2221     *
       
  2222     * @return EFalse iff the bidi cursor is not to be used
       
  2223     */
       
  2224     TBool BidiCursorRequired() const;
       
  2225 
       
  2226     /**
       
  2227     * Since FEP does not complete the navigation of an event (editor and form do that), FEP
       
  2228     * has to ensure after all navigation is finished if the cursor is displayed correctly.
       
  2229     *
       
  2230     * <p> This method, called from the post event callback, implements the action to check the
       
  2231     * current cursor directionality against the text directionality at the cursor position,
       
  2232     * and alters the cursor appearance as required.
       
  2233     */
       
  2234     void DoCursorDirectionCheckL();
       
  2235 
       
  2236     /**
       
  2237     * Check the directionality of text in the vicinity of the current document position
       
  2238     * and ensure that the cursor is indicated appropriately.
       
  2239     *
       
  2240     * This routine has no side-effect on the cursor position. It merely changes the
       
  2241     * appearance of the cursor.
       
  2242     */
       
  2243     void AdjustCursorTypeForCurrentPosition();
       
  2244 
       
  2245     /**
       
  2246     * Kicks off the post event check idle event
       
  2247     *
       
  2248     * @param aCode Key event code
       
  2249     */
       
  2250     void SchedulePostEventCheckL(TUint aCode);
       
  2251 
       
  2252     /**
       
  2253     * Check the directionality of text in the vicinity of the supplied document position
       
  2254     * and ensure that the cursor is indicated appropriately.
       
  2255     *
       
  2256     * This routine has no side-effect on the cursor position. It merely changes the
       
  2257     * appearance of the cursor.
       
  2258     *
       
  2259     * @param    aDocPos     document position that is to be analysed and acted on
       
  2260     */
       
  2261     void AdjustCursorTypeForPosition( const TTmDocPosSpec& aDocPos );
       
  2262 
       
  2263     /**
       
  2264     * "Hook" method for managing a bidi cursor according to the text directionality at the cursor
       
  2265     * Only one of this method or SetCursorTypeForInputDirection will be in operation at any
       
  2266     * time.
       
  2267     *
       
  2268     * @param aLeftToRight   Supply ETrue iff cursor required is LTR cursor
       
  2269     */
       
  2270     void SetCursorTypeForTextDirection( TBool aLeftToRight );
       
  2271 
       
  2272     /**
       
  2273     * "Hook" method for managing a bidi cursor according to the current input direction
       
  2274     * Only one of this method or SetCursorTypeForTextDirection will be in operation at any
       
  2275     * time.
       
  2276     *
       
  2277     * @param aLeftToRight   Supply ETrue iff cursor required is LTR cursor
       
  2278     */
       
  2279     void SetCursorTypeForInputDirection( TBool aLeftToRight );
       
  2280 
       
  2281     /**
       
  2282     * Routine to analyse the directionalities surrounding the supplied document position
       
  2283     * and to return the results.
       
  2284     *
       
  2285     * @param    aDocPos     document position that is to be analysed
       
  2286     * @return               Structure containing the results of the analysis
       
  2287     */
       
  2288     TTextDirectionalInfo LocalTextDirectionalStatus( const TTmDocPosSpec& aDocPos ) const;
       
  2289 
       
  2290 
       
  2291     /**
       
  2292     *
       
  2293     * This method is used to add directional markers to protect neutrals that may be
       
  2294     * exposed to the opposite directional formatting to their situation before the deletion
       
  2295     *
       
  2296     * Redecoration is carried out if a neutral is exposed by the deletion to a directionality
       
  2297     * different to that which is was already marked.
       
  2298     *
       
  2299     * An inline edit may be stated and then committed.
       
  2300     *
       
  2301     * iUncommittedText is required to be set to the cursor position that existed after
       
  2302     * the deletion.
       
  2303     *
       
  2304     * iUncommittedText will be updated to the new cursor position.
       
  2305     *
       
  2306     * @param aTextThatWasDeleted Informs the method of what text has just been removed
       
  2307     */
       
  2308     void RedecorateAfterDeletionL( const TDesC& aTextThatWasDeleted );
       
  2309 
       
  2310 
       
  2311     TBool EditorSupportsNeutralProtection();
       
  2312 
       
  2313 
       
  2314     /**
       
  2315     * Wrapper function for the MCoeFepAwareTextEditor commit method.
       
  2316     * This method terminates the inline by accepting the current inline edit into the buffer.
       
  2317     *
       
  2318     * At entry, iUncommittedText is required to have the span of the current inline edit.
       
  2319     * iAnchorPos should be the index of the first character in the inline edit.
       
  2320     * iCursorPos should be the index of the next character after the inline edit.
       
  2321     *
       
  2322     * At exit, iUncommittedText has 0-length and represents the current cursor position.
       
  2323     * That is, iAnchorPos = iCursorPos = index of the character next after the cursor
       
  2324     *
       
  2325     * These indices may be more easily though of as "gap indices" where gap 0 precedes
       
  2326     * character 0, gap 1 follows character 0, gap 2 follows charcacter 1, etc.. until gap
       
  2327     * N follows character (N-1).
       
  2328     *
       
  2329     * This routine does not attempt to consolidate any directional markers that may be
       
  2330     * extraneous in the new buffer.  It is therefore used when it is important to know what
       
  2331     * span after the commit, e.g. to make it reversible.
       
  2332     *
       
  2333     * @param aFepAwareTextEditor    Editor for which there is a current inline edit.
       
  2334     * @param aCursorVisibility      EFalse if the cursor is to be suppressed during the commit.
       
  2335     */
       
  2336     void CommitInlineEditWithoutResolutionL(MCoeFepAwareTextEditor& aFepAwareTextEditor, 
       
  2337                                             TBool aCursorVisibility, TBool aClearPti = ETrue);
       
  2338 
       
  2339 
       
  2340     TKeyResponse HandlePredictiveNaviEventOutsideInlineEditL(TUint aCode, TKeyPressLength aLength);
       
  2341 
       
  2342     static TInt DoSimulateKey(TAny* aThisPtr);
       
  2343 
       
  2344     /**
       
  2345     * This method is that the label of CBA is updated by aTextResId.
       
  2346     * @param aPosition   CBA position, either ELeftSoftkeyIndex or ERightSoftkeyIndex
       
  2347     * @param aCommandId  command id for softkey
       
  2348     * @param aTextResId  resource id to set string on label.
       
  2349     * @return TBool The return value is ETrue in case it is necessary to update CBA.
       
  2350     */
       
  2351     TBool UpdateCBALabelL(TInt aPosition, TInt aCommandId, TInt aTextResId);
       
  2352 
       
  2353     /**
       
  2354     * Launches special character table (SCT) and pictograph character table (PCT).
       
  2355     *
       
  2356     * @param aResourceId   Resource of SCT content. NULL if the default SCT content
       
  2357     *                      is used. At the moment only Thai language sets non-default
       
  2358     *                      content.
       
  2359     * @param aShowSctParam Set the show mode for sct. EShowSctFirst or EShowPctFirst or EShowSmileyFirst
       
  2360     */
       
  2361     void DoLaunchSctAndPctL(TInt aResourceId, TShowSctMode aShowSctMode);
       
  2362 
       
  2363     /**
       
  2364      * Update CangJie mode
       
  2365      *
       
  2366      * @param aNewMode   New CangJie mode
       
  2367      * @since 3.0
       
  2368      */
       
  2369 	void UpdateCangJieState(TInt aNewMode);
       
  2370 
       
  2371     /**
       
  2372      * Launch CangJie setting dialog
       
  2373      *
       
  2374      * @since 3.0
       
  2375      * @return  Selected CangJie level or KErrGeneral if user cancel the selection
       
  2376      */
       
  2377 	TInt LaunchCangJieOptionDlgL();
       
  2378     
       
  2379     
       
  2380 	void AddEditSubmenuL(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  2381 	void DisableEditSubmenuItems(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  2382 	void StartCcpuModeL(TBool aCopyMode);
       
  2383 
       
  2384     /**
       
  2385      * Handle the Chr Key Monitor
       
  2386      * for Japanese variant only.
       
  2387      *
       
  2388      * @since 3.0
       
  2389      */
       
  2390     void HandleChrKeyMonitorL();
       
  2391     
       
  2392     TBool IsCursorAtEndOfWord();  
       
  2393     
       
  2394     /* This method should be called after launching any dialog by FEP */
       
  2395     void PrepareFepAfterDialogExitL(TUid aFepUid);
       
  2396     /* This method should be called before launching any fep aware dialog by FEP */
       
  2397     void PrepareFepForFepAwareDialogLaunch();
       
  2398     /* This method should be called after launching any fep aware dialog by FEP */
       
  2399     void PrepareFepAfterFepAwareDialogExitL(TUid aFepUid);
       
  2400 
       
  2401 public:
       
  2402 
       
  2403     /**
       
  2404      * Handle layout change.
       
  2405      * When screen layout change, Key Catcher calls this method
       
  2406      *
       
  2407      */
       
  2408     void HandleResourceChange(TInt aType);
       
  2409 
       
  2410     TBool IsHybridAplhaEditor() const;
       
  2411     TBool IsHybridAlphaModeChangedtoAplhanumeric() const;
       
  2412 
       
  2413     TBool QueryPredictiveState(const TAknEditingState aState);
       
  2414     TInt EvaluateState(TAknEditingState aState);
       
  2415     TBool QueryPredictiveAutoCompleteState(TAknEditingState aState);
       
  2416 	 CAknExtendedInputCapabilities::TEditorType EditorType() const;
       
  2417 	 TUint MIDPConstraint() const;
       
  2418 	/**
       
  2419 	* Tells if the current editor is phone number editor
       
  2420 	* @return ETrue if the current editor is phone number editor
       
  2421 	*/
       
  2422 	TBool IsPhoneNumberEditor() const;
       
  2423 
       
  2424     
       
  2425 #ifdef RD_SCALABLE_UI_V2
       
  2426 
       
  2427     /**
       
  2428      * Pen input support functions
       
  2429      */
       
  2430 public:
       
  2431 
       
  2432     void HandlePointerEventL(const TPointerEvent &aPointerEvent);
       
  2433     
       
  2434     
       
  2435     /**
       
  2436      * Handle arrow key event when some chars have been selected
       
  2437      *
       
  2438      * @since S60 v3.2
       
  2439      * @param aKeyEvent
       
  2440      * @param aEventCode
       
  2441      * @param aRetCode
       
  2442      */    
       
  2443     TBool HandleSelModeArrowKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode,
       
  2444                                       TKeyResponse& aRetCode);
       
  2445     
       
  2446     /**
       
  2447      * From CAknExtendedInputCapabilities::MAknEventObserver
       
  2448      * Handle an event
       
  2449      *
       
  2450      * @since S60 v3.2
       
  2451      * @param aEvent An event, see TInputCapabilitiesEvent
       
  2452      * @param aParams Event dependent parameters
       
  2453      */
       
  2454     void HandleInputCapabilitiesEventL( TInt aEvent, TAny* aParams );
       
  2455     
       
  2456     void SubmitInlineTextL( const TDesC& aData );
       
  2457     
       
  2458     inline TInt PermittedModes() const;
       
  2459     
       
  2460     inline void SetNotifyPlugin( TBool aNotifyFlag );
       
  2461             
       
  2462     inline void RemeberEditorState();
       
  2463     
       
  2464     inline TBool IsMfneEditor() const;
       
  2465     
       
  2466     inline TBool IsFindPaneEditor() const;
       
  2467     inline TBool IsSupportedAdaptiveSearch() const;
       
  2468     //for japanese
       
  2469     void NotifyJapaneseSetting();
       
  2470     
       
  2471     
       
  2472     void ProcessEditorMenuCommand(TInt aCommand);
       
  2473     
       
  2474     TInt GetPermittedEditorMenu(TBool aOnlyCount = EFalse);
       
  2475 
       
  2476     void UpdateTouchCaseMode();
       
  2477 
       
  2478 	void DimInputmodeTouchMenuItems(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  2479 	
       
  2480 	inline TLanguageCapabilities InputLanguageCapabilities() const;
       
  2481 
       
  2482     inline TAknFepManagerState& FepManState();
       
  2483     
       
  2484     inline TBool IsSupportNativeNumber() const;
       
  2485 
       
  2486 	void NeedDisableKeySound(const TKeyEvent& aKeyEvent, TEventCode aEventCode);
       
  2487 	
       
  2488 	inline void SetGainForeground( TBool aGainForeground );
       
  2489 	void HandleEndKeyL();
       
  2490 	inline void SetCancelPopupInQwerty( TBool aCancelPopupInQwerty );
       
  2491 		
       
  2492     /**
       
  2493      * Return the chinese input mode used last time
       
  2494      */
       
  2495 	inline TInt LastChineseInputMode() const;
       
  2496 
       
  2497     /**
       
  2498      * Return active input language, only used for languages popup list
       
  2499      */
       
  2500     inline TInt ActiveInputLanguage() const;
       
  2501 
       
  2502     /**
       
  2503      * Set active input language, only used for languages popup list
       
  2504      */	    
       
  2505     inline void SetActiveInputLanguage(TInt aInputLanguage);
       
  2506     
       
  2507 private:
       
  2508        
       
  2509     /**
       
  2510     * Checks if the current editor is fully FEP aware.
       
  2511     *
       
  2512     * @since 3.2
       
  2513     *
       
  2514     * @return ETrue if editor if fully FEP aware.
       
  2515     */
       
  2516     TBool FullyFepAwareTextEditor() const;
       
  2517 
       
  2518     /**
       
  2519     * Checks if the current editor is partially FEP aware.
       
  2520     *
       
  2521     * @since 3.2
       
  2522     *
       
  2523     * @param aAtLeast if ETrue then ETrue is returned for also fully FEP aware editors.
       
  2524     *
       
  2525     * @return ETrue if editor is partially FEP aware.
       
  2526     */
       
  2527     TBool SemiFepAwareTextEditor( TBool aAtLeast = EFalse ) const;         
       
  2528         
       
  2529     void DoWesternTouchMenu(CAknFepUiInterfaceMenuPane* aMenuPane);    
       
  2530     void DoChineseTouchMenu(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  2531     
       
  2532     /**
       
  2533     * Checks if the current input mode belongs to chinese input modes.        
       
  2534     *
       
  2535     * @param aMode The current input mode.
       
  2536     *
       
  2537     * @return ETrue if the current input mode belongs to chinese input mode..
       
  2538     */
       
  2539     TBool IsChineseInputMode( TInt aMode );
       
  2540     
       
  2541 #endif //RD_SCALABLE_UI_V2
       
  2542     
       
  2543      /**
       
  2544     * Returns the type of the focused editor.
       
  2545     *
       
  2546     * @since 3.2
       
  2547     *
       
  2548     * @return Editor type.
       
  2549     */
       
  2550     //CAknExtendedInputCapabilities::TEditorType EditorType() const;
       
  2551         
       
  2552     /**
       
  2553      *  Get the MAknFepDocumentNavigation object
       
  2554      *
       
  2555      *  @since 3.2
       
  2556      *  @return pointer to MAknFepDocumentNavigation accessed through
       
  2557      *  the input capabilites object provider.
       
  2558      */
       
  2559 	MAknFepDocumentNavigation* AknFepDocumentNavigation() const;
       
  2560 	
       
  2561 	TInt GetPermittedEditorMenuL(TBool aOnlyCount = EFalse);
       
  2562 		
       
  2563 private:// from MPeninputServerEventHandler
       
  2564 
       
  2565     void UpdateLatinIndicator( TAknEditingState& aNewState );
       
  2566     void UpdateNumberIndicator( TAknEditingState& aNewState );
       
  2567     void UpdateHindiIndicator( TAknEditingState& aNewState );
       
  2568     void HandleCopyCutStateL();
       
  2569  	/**    
       
  2570 	* Returns ETrue if hash key selection is on and hash key mode selection should
       
  2571 	* be blocked.
       
  2572 	*
       
  2573 	* @since 3.1
       
  2574 	*/  
       
  2575     TBool HashKeyModeChangeBlockedInSearchField() const;                                  
       
  2576     /**
       
  2577      * Set editor cursor selection according plugin UI 
       
  2578      * cursor state
       
  2579      *
       
  2580      * @since 3.2
       
  2581      * @param aCurSel Cursor position.
       
  2582      * @param aSyncCursor ETrue if plug in UI need update cursor, EFalse otherwise
       
  2583      * @return None
       
  2584      */
       
  2585     void SetCursorSelectionL(const TCursorSelection& aCurSel, TBool aSyncCursor);
       
  2586 
       
  2587 	/**
       
  2588     * An internal helper method for matches popup list.
       
  2589     * 
       
  2590     * The index of currently selected prediction candidate.
       
  2591     * 
       
  2592     * @since S60 3.2
       
  2593     */ 
       
  2594     TInt ResolveCurrentCandidateListIndex(CDesCArrayFlat* aCandList);
       
  2595 
       
  2596     /**
       
  2597 	*  Removes underlining from predictive word and moves cursor the end of the word.
       
  2598 	*
       
  2599     *  @since 3.2
       
  2600     *  @param aData Key data
       
  2601     *  @return None
       
  2602     */    
       
  2603     void DeactivatePredicitveWordAndMoveCursorL();
       
  2604     
       
  2605  	/**
       
  2606 	*  Returns the Ccpu status of given editor state as a flag combination.
       
  2607 	*
       
  2608     *  @since 3.2
       
  2609     *  @param aEdwinState
       
  2610     *  @return editor ccpu status
       
  2611     */    
       
  2612 	TInt EditorCcpuStatus(CAknEdwinState* aEdwinState);
       
  2613 	
       
  2614 	/**
       
  2615 	*  Cancels editing options copy / paste mode initialted from editing options -submenu.
       
  2616 	*
       
  2617     *  @since 3.2
       
  2618     */    	
       
  2619 	void CancelCcpuMode();
       
  2620 
       
  2621 #ifdef RD_SCALABLE_UI_V2    
       
  2622     /**
       
  2623     *  Launches stylus Ccpu-menu
       
  2624     *
       
  2625     *  @since 5.0
       
  2626     *  @param aClickPoint Point where stylus was clicked.
       
  2627     */
       
  2628     void LaunchStylusCcpuMenuL(TPoint &aClickPoint);
       
  2629     
       
  2630     void DynInitTouchMenuPaneL(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  2631 #endif    
       
  2632 
       
  2633     /**
       
  2634     * Has Japanese prediction input mode in PtiEngine
       
  2635     */
       
  2636     TBool HasJapanesePredictionInputMode() const;
       
  2637     
       
  2638     
       
  2639     void InitPreviewMenuPane(CAknFepUiInterfaceMenuPane* aMenuPane);
       
  2640 
       
  2641 public:
       
  2642     void StopDisplayingMenuBar();
       
  2643 
       
  2644 private:
       
  2645     void ConvertCharToKey(TChar aIn, TUint16& aKey) const;
       
  2646     
       
  2647     /** 
       
  2648      * Update editor state' flag 
       
  2649      * @since Symbian^3 
       
  2650      * @param aFlag  editor state flag
       
  2651      * @param aAdd   adding or removing
       
  2652      */
       
  2653     void UpdateEditorStateFlags( TInt aFlag, TBool aAdd = ETrue ) const;
       
  2654 
       
  2655 private:
       
  2656     // Data owned by this class
       
  2657     CAknFepKeyCatcherInterface* iKeyCatcher;
       
  2658     CAknFepIndicator* iIndicator;
       
  2659     CPeriodic* iShiftKeypressMonitor;
       
  2660     CAknFepLanguageManager* iLangMan;           // own
       
  2661     MAknFepManagerInterface* iCurrentFepUI;     // not own
       
  2662     CAknFepCaseManager* iCaseMan;
       
  2663     CAknFepInlineTextDecorator* iInlineTextDecorator;
       
  2664 
       
  2665     CAknFepHashKeyManager* iHashKeyMan;
       
  2666     CPeriodic* iConcatenationTimer;
       
  2667     //fep delay the resource changed message for getting the updated coordinate from editor.
       
  2668     CAsyncCallBack iAsyncResouceChanged;
       
  2669 
       
  2670     // shared data support
       
  2671     CAknFepSharedDataInterface* iSharedDataInterface;
       
  2672 
       
  2673     MAknEditingStateIndicator*  iPreviousIndicator;
       
  2674     MAknEditingStateIndicator* iEditIndicatorAtLastUpdate;
       
  2675     TAknEditingState iPreviousEditingState;
       
  2676 
       
  2677     TLanguage iUiLanguage;  // Symbian language code for UI language.
       
  2678     TLanguageCapabilities iLanguageCapabilities; // Input language and capabilities of the language.
       
  2679     TUint iFlags;
       
  2680     TUint iExtendedFlags;
       
  2681     TAknFepManagerState iFepManState;
       
  2682     TCoeInputCapabilities iInputCapabilities;
       
  2683     TInt iPermittedInputModes;
       
  2684     TInt iMode;
       
  2685     TInt iModeBefore;
       
  2686     TInt iCaseBefore;
       
  2687     TInt iResId;
       
  2688     TInt iVariantPermittedModes;
       
  2689     TInt iSpaceCharacterCode;               // adding for japanese
       
  2690     TInt iFullWidthSpaceCharacterCode;      // adding for japanese
       
  2691     TAknEditorNumericKeymap iAknEditorNumericKeymap;
       
  2692     TInt iAknEditorFlags;
       
  2693     TCursorSelection iUncommittedText;
       
  2694     RArray<TInt> iHashKeyLoop;
       
  2695     TBool iWesternPredictive;
       
  2696     TKeyPressLength iKeyRepeat;
       
  2697     TBool iIsAutoCompleteOn;				// for Auto Word Completion
       
  2698 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  2699     TInt iKeyBackSpaceHit;
       
  2700     TInt  iTypingCorrectionLevel;			// for typing correction level
       
  2701     TBool iIsNumberCandidateShown;			// for number candidates
       
  2702     TBool iPrimaryCandidate;    			// for primary candidate
       
  2703     TBool iKeyPressedDuringShift;           
       
  2704     TPtiKeyboardType iKeyboardType; 		// for checking the keyboard layout
       
  2705     TBool iSupressCursorMoveToEndChrKeyPressed; // For supressing cursor movement when SCT launched
       
  2706 #endif //RD_INTELLIGENT_TEXT_INPUT
       
  2707     TBool iJapanesePredictive;
       
  2708     TBool iDeviceSupportsRtlLanguage; // Could be removed
       
  2709     CIdle* iPostEventCheck; // Owned
       
  2710 
       
  2711     TWidthChar iCharWidth;      // adding for japanese
       
  2712     CPtiEngine* iPtiEngine;     // adding for japanese
       
  2713 
       
  2714     TUint iSimulateKey;
       
  2715     CApaDocument* iEmbedded; // User Dictionary
       
  2716     CAknNullService*  iNullService; // User Dictionary
       
  2717     CAsyncCallBack iAsyncOwnSimulateKey;
       
  2718     TInt iFreeSpaceOfEditor;
       
  2719     TBool iQwertyInputMode; // Not used. The value is always EFalse.
       
  2720     TBool iLongThai0Key;
       
  2721     TBool iFepFullyConstructed;
       
  2722     CAknEdwinState* iRememberEditorState; // For "editing options" submenu
       
  2723     TInt iRememberLength;   // For "editing options" submenu.
       
  2724     TInt iEditorCcpuStatus; // For "editing options" submenu.
       
  2725     TInt iCcpuMode;         // For "editing options" submenu    
       
  2726     TInt  iMultiTapTimer;   // for Japanese only: store MultiTap Timer
       
  2727  	CAknFepUiInterfaceMenuBar* iEditMenuBar;   // Remember menu bar instance for closing. 
       
  2728  	HBufC* iSctEditChars;   // Buffer for characters selected in the edit menu
       
  2729  	TPtr iEditCharsPtr;     // Pointer to the buffer that holds all the selected characters.
       
  2730  	TInt iStarScan;         // Remember scan code for star key.
       
  2731     TInt  iJapaneseQwertyFlags;   // for Japanese only: store Japanese Qwerty Flags
       
  2732 
       
  2733     CPeriodic* iChrKeypressMonitor; // for Japanese only: Chr key monitor timer
       
  2734 	TBool iLastKeyPressedWasHashKey;
       
  2735     TBool iStopProcessFocus;
       
  2736     TBool iClosePeninputUi;
       
  2737     /**
       
  2738      * User DB dialog
       
  2739      * Own, but doesn't need delete by myself
       
  2740      */
       
  2741     CAknFepUserdbDlg* iUserdbdlg;
       
  2742     
       
  2743     CAknNavigationDecorator* iTapGroup;
       
  2744 
       
  2745     TInt iEditorCommandList[30];
       
  2746 
       
  2747 	TBool iComposChrFlag;
       
  2748     //User db view(phrase creation)
       
  2749     TInt iIsUserdbdlgActive;
       
  2750     /**
       
  2751      * * Used for handle key event for zhuyin method.(phrase creation)
       
  2752      * 
       
  2753      */
       
  2754     CZhuyinKeyHandler* iZhuyinKeyHandler;
       
  2755     CAknFepZhuyinAnalyser* iZhuyinAnalyser;
       
  2756     CZhuyinAnalyserDbFeed* iZhuyinAnalyserDb;
       
  2757 
       
  2758 #ifdef RD_SCALABLE_UI_V2
       
  2759 
       
  2760     /**
       
  2761      * Used by itut spell mode, initial text in spell mode
       
  2762      */
       
  2763 	HBufC* iSpellInitText;
       
  2764 
       
  2765     /**
       
  2766      * Used by itut spell mode, initial text selection in spell mode, 
       
  2767      * whose position is relative to whole text in original editor
       
  2768      */
       
  2769 	TCursorSelection iSpellInitCurSel;
       
  2770    
       
  2771     CAknFepPluginManager* iFepPluginManager;
       
  2772     
       
  2773     /**
       
  2774      * HKB predictive state before starting plugin IME
       
  2775      */
       
  2776     TBool                    iT9UsedBeforePluginInput;
       
  2777     
       
  2778     
       
  2779     /**
       
  2780     * Stylus ccpu menu
       
  2781     */ 
       
  2782     CAknFepUiInterfaceStylusPopUpMenu*     iStylusCcpuMenu; 
       
  2783     
       
  2784     /**
       
  2785     * Last known clik point, needed for stylus ccpu menu launch.
       
  2786     */   
       
  2787     TPoint                   iClickPoint;
       
  2788     
       
  2789     TBool iGainForeground;
       
  2790     
       
  2791     TBool iLoseForeAndGainFocus;
       
  2792     
       
  2793     TBool iNotifyPlugin;
       
  2794     
       
  2795     TBool iCancelPopupInQwerty;
       
  2796     
       
  2797     TBool iStarKeyPressed;
       
  2798     
       
  2799     TInt iLastChineseInputMode;
       
  2800     
       
  2801     // Indicate Stroke is used in QWERTY, when default input mode is Cangjie
       
  2802     TBool iStrokeUsedInQWERTY;
       
  2803     // Save that which editor use stroke
       
  2804     CAknEdwinState* iEditorStateStrokeUsed;
       
  2805 
       
  2806 #endif //RD_SCALABLE_UI_V2
       
  2807 
       
  2808     /**
       
  2809      * Long press clear key after close UI;
       
  2810      */
       
  2811     TBool                    iLongClearAfterCloseUI;      
       
  2812     
       
  2813     TBool iFeatureSupportedJapanese;    // Save the value of KFeatureIdJapanese
       
  2814 
       
  2815 	// stores a reference to previous editor state for pointer comparision
       
  2816 	CAknEdwinState* iPreviousEditorState; 
       
  2817 	   
       
  2818     CAknFepUIInterface* iUiInterface;
       
  2819 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  2820     CAknFepFnKeyManager     *iFnKeyManager; // Owned
       
  2821     TBool iIsFnKeyMapped;
       
  2822 #ifdef __REVERSE_FN_KEY_SUPPORTED
       
  2823     TBool iIsReverseFnkeyInput;
       
  2824 #endif //__REVERSE_FN_KEY_SUPPORTED
       
  2825 	
       
  2826 	// Predictive QWERTY (XT9) changes ---->
       
  2827     //! The exact word tooptip shown above the inline editor when the exact word differs from the best guess candidate
       
  2828    // CAknPreviewPopUpController* iExactWordPopup;
       
  2829     
       
  2830     //! The contents of the exact word popup.
       
  2831 	MAknFepUiWordPopupContent* iExactWordPopupContent;
       
  2832 	MAknFepCandidatePopup*	iCandidatePopup;
       
  2833 	TBool iSListLaunchedFromMenu;
       
  2834 	TInt iAutoCmptnTailLength;
       
  2835 	TInt iIsLastResourceEditMenu;
       
  2836 	// Predictive QWERTY (XT9) changes <----
       
  2837 #ifdef    __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__    
       
  2838     CAknFepUiInterfaceMenuBar* iOptionsMenuBar;
       
  2839 #endif	
       
  2840 #endif //RD_INTELLIGENT_TEXT_INPUT
       
  2841     //phrase creation    
       
  2842     TInt iPhraseCreation;
       
  2843     TInt iPinyinPhraseCreation;
       
  2844     TInt iKeyStar;
       
  2845     TInt iEntryPhrase;
       
  2846     TBool iPenSupportMenu;
       
  2847     TFepSymbolOfHardwareOne iSymbolData;
       
  2848       
       
  2849     /**
       
  2850      * Flag for wether input mode is changed by shift+space
       
  2851      */
       
  2852     TBool iShiftAndSpace;
       
  2853     CAknFepThaiSCTSelector* iAknFepThaiSCTSelector;
       
  2854     
       
  2855     /**
       
  2856      * Active input language, only used for languages pop up list,
       
  2857      * can not changed in other cases, e.g. in latin-only editor
       
  2858      */
       
  2859     TInt iActiveInputLanguage;
       
  2860     
       
  2861     /**
       
  2862      * indicate whether matches popup list was lauched,
       
  2863      * when rotating the screen, we need to consider it, e.g V-ITUT  to FSQ
       
  2864      */
       
  2865     TBool iMatchesListLaunched;
       
  2866     
       
  2867     /**
       
  2868      * monitor the long press event from Fn key
       
  2869      * when long press event occurs, Fn key will be set to Lock state
       
  2870      */
       
  2871     CPeriodic* iFnKeypressMonitor;
       
  2872 
       
  2873 public:
       
  2874 
       
  2875     //the follow 8 functions for phrase creation 
       
  2876     /**
       
  2877      * Set the state to pinyin phrase creation
       
  2878      */
       
  2879     void PinyinPhraseCreation( TBool aPinyinPhraseCreation );
       
  2880     
       
  2881     /**
       
  2882      * Is the state is in pinyin phrase creation
       
  2883      *
       
  2884      * @return if not enabled, return EFalse
       
  2885      */
       
  2886     TBool IsPinyinPhraseCreation() const;
       
  2887     
       
  2888     /**
       
  2889      * Set the state to phrase creation
       
  2890      */
       
  2891     void PhraseCreation( TBool aPhraseCreation );
       
  2892     
       
  2893     /**
       
  2894      * Is the state is in phrase creation
       
  2895      *
       
  2896      * @return if not enabled, return EFalse
       
  2897      */
       
  2898     TBool IsPhraseCreation() const;
       
  2899     
       
  2900     /**
       
  2901      * Set the state to input phrase
       
  2902      */
       
  2903     void EntryPhrase( TBool aEntryPhrase );
       
  2904     
       
  2905     /**
       
  2906      * Is the state is in input phrase
       
  2907      *
       
  2908      * @return if not enabled, return EFalse
       
  2909      */
       
  2910     TBool IsEntryPhrase() const;
       
  2911     
       
  2912     /**
       
  2913      * Set the state to enable star key
       
  2914      */
       
  2915     void EnableKeyStar( TBool aEnable );
       
  2916     
       
  2917     /**
       
  2918      * Is the state is enable star key
       
  2919      *
       
  2920      * @return if not enabled, return EFalse
       
  2921      */
       
  2922     TBool IsEnableKeyStar() const;
       
  2923 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  2924 public:
       
  2925    /**
       
  2926     * multitaps thru the chars in the SCT.
       
  2927     * @param aCallback, the callback when the timer expires
       
  2928     */
       
  2929     void MultitapThroughSCTCharL(TCallBack aCallBack);       	 
       
  2930     /**
       
  2931     * Notify mfne editor to toggle AM or PM for 12-hour time
       
  2932     */
       
  2933     void ChangeMfneAmPm();
       
  2934 private:        
       
  2935     TBool NumericResourceMultiTapTimerTimeoutL();    
       
  2936     
       
  2937     /**
       
  2938      * CAknFepManager::FindAndRemoveInputOptionsMenuItemL
       
  2939      * Helper method to check if the "Input options" menu item exists and
       
  2940      * if so, remove it from the menu pane.
       
  2941      *  Params - 
       
  2942      *      aMenuPane : pointer to the menu pane to be checked for the resource id
       
  2943      */
       
  2944     void FindAndRemoveInputOptionsMenuItemL( CAknFepUiInterfaceMenuPane* aMenuPane );
       
  2945     
       
  2946     /**
       
  2947       * CAknFepManager::FindAndRemoveEditSubMenuItemL
       
  2948       * Helper method to check if the "Edit Text" menu item exists and
       
  2949       * if so, remove it from the menu pane.
       
  2950       *  Params - 
       
  2951       *      aMenuPane : pointer to the menu pane to be checked for the resource id
       
  2952       */
       
  2953     void FindAndRemoveEditSubMenuItemL( CAknFepUiInterfaceMenuPane* aMenuPane );
       
  2954     
       
  2955     /**
       
  2956      * CAknFepManager::AddInputOptionsMenuItemL
       
  2957      * Helper method to add the "Input options" menu item in appropriate location
       
  2958      * Appropriate location is :
       
  2959      *  - if Avkon Help command exists, then immediately above it
       
  2960      *  - else if Avkon Exit command exists, then immediately above it
       
  2961      *  - else if there are 3 or more items in the Options menu, then 3rd from last
       
  2962      *  - else it is the last item. 
       
  2963      *  Params - 
       
  2964      *      aMenuPane : pointer to the menu pane to be checked for the resource id
       
  2965      */
       
  2966     void AddInputOptionsMenuItemL( CAknFepUiInterfaceMenuPane* aMenuPane );
       
  2967         
       
  2968 private:        
       
  2969     CChrMultiTapTimer* iNumericResourceTimer;
       
  2970     HBufC* iResourceString;
       
  2971     TInt iChrCharIndex;    
       
  2972 #ifdef __HALF_QWERTY_KEYPAD
       
  2973 	TKeyEvent iHalfQwertyLastKeyEvent;
       
  2974 // this variable is set whenever a long key press of chr happens
       
  2975 	TBool iChrLongKeyPress;
       
  2976     TBool iFnCharInsertedForShift;	
       
  2977 #endif //__HALF_QWERTY_KEYPAD
       
  2978     TInt iNumericResourceId;
       
  2979 #endif //RD_INTELLIGENT_TEXT_INPUT
       
  2980     TBool iHybridAplphaChangedToAlphanumeric;
       
  2981     CAknEdwinState* iLastFocusedEditor;
       
  2982     CAknEdwinState* iFepAwareDialogParentEditor;
       
  2983     /**
       
  2984      * Indicate that the focused control is destroyed.     
       
  2985      */  
       
  2986     TBool iFocusedItemDestroy;    
       
  2987     };
       
  2988 
       
  2989 /**
       
  2990  *  Sets aFlag bitfield in iFlags
       
  2991  */
       
  2992 inline void CAknFepManager::SetFlag(TInt aFlag)
       
  2993     {
       
  2994     iFlags|=aFlag;
       
  2995     }
       
  2996 
       
  2997 /**
       
  2998  * Clears aFlag bitfield in iFlags
       
  2999  */
       
  3000 inline void CAknFepManager::ClearFlag(TInt aFlag)
       
  3001     {
       
  3002     iFlags&=~aFlag;
       
  3003     }
       
  3004 
       
  3005 /**
       
  3006  * Clears all flags down
       
  3007  */
       
  3008 inline void CAknFepManager::ResetFlags()
       
  3009     {
       
  3010     iFlags=0;
       
  3011     }
       
  3012 
       
  3013 /**
       
  3014  * Returns ETrue if the aFlag bitfield in iFlags is set, EFalse if it
       
  3015  * is clear
       
  3016  */
       
  3017 inline TBool CAknFepManager::IsFlagSet(TInt aFlag) const
       
  3018     {
       
  3019     return iFlags&aFlag;
       
  3020     }
       
  3021 
       
  3022 /**
       
  3023  *  Sets aExtendedFlag bitfield in iExtendedFlags
       
  3024  */
       
  3025 inline void CAknFepManager::SetExtendedFlag(TInt aExtendedFlag)
       
  3026     {
       
  3027     iExtendedFlags|=aExtendedFlag;
       
  3028     }
       
  3029 
       
  3030 /**
       
  3031  * Clears aExtendedFlag bitfield in iExtendedFlags
       
  3032  */
       
  3033 inline void CAknFepManager::ClearExtendedFlag(TInt aExtendedFlag)
       
  3034     {
       
  3035     iExtendedFlags&=~aExtendedFlag;
       
  3036     }
       
  3037 
       
  3038 /**
       
  3039  * Clears all ExtendedFlags down
       
  3040  */
       
  3041 inline void CAknFepManager::ResetExtendedFlags()
       
  3042     {
       
  3043     iExtendedFlags=0;
       
  3044     }
       
  3045 
       
  3046 /**
       
  3047  * Returns ETrue if the aExtendedFlag bitfield in iExtendedFlags is set, EFalse if it
       
  3048  * is clear
       
  3049  */
       
  3050 inline TBool CAknFepManager::IsExtendedFlagSet(TInt aExtendedFlag) const
       
  3051     {
       
  3052     return iExtendedFlags&aExtendedFlag;
       
  3053     }
       
  3054 
       
  3055 /**
       
  3056  * Returns previous case information
       
  3057  */
       
  3058 inline TInt CAknFepManager::CaseBefore() const
       
  3059     {
       
  3060     return iCaseBefore;
       
  3061     }
       
  3062     
       
  3063 inline TBool CAknFepManager::IsChineseInputLanguage() const
       
  3064     {
       
  3065     return ( iLanguageCapabilities.iInputLanguageCode == ELangPrcChinese ||
       
  3066         iLanguageCapabilities.iInputLanguageCode == ELangHongKongChinese ||
       
  3067         iLanguageCapabilities.iInputLanguageCode == ELangTaiwanChinese);
       
  3068     }
       
  3069 
       
  3070 inline TBool CAknFepManager::IsKoreanInputLanguage() const
       
  3071     {
       
  3072     return iLanguageCapabilities.iInputLanguageCode == ELangKorean;
       
  3073     }
       
  3074 inline TBool CAknFepManager::IsArabicInputLanguage() const
       
  3075     {
       
  3076     return ( iLanguageCapabilities.iInputLanguageCode == ELangArabic);
       
  3077     }
       
  3078 /**
       
  3079  * Returns the valid of Qwerty
       
  3080  */
       
  3081 inline TBool CAknFepManager::IsQwerty() const
       
  3082     {
       
  3083     return iQwertyInputMode;
       
  3084     }
       
  3085 
       
  3086 
       
  3087 /**
       
  3088  *  Sets aFlag bitfield in iCcpuFlags
       
  3089  */
       
  3090 inline void CAknFepManager::SetCcpuFlag(TInt aFlag)
       
  3091     {
       
  3092     iCcpuMode|=aFlag;
       
  3093     }
       
  3094 
       
  3095 /**
       
  3096  * Clears aFlag bitfield in iCcpuFlags
       
  3097  */
       
  3098 inline void CAknFepManager::ClearCcpuFlag(TInt aFlag)
       
  3099     {
       
  3100     iCcpuMode&=~aFlag;
       
  3101     }
       
  3102 
       
  3103 /**
       
  3104  * Clears all flags in iCcpuFlags
       
  3105  */
       
  3106 inline void CAknFepManager::ResetCcpuFlags()
       
  3107     {
       
  3108     iCcpuMode=0;
       
  3109     }
       
  3110 
       
  3111 /**
       
  3112  * Returns ETrue if the aFlag bitfield in iCcpuFlags is set, EFalse if it
       
  3113  * is clear
       
  3114  */
       
  3115 inline TBool CAknFepManager::IsCcpuFlagSet(TInt aFlag) const
       
  3116     {
       
  3117     return iCcpuMode&aFlag;
       
  3118     }
       
  3119      
       
  3120 inline MAknFepManagerInterface* CAknFepManager::InternalFepUI()
       
  3121     {
       
  3122     return iCurrentFepUI;
       
  3123     }
       
  3124 
       
  3125 #ifdef RD_SCALABLE_UI_V2
       
  3126 
       
  3127 inline void CAknFepManager::SetNotifyPlugin( TBool aNotifyFlag )
       
  3128 	{
       
  3129 	iNotifyPlugin = aNotifyFlag;
       
  3130 	}
       
  3131 inline TInt CAknFepManager::PermittedModes() const
       
  3132 	{
       
  3133 	return iPermittedInputModes;
       
  3134 	}    
       
  3135 
       
  3136 inline void CAknFepManager::RemeberEditorState()
       
  3137 	{
       
  3138 	iRememberEditorState = EditorState();
       
  3139 	}  	
       
  3140 
       
  3141 inline TBool CAknFepManager::IsMfneEditor() const
       
  3142     {
       
  3143     return EditorType() == CAknExtendedInputCapabilities::EMFNEBased;
       
  3144     }
       
  3145 
       
  3146 inline TBool CAknFepManager::IsFindPaneEditor() const
       
  3147     {
       
  3148     return iAknEditorFlags & EAknEditorFlagFindPane;
       
  3149     }
       
  3150     
       
  3151 inline CAknFepManager::TLanguageCapabilities CAknFepManager::InputLanguageCapabilities() const
       
  3152     {
       
  3153     return iLanguageCapabilities;
       
  3154     }
       
  3155 
       
  3156 inline TAknFepManagerState& CAknFepManager::FepManState()
       
  3157     {
       
  3158     return iFepManState;
       
  3159     }
       
  3160 
       
  3161 inline void CAknFepManager::SetCancelPopupInQwerty( TBool aCancelPopupInQwerty )
       
  3162     {
       
  3163     iCancelPopupInQwerty = aCancelPopupInQwerty;
       
  3164     }
       
  3165 inline TInt CAknFepManager::LastChineseInputMode() const
       
  3166     {
       
  3167     return iLastChineseInputMode;
       
  3168     };
       
  3169 #endif //RD_SCALABLE_UI_V2
       
  3170 
       
  3171 /**
       
  3172 * Returns ETrue if Feature manager supports Japanese.
       
  3173 */
       
  3174 inline TBool CAknFepManager::IsFeatureSupportedJapanese() const
       
  3175     {
       
  3176     return iFeatureSupportedJapanese;
       
  3177     }
       
  3178 
       
  3179 /**
       
  3180 * Returns ETrue if Auto Word Completion is enabled in the edtior
       
  3181 */    
       
  3182 inline TBool CAknFepManager::IsAutoCompleteOn() const
       
  3183     {
       
  3184     return iIsAutoCompleteOn;
       
  3185     }
       
  3186 #ifndef RD_INTELLIGENT_TEXT_INPUT
       
  3187 /**
       
  3188 * Setes the current state from GS to the local state
       
  3189 */    
       
  3190     
       
  3191 inline void CAknFepManager::SetAutoCompletionState(TInt aValue) 
       
  3192 {
       
  3193 	iIsAutoCompleteOn = aValue;
       
  3194 }
       
  3195 #endif
       
  3196 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  3197 /**
       
  3198 * @return	TInt 	Typing correction level.
       
  3199 */
       
  3200 inline TInt CAknFepManager::AdvancedPredictiveTypingCorrectionLevel() const
       
  3201 	{
       
  3202 		return iTypingCorrectionLevel;
       
  3203 	}
       
  3204     
       
  3205 /**
       
  3206 * @return   ETrue   If the number candidate shown. EFalse otherwise.
       
  3207 */
       
  3208 inline TBool CAknFepManager::IsAdvancedPredictiveNumberCandidateShown() const
       
  3209 	{
       
  3210 	return iIsNumberCandidateShown;
       
  3211 	}
       
  3212   
       
  3213 /**
       
  3214 * @return   ETrue   If the number candidate shown. EFalse otherwise.
       
  3215 */
       
  3216 inline TBool CAknFepManager::AdvancedPredictivePrimaryCandidate() const
       
  3217 	{
       
  3218 	return iPrimaryCandidate;
       
  3219 	} 
       
  3220 #endif //RD_INTELLIGENT_TEXT_INPUT
       
  3221 
       
  3222 inline TBool CAknFepManager::WasLastKeyPressAHashKey()
       
  3223 	{
       
  3224 	return iLastKeyPressedWasHashKey;
       
  3225 	}
       
  3226     
       
  3227 inline void CAknFepManager::SetLastPressedHashKeyStatus(TBool aStatus)
       
  3228 	{
       
  3229 	iLastKeyPressedWasHashKey = aStatus;
       
  3230 	}
       
  3231 	
       
  3232 inline TCoeInputCapabilities& CAknFepManager::InputCapabilities()
       
  3233     {
       
  3234     return iInputCapabilities;    
       
  3235     }
       
  3236 
       
  3237 inline TFepSymbolOfHardwareOne CAknFepManager::SymbolInfoOfHardKey1()
       
  3238     {
       
  3239     return iSymbolData;
       
  3240     }
       
  3241 inline TBool CAknFepManager::IsSupportNativeNumber() const
       
  3242     {
       
  3243     return ( iLanguageCapabilities.iLocalDigitType == EDigitTypeArabicIndic
       
  3244         || iLanguageCapabilities.iLocalDigitType == EDigitTypeEasternArabicIndic
       
  3245         || iLanguageCapabilities.iLocalDigitType == EDigitTypeDevanagari );
       
  3246 }
       
  3247 
       
  3248 inline TBool CAknFepManager::IsSupportedAdaptiveSearch() const
       
  3249     {
       
  3250     return iAknEditorFlags & EAknEditorFlagAdaptiveSearch;
       
  3251     }
       
  3252     
       
  3253 inline void CAknFepManager::SetGainForeground( TBool aGainForeground )  
       
  3254     {
       
  3255     iGainForeground = aGainForeground;
       
  3256     }
       
  3257 
       
  3258 /**
       
  3259 * Return active input language, only used for languages popup list
       
  3260 */    
       
  3261 inline TInt CAknFepManager::ActiveInputLanguage() const
       
  3262     {
       
  3263     return iActiveInputLanguage;
       
  3264     }
       
  3265 
       
  3266 /**
       
  3267 * Set active input language, only used for languages popup list
       
  3268 */ 
       
  3269 inline void CAknFepManager::SetActiveInputLanguage( TInt aInputLanguage )  
       
  3270     {
       
  3271     iActiveInputLanguage = aInputLanguage;
       
  3272     }
       
  3273 
       
  3274 #endif
       
  3275 
       
  3276 // End of file