fep/aknfep/src/aknfepuimanagerfingeritutchinese.cpp
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     1 /*
       
     2 * Copyright (c) 2002 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:            Chinese finger ITUT ui manager implementation file.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 // INCLUDE FILES
       
    30 #include <e32keys.h>
       
    31 #include <AknFepPluginManager.h>
       
    32 #include <PtiEngine.h> 
       
    33 #include <PtiDefs.h>
       
    34 
       
    35 #include "AknFepUiManagerBase.h"
       
    36 #include "aknfepuimanagerfingeritutchinese.h"
       
    37 #include "AknFepManagerUIInterface.h"
       
    38 #include "AknFepGlobalEnums.h"
       
    39 #include "aknfepuifingeritutinputstategeneric.h"
       
    40 #include "AknFepCaseManager.h"
       
    41 #include "AknFepPanic.h"
       
    42 
       
    43 //============================ MEMBER FUNCTIONS ==============================
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // Symbian constructor
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 CAknFepUIManagerFingerItutChinese* CAknFepUIManagerFingerItutChinese::NewL(
       
    50     MAknFepManagerUIInterface* aFepMan, CAknFepCaseManager* aCaseMan, 
       
    51     TLanguage aLanguage, CAknFepPluginManager* aPluginMager)
       
    52     {   
       
    53     CAknFepUIManagerFingerItutChinese* self = new(ELeave)
       
    54         CAknFepUIManagerFingerItutChinese(aFepMan, aCaseMan, aPluginMager);
       
    55         
       
    56     CleanupStack::PushL(self);
       
    57     self->ConstructL(aLanguage);
       
    58     CleanupStack::Pop();
       
    59 
       
    60     return self;
       
    61     }
       
    62 
       
    63 // ---------------------------------------------------------------------------
       
    64 // Destructor
       
    65 // ---------------------------------------------------------------------------
       
    66 //
       
    67 CAknFepUIManagerFingerItutChinese::~CAknFepUIManagerFingerItutChinese()
       
    68     {
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // Handle key event
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 TBool CAknFepUIManagerFingerItutChinese::HandleKeyL( TInt aKey, TKeyPressLength aLength,
       
    76 		                                            TEventCode /*aEventCode*/ )
       
    77     {
       
    78     TUIState currentState = iFepUiState.State();
       
    79     if (aLength == EShortKeyPress)
       
    80         {
       
    81         iInitialFepUIState = currentState;
       
    82         }
       
    83 
       
    84     if(!iPluginMager->CurrentPluginInputFepUI()->HandleKeyL(
       
    85          aKey == EStdKeyNull ? EPtiKeyStar : aKey , aLength))
       
    86         {
       
    87         return iStatePtr->HandleKeyL(aKey, aLength); // Failed to handle it
       
    88         }
       
    89         
       
    90     return ETrue; // It is ok.
       
    91     }
       
    92 
       
    93 // ---------------------------------------------------------------------------
       
    94 // Close current Finger ITUT ui
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 void CAknFepUIManagerFingerItutChinese::CloseUI()
       
    98     {
       
    99     }
       
   100 
       
   101 // ---------------------------------------------------------------------------
       
   102 // Input mode is supported by this ui
       
   103 // ---------------------------------------------------------------------------
       
   104 //
       
   105 TInt CAknFepUIManagerFingerItutChinese::SupportLanguage(TInt /*aMode*/) const
       
   106     {
       
   107     return iLanguage;
       
   108     }
       
   109 
       
   110 // ---------------------------------------------------------------------------
       
   111 // Change state machine
       
   112 // ---------------------------------------------------------------------------
       
   113 //
       
   114 TUIState CAknFepUIManagerFingerItutChinese::ChangeState(TUIState /* aState*/)
       
   115     {
       
   116     // ask pti engine if phrase input is supported
       
   117     return iStatePtr->State();
       
   118     }
       
   119 
       
   120 // ---------------------------------------------------------------------------
       
   121 // Get current fep ui state machine
       
   122 // ---------------------------------------------------------------------------
       
   123 //
       
   124 TAknFepInputStateBase* CAknFepUIManagerFingerItutChinese::FepUIState()
       
   125     {
       
   126     return &iFepUiState;
       
   127     }
       
   128 
       
   129 // ---------------------------------------------------------------------------
       
   130 // Set current input language
       
   131 // ---------------------------------------------------------------------------
       
   132 //
       
   133 void CAknFepUIManagerFingerItutChinese::SetInputLanguageL(TLanguage aLanguage)
       
   134     {
       
   135     iLanguage = aLanguage;
       
   136     }
       
   137 
       
   138 // ---------------------------------------------------------------------------
       
   139 // C++ default constructor
       
   140 // ---------------------------------------------------------------------------
       
   141 //
       
   142 CAknFepUIManagerFingerItutChinese::CAknFepUIManagerFingerItutChinese(
       
   143     MAknFepManagerUIInterface* aFepMan, 
       
   144     CAknFepCaseManager* aCaseMan, 
       
   145     CAknFepPluginManager* aPluginMager)
       
   146     : CAknFepUIManagerBase(aFepMan, aCaseMan),
       
   147     iFepUiState(NULL),
       
   148     iPrevMode(ENumber),
       
   149     iPluginMager(aPluginMager)
       
   150     {
       
   151     }
       
   152 
       
   153 // ---------------------------------------------------------------------------
       
   154 // Symbian second-phase constructor
       
   155 // ---------------------------------------------------------------------------
       
   156 //
       
   157 void CAknFepUIManagerFingerItutChinese::ConstructL(TLanguage aLanguage)
       
   158     {
       
   159     CAknFepUIManagerBase::ConstructL(aLanguage);
       
   160     SetMode(iFepMan->InputMode(), ETrue, EFalse);
       
   161     iFepUiState = TAknFepUIFingerItutInputStateChineseGeneric(this/*, NULL*/);
       
   162     }
       
   163 
       
   164 // ---------------------------------------------------------------------------
       
   165 // Change ITUT state machine
       
   166 // ---------------------------------------------------------------------------
       
   167 //
       
   168 void CAknFepUIManagerFingerItutChinese::ChangeStatetItut(TUIState /* aState*/)
       
   169     {
       
   170     }
       
   171 
       
   172 // End of file