fep/aknfep/src/AknFepUiInputStateInitialThaiMultitap.cpp
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     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 *       Provides the TAknFepInputStateInitialThaiMultitap methods.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #include "AknFepUIInputStateInitialThaiMultitap.h"
       
    31 #include "AknFepUIManagerStateInterface.h"      //MAknFepUIManagerStateInterface
       
    32 
       
    33 #include "AknFepCaseManager.h"
       
    34 #include <uikon.hrh>
       
    35 
       
    36 #include <PtiEngine.h>
       
    37 #include <PtiDefs.h>
       
    38 #include <aknSctDialog.h>
       
    39 #include <avkon.rsg>
       
    40 #include <aknfep.rsg>
       
    41 
       
    42 
       
    43 TAknFepInputStateInitialThaiMultitap::
       
    44 TAknFepInputStateInitialThaiMultitap(MAknFepUIManagerStateInterface* aOwner)
       
    45 :TAknFepInputStateInitialMultitapBase(aOwner)
       
    46     {
       
    47     CPtiEngine* ptiengine = iOwner->PtiEngine();
       
    48     TPtiTextCase caseMode = ptiengine->Case();
       
    49     TRAP_IGNORE(ptiengine->ActivateLanguageL(ELangThai))
       
    50     ptiengine->SetCase(caseMode);
       
    51     }
       
    52 
       
    53 TBool TAknFepInputStateInitialThaiMultitap::HandleKeyL(TInt aKey, TKeyPressLength aLength)
       
    54     {
       
    55     MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
       
    56 
       
    57     if(aLength == EShortKeyPress)
       
    58         {
       
    59         if (aKey == EPtiKey0 && fepMan->IsAbleToLaunchSCT())
       
    60         	{			
       
    61             fepMan->LaunchSpecialCharacterTableL(
       
    62                      iOwner->ThaiSCTResourceId(fepMan->PreviousChar(),aKey));
       
    63             return (ETrue);                    	
       
    64         	}
       
    65 		else if (aKey == EPtiKeyStar)        	
       
    66 			{
       
    67 			if (!fepMan->EditSubmenuInUse())		
       
    68 				{
       
    69 				if (fepMan->IsAbleToLaunchSCT())
       
    70         			{
       
    71               		fepMan->LaunchSpecialCharacterTableL(
       
    72               		   iOwner->ThaiSCTResourceId(fepMan->PreviousChar(),aKey));
       
    73                		return (ETrue); 
       
    74                		}        	
       
    75 				}
       
    76 			else
       
    77 				{
       
    78 				fepMan->ClearCcpuFlag(CAknFepManager::ECcpuStateIgnoreStarUp);				
       
    79 				}							
       
    80 			}                        
       
    81         }
       
    82 	else
       
    83 		{
       
    84 		if (aKey == EPtiKeyStar && fepMan->EditSubmenuInUse() && fepMan->IsAbleToLaunchSCT())
       
    85 			{
       
    86             fepMan->LaunchSpecialCharacterTableL(
       
    87                      iOwner->ThaiSCTResourceId(fepMan->PreviousChar(),aKey));
       
    88             return (ETrue);			
       
    89 			}		
       
    90 		}        
       
    91 
       
    92     return (TAknFepInputStateInitialMultitapBase::HandleKeyL(aKey, aLength));
       
    93     }
       
    94 
       
    95 
       
    96 void TAknFepInputStateInitialThaiMultitap::HandleCommandL(TInt aCommandId)
       
    97     {
       
    98     if (aCommandId == EAknCmdEditInsertSymbol)
       
    99         {
       
   100         MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
       
   101         fepMan->LaunchSpecialCharacterTableL(
       
   102                      iOwner->ThaiSCTResourceId(fepMan->PreviousChar(),EPtiKeyStar));
       
   103         }
       
   104     }
       
   105 
       
   106 // End of file