fep/aknfep/inc/aknfepuiinputstateminiqwertyzhuyinphrase.h
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     1 /*
       
     2 * Copyright (c) 2007 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 TAknFepInputStateEntryMiniQwertyZhuyinPhrase,
       
    16 *       TAknFepInputStateEditingMiniQwertyZhuyinPhrase,
       
    17 *       TAknFepUiInputStateCandidateMiniQwertyZhuyinPhrase definition.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 
       
    31 
       
    32 #ifndef AKNFEPUIINPUTSTATEMINIQWERTYZHUYINPHRASE_H_
       
    33 #define AKNFEPUIINPUTSTATEMINIQWERTYZHUYINPHRASE_H_
       
    34 
       
    35 #include "aknfepuiinputminiqwertyzhuyinphrasebase.h"
       
    36 
       
    37 /**
       
    38  *  TAknFepInputStateEntryMiniQwertyZhuyinPhrase class.
       
    39  *
       
    40  *  Implementation of Zhuyin phrase editing state
       
    41  *
       
    42  *  @lib avkonfep.dll
       
    43  *  @since S60 v3.2
       
    44  */
       
    45 
       
    46 class TAknFepInputStateEditingMiniQwertyZhuyinPhrase : public TAknFepInputMiniQwertyZhuyinPhraseBase
       
    47     {
       
    48 public:
       
    49     /**
       
    50      * C++ default constructor
       
    51      *
       
    52      * @since S60 V3.2
       
    53      * @param aOwner Pointer to UI manager state interface
       
    54      * @param aUIContainer Pointer to Chinese UI container
       
    55      */
       
    56     TAknFepInputStateEditingMiniQwertyZhuyinPhrase(
       
    57             MAknFepUIManagerStateInterface* aOwner,
       
    58             MAknFepUICtrlContainerChinese* aUIContainer );
       
    59     
       
    60     /**
       
    61      * From TAknFepInputStateCandidateBasePhrase
       
    62      * Handle system key press
       
    63      *
       
    64      * @since S60 v3.2
       
    65      * @param aKey System key event
       
    66      * @param aLength Key press length
       
    67      * @return ETrue if handle, otherwise this class do not handle this key
       
    68      */
       
    69      TBool HandleKeyL( TInt aKey, TKeyPressLength aLength );
       
    70      
       
    71      /**
       
    72       * Handling Command events.
       
    73       * This Method is called by CAknFepUIManagerJapanese.
       
    74       *
       
    75       * @param aCommandId Command ID value
       
    76       */
       
    77      void HandleCommandL( TInt aCommandId );
       
    78      
       
    79      /**
       
    80       * Add keystroke.
       
    81       * 
       
    82       * @since S60 v3.2.3.
       
    83       * @param aKey the input keystroke.
       
    84       * @return ETrue if that the key can add to the current keystroke, EFase others.
       
    85       */            
       
    86      TBool AddKeystrokeL( TInt aKey );
       
    87      
       
    88      /**
       
    89       * Revert the phrase to keystroke.
       
    90       * 
       
    91       * @since S60 v3.2.3.
       
    92       * @return None.
       
    93       */
       
    94      void RevertPhraseToKeystrokeL();
       
    95      
       
    96      /**
       
    97       * Add phrase to DB.
       
    98       * 
       
    99       * @since S60 v3.2.3.
       
   100       * @param aPhraseAdd The phrase to be added
       
   101       * @return None.
       
   102       */
       
   103      void AddPhraseToDB( const TDesC& aPhraseAdd );
       
   104      
       
   105      /**
       
   106       * Move the cursor to Left.
       
   107       * 
       
   108       * @since S60 v3.2.3.
       
   109       * @return ETrue if cursor can be moved, other EFalse.
       
   110       */         
       
   111      TBool MoveCursorLeft();
       
   112      
       
   113      /**
       
   114       * Move the cursor to Right.
       
   115       * 
       
   116       * @since S60 v3.2.3.
       
   117       * @return ETrue if cursor can be moved, other EFalse.
       
   118       */         
       
   119      TBool MoveCursorRight();
       
   120 
       
   121      /**
       
   122       * Handle Key Backspace
       
   123       * 
       
   124       * @since S60 v3.2.3.
       
   125       * @return None.
       
   126       */  
       
   127      void HandleKeyBackspaceL( TKeyPressLength aLength );
       
   128      
       
   129      /**
       
   130       * Commit content
       
   131       * 
       
   132       * @since S60 v3.2.3.
       
   133       * param aAddUDB ETrue if the content need to be added to UDB, otherwise EFalse.
       
   134       * @return None.
       
   135       */ 
       
   136      void CommitContentL( TBool aAddUDB );
       
   137      
       
   138      /**
       
   139       * Handle commit action
       
   140       * 
       
   141       * @since S60 v3.2.3.
       
   142       * @return None.
       
   143       */
       
   144      void HandleCommitL();
       
   145      
       
   146      /**
       
   147       * Refresh UI if necessary
       
   148       * 
       
   149       * @since S60 v3.2.3.
       
   150       * @return None.
       
   151       */
       
   152      void RefreshUI();
       
   153      
       
   154      /**
       
   155       * Refresh UI if necessary
       
   156       * 
       
   157       * @since S60 v3.2.3.
       
   158       * @return None.
       
   159       */
       
   160      void ImplicityShowInfo( TBool aGetScreenCoordinates );
       
   161 
       
   162      /**
       
   163       * Refresh UI if necessary
       
   164       * 
       
   165       * @since S60 v3.2.3.
       
   166       * @return None.
       
   167       */
       
   168      void ImplicityShowInfoL( TBool aGetScreenCoordinates );
       
   169      
       
   170      /**
       
   171       * Show EEP Info
       
   172       * 
       
   173       * @since S60 v3.2.3.
       
   174       * @return None.
       
   175       */
       
   176      void ShowEEPInfo();
       
   177     };
       
   178 
       
   179 /**
       
   180  *  TAknFepInputStateSpellingMiniQwertyZhuyin class.
       
   181  *
       
   182  *  Implementation of Zhuyin phrase spelling selection state
       
   183  *
       
   184  *  @lib avkonfep.dll
       
   185  *  @since S60 v3.2
       
   186  */
       
   187 class TAknFepInputStateSpellingMiniQwertyZhuyin: public TAknFepInputMiniQwertyZhuyinPhraseBase
       
   188     {
       
   189 public:
       
   190 
       
   191     /**
       
   192      * C++ default constructor
       
   193      *
       
   194      * @since S60 V3.2
       
   195      * @param aOwner Pointer to UI manager state interface
       
   196      * @param aUIContainer Pointer to Chinese UI container
       
   197      */
       
   198     TAknFepInputStateSpellingMiniQwertyZhuyin(
       
   199         MAknFepUIManagerStateInterface* aOwner,
       
   200         MAknFepUICtrlContainerChinese* aUIContainer );
       
   201     
       
   202     /**
       
   203      * Handling Command events.
       
   204      * This Method is called by CAknFepUIManagerJapanese.
       
   205      *
       
   206      * @param aCommandId Command ID value
       
   207      */
       
   208     void HandleCommandL( TInt aCommandId );
       
   209 
       
   210 private:
       
   211     /**
       
   212      * From TAknFepInputStateCandidateBasePhrase
       
   213      * Handle system key press
       
   214      *
       
   215      * @since S60 v3.2
       
   216      * @param aKey System key event
       
   217      * @param aLength Key press length
       
   218      * @return ETrue if handle, otherwise this class do not handle this key
       
   219      */
       
   220     TBool HandleKeyL(TInt aKey, TKeyPressLength aLength);
       
   221 
       
   222     /**
       
   223      * Refresh UI if necessary
       
   224      * 
       
   225      * @since S60 v3.2.3.
       
   226      * @return None.
       
   227      */
       
   228     void RefreshUI();
       
   229     
       
   230     /**
       
   231      * Refresh vaild key stroke length
       
   232      * 
       
   233      * @since S60 v3.2.3.
       
   234      * @return None.
       
   235      */
       
   236     void RefreshVaildKeyStroke();
       
   237     };
       
   238 
       
   239 class TAknFepInputStateCanindateSelectingMiniQwertyZhuyin : public TAknFepInputMiniQwertyZhuyinPhraseBase
       
   240     {
       
   241 public:
       
   242     /**
       
   243      * C++ default constructor
       
   244      *
       
   245      * @since S60 v3.2.3
       
   246      * @param aOwner Pointer to UI manager state interface
       
   247      * @param aUIContainer Pointer to Chinese UI container
       
   248      */
       
   249     TAknFepInputStateCanindateSelectingMiniQwertyZhuyin(
       
   250         MAknFepUIManagerStateInterface* aOwner,
       
   251         MAknFepUICtrlContainerChinese* aUIContainer
       
   252         );
       
   253    /**
       
   254     * From TAknFepInputStateMiniQwertyZhuyinPhraseCreationBase
       
   255     * Handle system key press
       
   256     *
       
   257     * @since S60 v3.2
       
   258     * @param aKey System key event
       
   259     * @param aLength Key press length
       
   260     * @return ETrue if handle, otherwise this class do not handle this key
       
   261     */
       
   262    TBool HandleKeyL(TInt aKey, TKeyPressLength aLength);
       
   263    
       
   264    /**
       
   265     * Handling Command events.
       
   266     * This Method is called by CAknFepUIManagerJapanese.
       
   267     *
       
   268     * @param aCommandId Command ID value
       
   269     */
       
   270    void HandleCommandL( TInt aCommandId );
       
   271    
       
   272    /**
       
   273      * commit the selected character into the editor pane 
       
   274      * @since S60 v3.2
       
   275      * @return none
       
   276      */
       
   277    void CommitCandidateL();
       
   278    
       
   279    /**
       
   280      * Check the select candidate numeric key is valid or not
       
   281      * @since S60 v3.2
       
   282      * @return ETure if the select number is valid ,others is EFalse
       
   283      */
       
   284    TBool SelectCandidate( TInt aKey );
       
   285    
       
   286    /**
       
   287      * the postion of the first tonemark appeared 
       
   288      * @since S60 v3.2
       
   289      */
       
   290     TInt GetIndexOfToneMark( const TDesC& aText);
       
   291     };
       
   292 
       
   293 #endif /*AKNFEPUIINPUTSTATEMINIQWERTYZHUYINPHRASE_H_*/