fep/aknfep/inc/aknfepuiinputminiqwertysogoupinyinphraseplugin.h
branchRCL_3
changeset 56 8152b1f1763a
parent 50 5a1685599b76
child 57 9eb76adaa71f
equal deleted inserted replaced
50:5a1685599b76 56:8152b1f1763a
     1 /*
       
     2 * Copyright (c) 2008 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 TAknFepInputMiniQwertySogouPinyinPhrasePlugin declaration.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef T_AKNFEPUIINPUTMINIQWERTYSOGOUPINYINPHRASEPLUGIN_H
       
    21 #define T_AKNFEPUIINPUTMINIQWERTYSOGOUPINYINPHRASEPLUGIN_H
       
    22 
       
    23 class TAknFepInputMiniQwertySogouPinyinPhrasePlugin
       
    24     {
       
    25 public:
       
    26     
       
    27     /**
       
    28      * C++ default constructor
       
    29      *
       
    30      * @since S60 v3.2.3
       
    31      * @param aOwner Pointer to UI manager state interface
       
    32      * @param aUIContainer Pointer to Chinese UI container
       
    33      * @param aState current state machine
       
    34      */
       
    35     TAknFepInputMiniQwertySogouPinyinPhrasePlugin(
       
    36         MAknFepUIManagerStateInterface* aOwner,
       
    37         MAknFepUICtrlContainerChinese* aUIContainer,
       
    38         TUIState aState
       
    39         );
       
    40     
       
    41     /**
       
    42      * A patch to force the vtable to be copied during an assignment.
       
    43      * 
       
    44      * @param aState
       
    45      */
       
    46     void operator=(const TAknFepInputMiniQwertySogouPinyinPhrasePlugin& aPlugin);
       
    47     
       
    48 public:       
       
    49         /**
       
    50          * Add phrase pinyin to the core.
       
    51          *  
       
    52          * @since S60 v3.2.3.
       
    53          * @param aPhraseAdd that need to be added to the UDB.
       
    54          * @return None.
       
    55          */ 
       
    56         void AddPhrasePinyinToPti(); 
       
    57         
       
    58         /**
       
    59          * Analyse spelling after user press key.
       
    60          * 
       
    61          * @since S60 v3.2.3
       
    62          * @param None.
       
    63          * @return None.
       
    64          */
       
    65         void AnalyseL();
       
    66         
       
    67         /**
       
    68          * Commint text to EEP or editor
       
    69          *
       
    70          * @since S60 V3.2.3
       
    71          * @param aDes Text had been select from candidate pane
       
    72          * @return ETrue if keep state, otherwise need to change to pridictive or editor
       
    73          */
       
    74         TBool CommitInlineEEPL( const TDesC& aDes );    
       
    75         
       
    76         /**
       
    77          * Enable or disable the plugin.
       
    78          *
       
    79          * @since S60 v3.2.3
       
    80          * @param aValid ETrue: enable the plugin, EFalse: disable the plugin.
       
    81          * @return None
       
    82          */
       
    83         void Enable( TBool aValid );
       
    84         
       
    85         /**
       
    86          * Detect whether the plugin enable or not.
       
    87          *
       
    88          * @since S60 v3.2.3
       
    89          * @param None
       
    90          * @return ETrue if the plugin is enable, others return EFalse.
       
    91          */
       
    92         TBool IsEnable();    
       
    93         
       
    94         /**
       
    95          * Get the candidate info.
       
    96          * 
       
    97          * @since S60 v3.2.3.
       
    98          * @param None.
       
    99          * @return none.
       
   100          */            
       
   101         void GetCandidateL();
       
   102         
       
   103         /**
       
   104          * Set whether to convert all stroke.
       
   105          * 
       
   106          * @since S60 v3.2.3.
       
   107          * @param None.
       
   108          * @return none.
       
   109          */            
       
   110         void CanConvertAll( TBool aEnable );
       
   111         
       
   112         /**
       
   113          * Set the convert count.
       
   114          * 
       
   115          * @since S60 v3.2.3.
       
   116          * @param None.
       
   117          * @return none.
       
   118          */            
       
   119         void ConvertCount( TInt aCount );
       
   120         
       
   121 private:
       
   122         /**
       
   123          * Check the delimiter of spelling.
       
   124          * 
       
   125          * @since S60 v3.2.3.
       
   126          * @param aKeystroke the keystroke.
       
   127          * @return ETrue if the param is delimiter, EFalse others.
       
   128          */         
       
   129         TBool CheckSpellingDLT( const TDesC& aKeystroke );
       
   130         
       
   131         /**
       
   132          * Clear Keystroke of PtiEngine.
       
   133          *
       
   134          * @since S60 v3.2.3.
       
   135          * @param None.
       
   136          * @return None.
       
   137          */
       
   138         void ClearPtiEngineKeystroke();
       
   139         
       
   140         /**
       
   141          * Get pinyin tone mark.
       
   142          * 
       
   143          * @since S60 v3.2.3.
       
   144          * @param aKeystroke,The tone mark.
       
   145          * @return pinyin tone mark.
       
   146          */         
       
   147         TInt ToneMark( const TDesC& aKeystroke );
       
   148         
       
   149         /**
       
   150          * Check the spelling after add tone mark to the PTI.
       
   151          * 
       
   152          * @since S60 v3.2.3.
       
   153          * @param aToneMark,The tone mark.
       
   154          * @return ETue,if the splling is not phrase spelling,EFalse others.
       
   155          */         
       
   156         TBool CheckSpellingAddToneMarkToPTIL( const TInt aToneMark );        
       
   157         
       
   158         /**
       
   159          * get the key code.
       
   160          * 
       
   161          * @since S60 v3.2.3
       
   162          * @param aKey, the keycode.
       
   163          * @param aKeystroke, the show keystroke.
       
   164          * @return none.
       
   165          */
       
   166         void GetKeystrokeCode( TInt& aKey, const TDesC& aKeystroke );
       
   167         
       
   168         /**
       
   169          * get the spell of least delimiter
       
   170          *
       
   171          * @since S60 v3.2.3
       
   172          * @return the spell of least delimiter
       
   173          */
       
   174         TPtrC getCurrentLeastDLTSpell();    
       
   175         
       
   176         /**
       
   177          * check result of tonemark.
       
   178          *
       
   179          * @since S60 v3.2.3
       
   180          * @param aDes The result of tonemark
       
   181          * @param aIndex The index
       
   182          * @return NULL
       
   183          */
       
   184         void CheckResultOfToneMark( const TDesC16& aDes,
       
   185                                     TInt& aIndex );
       
   186         
       
   187 private:
       
   188         /**
       
   189          * The ui manager
       
   190          */        
       
   191         MAknFepUIManagerStateInterface* iOwner;
       
   192                 
       
   193         /**
       
   194          * The ui container.
       
   195          */
       
   196         MAknFepUICtrlContainerChinese* iUIContainer;
       
   197         
       
   198         /**
       
   199          * The machine state
       
   200          */           
       
   201         TUIState iState;
       
   202         
       
   203         /**
       
   204          * The flag for judge the plugin enable or not
       
   205          */               
       
   206         TBool iValid;
       
   207         
       
   208         /**
       
   209          * The flag for adding DLT at the first index.
       
   210          */ 
       
   211         TBool iNeedAddDLT;
       
   212         
       
   213         /**
       
   214          * The flag for convert all stroke.
       
   215          */ 
       
   216         TBool iCanConvertAll;
       
   217         
       
   218         /**
       
   219          * The count of stroke need to be convert.
       
   220          */ 
       
   221         TInt iConvertCount;
       
   222     };		
       
   223 
       
   224 #endif //T_AKNFEPUIINPUTMINIQWERTYSOGOUPINYINPHRASEPLUGIN_H
       
   225 
       
   226 // End of file