|
1 /* |
|
2 * Copyright (c) 2002-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: Implementation of Stroke phrase Qwerty candidate state |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 // System includes |
|
30 #include <PtiEngine.h> |
|
31 |
|
32 // User includes |
|
33 #include "AknFepUiInputStateCandidateQwertyStrokePhrase.h" |
|
34 #include "AknFepUICtrlContainerChinese.h" |
|
35 #include "AknFepUIManagerStateInterface.h" |
|
36 #include "AknFepUICtrlCandidatePane.h" |
|
37 #include "AknFepManager.h" |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // TAknFepUiInputStateCandidateQwertyStrokePhrase:: |
|
41 // TAknFepUiInputStateCandidateQwertyStrokePhrase |
|
42 // (other items were commented in a header). |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 TAknFepUiInputStateCandidateQwertyStrokePhrase::TAknFepUiInputStateCandidateQwertyStrokePhrase( |
|
46 MAknFepUIManagerStateInterface* aOwner, |
|
47 MAknFepUICtrlContainerChinese* aUIContainer) |
|
48 :TAknFepInputStateCandidateQwertyPhrase(aOwner, aUIContainer) |
|
49 { |
|
50 iState = ECandidate; |
|
51 |
|
52 MAknFepUICtrlContainerChinese* uiContainer = UIContainer(); |
|
53 |
|
54 TBool multiplePages = iOwner->PtiEngine()->MoreCandidatePages(); |
|
55 TInt bufLength = iOwner->PtiEngine()->CandidatePage().Length(); |
|
56 TBool showHorizontalScrollArrows = multiplePages || bufLength>1; |
|
57 |
|
58 uiContainer->CandidatePane()->SelectFirstPhrase(); |
|
59 uiContainer->ShowHorizontalScrollArrows(showHorizontalScrollArrows); |
|
60 uiContainer->ShowVerticalScrollArrows(multiplePages); |
|
61 uiContainer->FocusCandidatePane(ETrue); |
|
62 uiContainer->CandidatePane()->ShowCandidateOrdinals(ETrue); |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // AknFepUiInputStateCandidatePinyinAndStrokePhrase::HandleKeyL |
|
67 // (other items were commented in a header). |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 TBool TAknFepUiInputStateCandidateQwertyStrokePhrase::HandleKeyL(TInt aKey, |
|
71 TKeyPressLength aLength) |
|
72 { |
|
73 if(aKey == EStdKeyBackspace) |
|
74 { |
|
75 iOwner->ChangeState(EEntry); |
|
76 return EFalse; |
|
77 } |
|
78 else |
|
79 { |
|
80 return TAknFepInputStateCandidateQwertyPhrase::HandleKeyL(aKey,aLength); |
|
81 } |
|
82 } |
|
83 |
|
84 // End of file |