fep/aknfep/inc/aknfepuiinputstatestrokephrasebase.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     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 TAknFepInputStateStrokePhraseBase definition.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #ifndef T_AKNFEPUIINPUTSTATESTROKEPHRASEBASE_H
       
    31 #define T_AKNFEPUIINPUTSTATESTROKEPHRASEBASE_H
       
    32 
       
    33 #include "AknFepUiInputStateChineseBase.h"
       
    34 
       
    35 /**
       
    36  * key struct.
       
    37  * @since S60 v5.0
       
    38  */
       
    39 
       
    40 struct TKeyMap
       
    41     {
       
    42     TUint16 iValue;
       
    43     TInt iKeyCode;
       
    44     };
       
    45 
       
    46 class TAknFepInputStateStrokePhraseBase : public TAknFepInputStateChineseBase
       
    47     {
       
    48 public:
       
    49     
       
    50     /**
       
    51      * C++ default constructor
       
    52      *
       
    53      * @since S60 v5.0
       
    54      * @param aOwner Pointer to UI manager state interface
       
    55      * @param aUIContainer Pointer to Chinese UI container
       
    56      */
       
    57     TAknFepInputStateStrokePhraseBase(
       
    58         MAknFepUIManagerStateInterface* aOwner,
       
    59         MAknFepUICtrlContainerChinese* aUIContainer
       
    60         );
       
    61     
       
    62     /**
       
    63      * Handle system key press event
       
    64      *
       
    65      * @since S60 v5.0
       
    66      * @param aKey System key
       
    67      * @param aLength Key press length
       
    68      * @return ETrue if handle, otherwise this class do not handle this key
       
    69      */
       
    70     TBool HandleKeyL( TInt aKey, TKeyPressLength aLength );
       
    71     
       
    72     /**
       
    73      * Update input window
       
    74      *
       
    75      * @since S60 v5.0
       
    76      * @param aRefresh, if ETRue need to get the screen position, other need not.      
       
    77      * @return None
       
    78      */
       
    79     void RefreshUI( TBool aRefresh = EFalse );
       
    80     
       
    81     /**
       
    82      * Update popup window
       
    83      *
       
    84      * @since S60 v5.0
       
    85      * @return ETrue if the first group stroke is valid, others return EFalse.
       
    86      */
       
    87     TBool CheckFirstGroupStroke();
       
    88 
       
    89     /**
       
    90      * Add phrase to the UDB.
       
    91      * 
       
    92      * @param aPhraseAdd that need to be added to the UDB.
       
    93      * @since S60 v5.0.
       
    94      * @return None.
       
    95      */ 
       
    96     void AddPhraseToDB( const TDesC& aPhraseAdd );    
       
    97 
       
    98     
       
    99     /**
       
   100      * Refresh candidate
       
   101      *
       
   102      * @since S60 V5.0
       
   103      * @return none
       
   104      */
       
   105     void RefreshCandidate();
       
   106     
       
   107     /**
       
   108      * Check key whether need repeat.
       
   109      * 
       
   110      * @since S60 v5.0
       
   111      * @return ETrue if the key need repeat, EFalse others.
       
   112      */
       
   113     TBool CheckKeyNeedRepeat( TKeyPressLength aLength );
       
   114     
       
   115     /**
       
   116      * Get new candidate.
       
   117      * 
       
   118      * @since S60 v5.0
       
   119      * @return None.
       
   120      */
       
   121     void GetNewCandidatesL(const TDesC& aSource, RPointerArray<HBufC>& aList);
       
   122 private:    
       
   123     
       
   124     /**
       
   125      * Handle KeyBackspace event.
       
   126      * 
       
   127      * @param aLength Key press length
       
   128      * @since S60 v5.0
       
   129      * @return ETrue if handle, otherwise this class do not handle this key
       
   130      */
       
   131     void HandleKeyBackspaceL( TKeyPressLength aLength );
       
   132     
       
   133     /**
       
   134      * Entry state handle CBA1 or OK key press event.
       
   135      *
       
   136      * @since S60 v5.0
       
   137      * @param aKey System key
       
   138      * @param aLength Key press length
       
   139      * @return ETrue if handle, otherwise this class do not handle this key
       
   140      */
       
   141     void HandleKeyCBA1OrKeyOKEntry( TKeyPressLength aLength );
       
   142     
       
   143     /**
       
   144      * Edit state handle CBA1 or OK key press event.
       
   145      *
       
   146      * @since S60 v5.0
       
   147      * @param aKey System key
       
   148      * @param aLength Key press length
       
   149      * @return ETrue if handle, otherwise this class do not handle this key
       
   150      */
       
   151     void HandleKeyCBA1OrKeyOKEditL();
       
   152     
       
   153     /**
       
   154      * Handle CBA1 or OK key press event.
       
   155      *
       
   156      * @since S60 v5.0
       
   157      * @param aKey System key
       
   158      * @param aLength Key press length
       
   159      * @return ETrue if handle, otherwise this class do not handle this key
       
   160      */
       
   161     void HandleKeyCBA1OrKeyOKL( TKeyPressLength aLength );
       
   162     
       
   163     /**
       
   164      * Handle default key press event.
       
   165      *
       
   166      * @since S60 v5.0
       
   167      * @param aKey System key
       
   168      * @param aLength Key press length
       
   169      * @return ETrue if handle, otherwise this class do not handle this key
       
   170      */
       
   171     void HandleDefaultKeyL( TInt aKey );
       
   172     
       
   173     /**
       
   174      * Show the showinfo on the EEP ctrl.
       
   175      * 
       
   176      * @since S60 v5.0.
       
   177      * @return None.
       
   178      */
       
   179     void ShowInfoOnEEPPane();
       
   180     
       
   181     /**
       
   182      * Show the showinfo on the candidate ctrl.
       
   183      * 
       
   184      * @since S60 v5.0.
       
   185      * @return None.
       
   186      */
       
   187     void ShowInfoOnCandidatePane();
       
   188     
       
   189     /**
       
   190      * get the show keystroke.
       
   191      * 
       
   192      * @param aKey, the input keystroke.
       
   193      * @param aKeystroke the show keystroke.
       
   194      * @since S60 v5.0.
       
   195      * @return None.
       
   196      */
       
   197     void GetShowKeystroke( TInt aKey, TDes& aKeystroke );
       
   198     
       
   199     /**
       
   200      * Handle horizontal navigation.
       
   201      * 
       
   202      * @param aKey the input keystroke.
       
   203      * @since S60 v5.0.
       
   204      * @return ETrue if high light can move, EFase others.
       
   205      */ 
       
   206     TBool HandleHorizontalNavigation( TInt aKey );
       
   207     
       
   208     /**
       
   209      * Add keystroke.
       
   210      * 
       
   211      * @param aKey the input keystroke.
       
   212      * @since S60 v5.0.
       
   213      * @return ETrue if that the key can add to the current keystroke, EFase others.
       
   214      */            
       
   215     TBool AddKeystrokeL( TInt aKey );
       
   216     
       
   217     /**
       
   218      * Get the candidate info.
       
   219      * 
       
   220      * @since S60 v5.0.
       
   221      * @return none.
       
   222      */            
       
   223     void GetCandidateL();
       
   224     
       
   225     /**
       
   226      * Change CBA.
       
   227      *
       
   228      * @since S60 v5.0
       
   229      * @return None.
       
   230      */        
       
   231     void ChangeCbaL();
       
   232     
       
   233     /**
       
   234      * Update indicator
       
   235      *
       
   236      * @since S60 v5.0
       
   237      * @return None.
       
   238      */
       
   239     void UpdateIndicator();
       
   240     
       
   241     /**
       
   242      * Delete current keystroke.
       
   243      * 
       
   244      * @since S60 v5.0.
       
   245      * @return ETrue if that can be deleted, EFase others.
       
   246      */            
       
   247     TBool DeleteKeystroke();
       
   248     
       
   249     /**
       
   250      * Clear Keystroke of PtiEngine.
       
   251      *
       
   252      * @since S60 v5.0
       
   253      * @return None.
       
   254      */
       
   255     void ClearPtiEngineKeystroke();
       
   256 
       
   257     /**
       
   258      * get the key code.
       
   259      * 
       
   260      * @param aKey, the keycode.
       
   261      * @param aKeystroke, the show keystroke.
       
   262      * @since S60 v5.0
       
   263      * @return none.
       
   264      */
       
   265     void GetKeystrokeCode( TInt& aKey, const TDesC& aKeystroke );
       
   266     
       
   267     /**
       
   268      * Check all the keystroke.
       
   269      * 
       
   270      * @since S60 v5.0.
       
   271      * @return True if All the keystroke is valid.
       
   272      */            
       
   273     TBool CheckAllKeystroke();
       
   274     
       
   275     /**
       
   276      * Revert the phrase to keystroke.
       
   277      * @since S60 v5.0
       
   278      * @return none.
       
   279      */
       
   280     void RevertPhraseToKeystrokeL();
       
   281     
       
   282     /**
       
   283      * set warning color.
       
   284      * 
       
   285      * @since S60 v5.0.
       
   286      * @return none.
       
   287      */         
       
   288     void SetWarningColor();
       
   289     
       
   290     /**
       
   291      * Move the cursor to Left.
       
   292      * 
       
   293      * @since S60 v5.0.
       
   294      * @return none.
       
   295      */         
       
   296     void MoveCursorLeft();
       
   297     
       
   298     /**
       
   299      * Move the cursor to Right.
       
   300      * 
       
   301      * @since S60 v5.0.
       
   302      * @return none.
       
   303      */         
       
   304     void MoveCursorRight();
       
   305 
       
   306     };		
       
   307 
       
   308 #endif //T_AKNFEPUIINPUTSTATESTROKEPHRASEBASE_H
       
   309 
       
   310 // End of file