fep/aknfep/src/AknFepUiInputStateCandidate.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:           
       
    15 *       Provides the CAknFepUIInputStateCandidate methods.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #include "AknFepUiInputStateCandidate.h"
       
    31 #include "AknFepUiCtrlContainerChinese.h"
       
    32 #include "AknFepUIManagerStateInterface.h"  //MAknFepUIManagerStateInterface
       
    33 #include "AknFepUICtrlCandidatePane.h"      //MAknFepUICtrlCandidatePane
       
    34 #include <PtiEngine.h>                      //CPtiEngine
       
    35 
       
    36 
       
    37 ///////////////////
       
    38 // Candidate state
       
    39 ///////////////////
       
    40 
       
    41 TAknFepInputStateCandidate::TAknFepInputStateCandidate(
       
    42                                MAknFepUIManagerStateInterface* aOwner,
       
    43                                MAknFepUICtrlContainerChinese* aUIContainer)
       
    44     :TAknFepInputStateCandidateBase(aOwner, aUIContainer)
       
    45     {
       
    46     iState = ECandidate;
       
    47     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
       
    48     uiContainer->CandidatePane()->SelectFirst();
       
    49 
       
    50     TBool multiplePages = iOwner->PtiEngine()->MoreCandidatePages();
       
    51     TInt bufLength = iOwner->PtiEngine()->CandidatePage().Length();
       
    52     TBool showHorizontalScrollArrows = multiplePages || bufLength>1;
       
    53 
       
    54     uiContainer->ShowHorizontalScrollArrows(showHorizontalScrollArrows); 
       
    55     uiContainer->ShowVerticalScrollArrows(multiplePages);
       
    56     uiContainer->FocusCandidatePane(ETrue);
       
    57     uiContainer->CandidatePane()->ShowCandidateOrdinals(ETrue);
       
    58     }
       
    59 
       
    60 
       
    61 TBool TAknFepInputStateCandidate::HandleKeyL(TInt aKey, TKeyPressLength aLength)
       
    62     {
       
    63     if(aKey==EKeyBackspace)
       
    64         {
       
    65         iOwner->ChangeState(EEntry);
       
    66         return ETrue;
       
    67         }
       
    68     return TAknFepInputStateCandidateBase::HandleKeyL(aKey, aLength);
       
    69     }
       
    70 
       
    71 
       
    72 // End of file