fep/aknfep/inc/AknFepVietnameseToneManager.h
changeset 0 eb1f2e154e89
child 11 c8fb4cf7b3ae
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2003 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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #ifndef __AKN_FEP_VIETNAMESE_TONE_MANAGER__
       
    30 #define __AKN_FEP_VIETNAMESE_TONE_MANAGER__
       
    31 
       
    32 #include <e32def.h>
       
    33 #include <e32base.h>
       
    34 
       
    35 #include "AknFepManager.h"
       
    36 #include "AknFepVietnameseInputTables.h"
       
    37 
       
    38 // CONSTANTS
       
    39 
       
    40 // MACROS
       
    41 
       
    42 // DATA TYPES
       
    43 
       
    44 // FUNCTION PROTOTYPES
       
    45 
       
    46 // FORWARD DECLARATIONS
       
    47 
       
    48 // CLASS DECLARATION
       
    49 
       
    50 /**
       
    51  * CAknFepVietnameseToneManager class.
       
    52  * This class is mounted based on CAknFepUIManagerWestern.
       
    53  *
       
    54  *  @lib AknFep.lib
       
    55  *  @since 2.8
       
    56  */
       
    57 class CAknFepVietnameseToneManager : public CBase
       
    58     {
       
    59 private:
       
    60      /**
       
    61      * Construct
       
    62      *
       
    63      * @param aFepManager fep manager
       
    64      *
       
    65      */
       
    66     void ConstructL();
       
    67 
       
    68      /**
       
    69      * private constructor
       
    70      */
       
    71     CAknFepVietnameseToneManager();     
       
    72     
       
    73 public:
       
    74      /**
       
    75      * NewL first phase construction
       
    76      *
       
    77      * @param aFepManager fep manager
       
    78      *
       
    79      */
       
    80     static CAknFepVietnameseToneManager* NewL();
       
    81 
       
    82      /**
       
    83      * Destructor
       
    84      */
       
    85     virtual ~CAknFepVietnameseToneManager();
       
    86     
       
    87 public:
       
    88     /**
       
    89      * Start the tone mark looping 
       
    90      */
       
    91     TBool StartToneMarkLooping();
       
    92 
       
    93     /**
       
    94      * first phase construction
       
    95      *
       
    96      * @param aParent parent window
       
    97      * @param aPaneLayout the required layout
       
    98      *
       
    99      */
       
   100     TText GetVowelWithToneMark() const;
       
   101 
       
   102     /**
       
   103      * Increase the tone mark
       
   104      */
       
   105     inline void IncrementToneMark();
       
   106 
       
   107     /**
       
   108      * stop tone marking looping, counterpart to StartToneMarkLooping
       
   109      */
       
   110     void StopToneMarkLooping();
       
   111 
       
   112     /**
       
   113      * Set the fep manager pointer
       
   114      *
       
   115      * @param aFepManager Pointer to the fep manager
       
   116      *
       
   117      */
       
   118     inline void SetFepManager(MAknFepManagerUIInterface* aFepManager);
       
   119 
       
   120     /**
       
   121      * Judge if the current state is looping or not
       
   122      */
       
   123     inline TBool IsLooping() const;
       
   124 
       
   125     /**
       
   126      * Judge if the current state is looping or not
       
   127      */
       
   128     inline void SetDeletedVowel(TText aDeletedVowel);
       
   129     
       
   130     /**
       
   131      * Judge if the current state is looping or not
       
   132      */
       
   133     inline TText GetDeletedVowel() const;
       
   134 
       
   135 private:    // Data
       
   136     MAknFepManagerUIInterface* iFepMan;     // not own
       
   137     TInt iToneIndex;                        // Index of tone mark list
       
   138     TInt iVowelIndex;                       // Index of vowel list
       
   139     TBool iIsLooping;                       // Judge if input is in looping state
       
   140     TText iPrevVowel;                       // Prev Vowel, used for undo the backdeletion
       
   141     };
       
   142 
       
   143 // Inline function implementation
       
   144 inline TBool CAknFepVietnameseToneManager::IsLooping() const
       
   145     {
       
   146     return iIsLooping;
       
   147     }
       
   148 
       
   149 inline void CAknFepVietnameseToneManager::SetFepManager(MAknFepManagerUIInterface* aFepManager)
       
   150     {
       
   151     iFepMan = aFepManager;
       
   152     }
       
   153 
       
   154 inline void CAknFepVietnameseToneManager::IncrementToneMark()
       
   155     {
       
   156     if (iToneIndex+1 == KNumberOfToneMarks)
       
   157         iToneIndex = 0;
       
   158     else
       
   159         ++iToneIndex;
       
   160     }
       
   161 
       
   162 inline void CAknFepVietnameseToneManager::SetDeletedVowel(TText aDeletedVowel)
       
   163     {
       
   164     iPrevVowel = aDeletedVowel;
       
   165     }
       
   166 
       
   167 inline TText CAknFepVietnameseToneManager::GetDeletedVowel() const
       
   168     {
       
   169     return iPrevVowel;
       
   170     }
       
   171 
       
   172 #endif // __AKN_FEP_VIETNAMESE_TONE_MANAGER__
       
   173 
       
   174 // End of file