fep/aknfep/src/AknFepUiInputStateCandidateQwertyZhuyin.cpp
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2005 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 TAknFepInputStateCandidateQwertyZhuyin methods.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #include "AknFepUiInputStateCandidateQwertyZhuyin.h"
       
    31 #include "AknFepUiCtrlContainerChinese.h"
       
    32 #include "AknFepUIManagerStateInterface.h"  //MAknFepUIManagerStateInterface
       
    33 #include "AknFepUICtrlCandidatePane.h"      //MAknFepUICtrlCandidatePane
       
    34 #include <PtiEngine.h>                      //CPtiEngine
       
    35 
       
    36 #include "AknFepManager.h"                  //FepMan flag
       
    37 
       
    38 TAknFepInputStateCandidateQwertyZhuyin::TAknFepInputStateCandidateQwertyZhuyin(
       
    39                                MAknFepUIManagerStateInterface* aOwner,
       
    40                                MAknFepUICtrlContainerChinese* aUIContainer)
       
    41     :TAknFepInputStateCandidateQwertyChinese(aOwner, aUIContainer)
       
    42     {
       
    43     iState = ECandidate;
       
    44     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
       
    45     uiContainer->CandidatePane()->SelectFirst();
       
    46 
       
    47     TBool multiplePages = iOwner->PtiEngine()->MoreCandidatePages();
       
    48     TInt bufLength = iOwner->PtiEngine()->CandidatePage().Length();
       
    49     TBool showHorizontalScrollArrows = multiplePages || bufLength>1;
       
    50 
       
    51     uiContainer->ShowHorizontalScrollArrows(showHorizontalScrollArrows); 
       
    52     uiContainer->ShowVerticalScrollArrows(multiplePages);
       
    53     uiContainer->FocusCandidatePane(ETrue);
       
    54     uiContainer->CandidatePane()->ShowCandidateOrdinals(ETrue);
       
    55     UpdateIndicator();
       
    56     }
       
    57 
       
    58 TBool TAknFepInputStateCandidateQwertyZhuyin::HandleKeyL(TInt aKey, TKeyPressLength aLength)
       
    59     {
       
    60     if(aKey == EStdKeyBackspace)
       
    61         {
       
    62         iOwner->ChangeState(EEntry);
       
    63         return ETrue;
       
    64         }
       
    65     else
       
    66         {
       
    67         return TAknFepInputStateCandidateQwertyChinese::HandleKeyL(aKey,aLength);
       
    68         }
       
    69     }
       
    70 
       
    71 // End of file