fep/aknfep/inc/aknfepuiinputminiqwertystrokephrasebase.h
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     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 TAknFepInputMiniQwertyStrokePhraseBase definition.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #ifndef T_AKNFEPUIINPUTMINIQWERTYSTROKEPHRASEBASE_H
       
    31 #define T_AKNFEPUIINPUTMINIQWERTYSTROKEPHRASEBASE_H
       
    32 
       
    33 //#include "AknFepUiInputStateChineseBase.h"
       
    34 #include "AknFepUiInputStateCandidateQwertyBaseChinesePhrase.h"
       
    35 
       
    36 /**
       
    37  * key struct.
       
    38  * @since S60 v3.2.3
       
    39  */
       
    40 
       
    41 class TAknFepInputMiniQwertyStrokePhraseBase : public TAknFepInputStateCandidateQwertyBaseChinesePhrase
       
    42     {
       
    43 public:
       
    44     /**
       
    45      * change state flag.
       
    46      */
       
    47     enum TAknFepStrokePhraseChange
       
    48         {
       
    49         EManualChangeState,
       
    50         EAutoChangeStateFromInput,
       
    51         EAutoChangeStateFromCandidate
       
    52         };
       
    53     
       
    54     /**
       
    55      * C++ default constructor
       
    56      *
       
    57      * @since S60 v3.2.3
       
    58      * @param aOwner Pointer to UI manager state interface
       
    59      * @param aUIContainer Pointer to Chinese UI container
       
    60      */
       
    61     TAknFepInputMiniQwertyStrokePhraseBase(
       
    62         MAknFepUIManagerStateInterface* aOwner,
       
    63         MAknFepUICtrlContainerChinese* aUIContainer
       
    64         );
       
    65     
       
    66     /**
       
    67      * Handle system key press event
       
    68      *
       
    69      * @since S60 v3.2.3
       
    70      * @param aKey System key
       
    71      * @param aLength Key press length
       
    72      * @return ETrue if handle, otherwise this class do not handle this key
       
    73      */
       
    74     TBool HandleKeyL( TInt aKey, TKeyPressLength aLength );
       
    75     
       
    76     /**
       
    77      * Update input window
       
    78      *
       
    79      * @since S60 v3.2.3
       
    80      * @param aRefresh, if ETRue need to get the screen position, other need not.      
       
    81      * @return None
       
    82      */
       
    83     void RefreshUI();
       
    84     
       
    85     /**
       
    86      * check the first group stroke of keystroke.
       
    87      *
       
    88      * @since S60 v3.2.3
       
    89      * @return ETrue if the first group stroke is valid, others return EFalse.
       
    90      */
       
    91     TBool CheckFirstGroupStroke();
       
    92 
       
    93     /**
       
    94      * Add phrase to the UDB.
       
    95      * 
       
    96      * @param aPhraseAdd that need to be added to the UDB.
       
    97      * @since S60 v3.2.3.
       
    98      * @return None.
       
    99      */ 
       
   100     void AddPhraseToDB( const TDesC& aPhraseAdd );    
       
   101 
       
   102     
       
   103     /**
       
   104      * Refresh candidate
       
   105      *
       
   106      * @since S60 v3.2.3
       
   107      * @return none
       
   108      */
       
   109     void RefreshCandidate();
       
   110     
       
   111     /**
       
   112      * Check key whether need repeat.
       
   113      * 
       
   114      * @since S60 v3.2.3
       
   115      * @return ETrue if the key need repeat, EFalse others.
       
   116      */
       
   117     TBool CheckKeyNeedRepeat( TKeyPressLength aLength );
       
   118     
       
   119     /**
       
   120      * Commint text to EEP or editor
       
   121      *
       
   122      * @since S60 V3.2.3
       
   123      * @param aDes Text had been select from candidate pane
       
   124      * @return ETrue if keep state, otherwise need to change to pridictive or editor
       
   125      */
       
   126     TBool CommitInlineEEPL( const TDesC& aDes );
       
   127     
       
   128     /**
       
   129      * Update indicator
       
   130      *
       
   131      * @since S60 v3.2.3
       
   132      * @return None.
       
   133      */
       
   134     void UpdateIndicator();
       
   135     
       
   136     /**
       
   137       * Do action afer commit, change state to predictive or not.
       
   138       *
       
   139       * @since S60 v3.2.3
       
   140       * @return None.
       
   141       */
       
   142     void DoActionAfterCommit();
       
   143     
       
   144     /**
       
   145      * Handling Command events.
       
   146      * This Method is called by CAknFepUIManagerJapanese.
       
   147      *
       
   148      * @param aCommandId Command ID value
       
   149      */
       
   150     void HandleCommandL( TInt aCommandId );
       
   151 private:
       
   152     
       
   153     /**
       
   154      * Handle key from candidate.
       
   155      *
       
   156      * @since S60 v3.2.3
       
   157      * @param aKey System key
       
   158      * @param aLength Key press length
       
   159      * return None
       
   160      */
       
   161     void HandleKeyFromCandidateL(TInt aKey, TKeyPressLength aLength );
       
   162     
       
   163     /**
       
   164      * Handle CBA1 or select event.
       
   165      * 
       
   166      * @since S60 v3.2.3
       
   167      * @return None.
       
   168      */
       
   169     void HandleCommitL( TKeyPressLength aLength );
       
   170     
       
   171     /**
       
   172      * Auto change state.
       
   173      * 
       
   174      * @since S60 v3.2.3
       
   175      * @return Etru auto change state,ohters don't change state.
       
   176      */
       
   177     TBool HandleAutoChangeState();
       
   178     
       
   179     /**
       
   180      * Handle KeyBackspace event.
       
   181      * 
       
   182      * @param aLength Key press length
       
   183      * @since S60 v3.2.3
       
   184      * @return ETrue if handle, otherwise this class do not handle this key
       
   185      */
       
   186     void HandleKeyBackspaceL( TKeyPressLength aLength );
       
   187     
       
   188     /**
       
   189      * Handle default event.
       
   190      *
       
   191      * @since S60 v3.2.3
       
   192      * @param aKey System key
       
   193      * @param aLength Key press length
       
   194      * @return ETrue if handle, otherwise this class do not handle this key
       
   195      */
       
   196     TBool HandleDefaultL( TInt aKey, TKeyPressLength aLength );
       
   197     
       
   198     /**
       
   199      * Handle default key press event.
       
   200      *
       
   201      * @since S60 v3.2.3
       
   202      * @param aKey System key
       
   203      * @return none.
       
   204      */
       
   205     void HandleDefaultKeyL( TInt aKey );
       
   206     
       
   207     /**
       
   208      * Show the showinfo on the EEP ctrl.
       
   209      * 
       
   210      * @since S60 v3.2.3.
       
   211      * @return None.
       
   212      */
       
   213     void ShowInfoOnEEPPane();
       
   214     
       
   215     /**
       
   216      * Show the showinfo on the candidate ctrl.
       
   217      * 
       
   218      * @since S60 v3.2.3.
       
   219      * @return None.
       
   220      */
       
   221     void ShowInfoOnCandidatePane();
       
   222     
       
   223     /**
       
   224      * Handle horizontal navigation.
       
   225      * 
       
   226      * @param aKey the input keystroke.
       
   227      * @since S60 v3.2.3.
       
   228      * @return ETrue if high light can move, EFase others.
       
   229      */ 
       
   230     TBool HandleHorizontalNavigation( TInt aKey );
       
   231     
       
   232     /**
       
   233      * Add keystroke.
       
   234      * 
       
   235      * @param aKey the input keystroke.
       
   236      * @since S60 v3.2.3.
       
   237      * @return ETrue if that the key can add to the current keystroke, EFase others.
       
   238      */            
       
   239     TBool AddKeystrokeL( TInt aKey );
       
   240     
       
   241     /**
       
   242      * Get the candidate info.
       
   243      * 
       
   244      * @since S60 v3.2.3.
       
   245      * @return none.
       
   246      */            
       
   247     void GetCandidateL();
       
   248     
       
   249     /**
       
   250      * Change CBA.
       
   251      *
       
   252      * @since S60 v3.2.3
       
   253      * @return None.
       
   254      */        
       
   255     void ChangeCbaL();
       
   256     
       
   257     /**
       
   258      * Delete current keystroke.
       
   259      * 
       
   260      * @since S60 v3.2.3.
       
   261      * @return ETrue if that can be deleted, EFase others.
       
   262      */            
       
   263     TBool DeleteKeystroke();
       
   264     
       
   265     /**
       
   266      * Clear Keystroke of PtiEngine.
       
   267      *
       
   268      * @since S60 v3.2.3
       
   269      * @return None.
       
   270      */
       
   271     void ClearPtiEngineKeystroke();
       
   272     
       
   273     /**
       
   274      * get the show keystroke.
       
   275      * 
       
   276      * @param aKey, the input keystroke.
       
   277      * @param aKeystroke the show keystroke.
       
   278      * @since S60 v3.2.3.
       
   279      * @return None.
       
   280      */
       
   281     void GetShowKeystroke( TInt aKey, TDes& aKeystroke );    
       
   282     
       
   283     /**
       
   284      * Revert the phrase to keystroke.
       
   285      * @since S60 v3.2.3
       
   286      * @return none.
       
   287      */
       
   288     void RevertPhraseToKeystrokeL();
       
   289     
       
   290     /**
       
   291      * set warning color.
       
   292      * 
       
   293      * @since S60 v3.2.3.
       
   294      * @return none.
       
   295      */         
       
   296     void SetWarningColor();
       
   297     
       
   298     /**
       
   299      * Move the cursor to Left.
       
   300      * 
       
   301      * @since S60 v3.2.3.
       
   302      * @return ETrue if cursor can be moved, other EFalse.
       
   303      */         
       
   304     TBool MoveCursorLeft();
       
   305     
       
   306     /**
       
   307      * Move the cursor to Right.
       
   308      * 
       
   309      * @since S60 v3.2.3.
       
   310      * @return ETrue if cursor can be moved, other EFalse.
       
   311      */         
       
   312     TBool MoveCursorRight();
       
   313 
       
   314     /**
       
   315      * check the all group stroke of keystroke.
       
   316      *
       
   317      * @since S60 v3.2.3
       
   318      * @return ETrue if the first group stroke is valid, others return EFalse.
       
   319      */
       
   320     TBool CheckAllGroupStroke();
       
   321     
       
   322     /**
       
   323       * Do action afer commit, change state to predictive or not.
       
   324       *
       
   325       * @since S60 v3.2.3
       
   326       * @return None.
       
   327       */
       
   328     void DoActionAfterCommitL();
       
   329     
       
   330     /**
       
   331      * check the delimeter 
       
   332      * @ aKeystroke   the key stroke
       
   333      * @@since S60 v3.2.3
       
   334      * @return ETrue if the key stoke is the delimeter ,otherwise return EFalse .
       
   335      */
       
   336    TBool CheckSpellingDLT( const TDesC& aKeystroke );
       
   337 
       
   338     };		
       
   339 
       
   340 #endif //T_AKNFEPUIINPUTMINIQWERTYSTROKEPHRASEBASE_H
       
   341 
       
   342 // End of file