|
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 the vkb ui state machine (Chinese Standby State with Chars) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // user includes |
|
20 #include "peninputvkbuistatestandbycnwithchars.h" |
|
21 #include "peninputvkbevent.h" |
|
22 |
|
23 // ======== MEMBER FUNCTIONS ======== |
|
24 |
|
25 // Implementation of Class CAknFepVkbUiStateStandbycnWithChars |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CAknFepVkbUiStateStandbycnWithChars::CAknFepVkbUiStateStandbycnWithChars |
|
29 // (other items were commented in a header). |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CAknFepVkbUiStateStandbycnWithChars::CAknFepVkbUiStateStandbycnWithChars( |
|
33 MAknFepVkbUiStateMgr* aUiStateMgr, |
|
34 MAknFepVkbLayoutContext* aContext) |
|
35 :CAknFepVkbUiStateStandbycn(aUiStateMgr,aContext) |
|
36 { |
|
37 } |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // CAknFepVkbUiStateStandbycnWithChars::NewL |
|
41 // (other items were commented in a header). |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 CAknFepVkbUiStateStandbycnWithChars* CAknFepVkbUiStateStandbycnWithChars:: |
|
45 NewL(MAknFepVkbUiStateMgr* aUiStateMgr, MAknFepVkbLayoutContext* aContext) |
|
46 { |
|
47 CAknFepVkbUiStateStandbycnWithChars* self = |
|
48 new ( ELeave ) CAknFepVkbUiStateStandbycnWithChars(aUiStateMgr,aContext); |
|
49 CleanupStack::PushL(self); |
|
50 self->ConstructL(); |
|
51 CleanupStack::Pop(); |
|
52 return self; |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CAknFepVkbUiStateStandbycnWithChars::~CAknFepVkbUiStateStandbycnWithChars |
|
57 // (other items were commented in a header). |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 CAknFepVkbUiStateStandbycnWithChars::~CAknFepVkbUiStateStandbycnWithChars() |
|
61 { |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CAknFepVkbUiStateStandbycnWithChars::HandleKeyEventL |
|
66 // (other items were commented in a header). |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 TBool CAknFepVkbUiStateStandbycnWithChars::HandleKeyEventL(const TRawEvent& /*aData*/) |
|
70 { |
|
71 return EFalse; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CAknFepVkbUiStateStandbycnWithChars::HandleVkbEvent |
|
76 // (other items were commented in a header). |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 TBool CAknFepVkbUiStateStandbycnWithChars::HandleVkbEvent(TInt /*aEventType*/, |
|
80 const TDesC& aEventData) |
|
81 { |
|
82 TKeyEvent* event = (TKeyEvent*) aEventData.Ptr(); |
|
83 if ( IsFilterUnicode(event->iScanCode) ) |
|
84 { |
|
85 return TRUE; |
|
86 } |
|
87 else |
|
88 { |
|
89 iContext->SendEventToVkbControl(EVkbEventStandby2Composition,NULL); |
|
90 iContext->ForceEditGainFocus(ECompotisionFieldGetFocus); |
|
91 iUiStateMgr->SetCurrentUiState( iUiStateMgr->UiStateCompositionWithChars() ); |
|
92 return EFalse; |
|
93 } |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CAknFepVkbUiStateStandbycnWithChars::HandleBackEvent |
|
98 // (other items were commented in a header). |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 TBool CAknFepVkbUiStateStandbycnWithChars::HandleBackEvent(TInt /*aEventType*/, |
|
102 const TDesC& aEventData) |
|
103 { |
|
104 /*TInt candidateCount = iContext->RequestData(EAknFepDataTypeCandidateCount); |
|
105 if ( candidateCount ) |
|
106 { |
|
107 iContext->SendEventToVkbControl(EVkbEventCompFieldNoChars,NULL); |
|
108 return ETrue; |
|
109 } |
|
110 else |
|
111 {*/ |
|
112 return SendKey(aEventData); |
|
113 //} |
|
114 |
|
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CAknFepVkbUiStateStandbycnWithChars::HandleEnterSpaceEvent |
|
119 // (other items were commented in a header). |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 TBool CAknFepVkbUiStateStandbycnWithChars::HandleEnterSpaceEvent(TInt /*aEventType*/, |
|
123 const TDesC& aEventData) |
|
124 { |
|
125 return SendKey(aEventData); |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // CAknFepVkbUiStateStandbycnWithChars::HandleTabEvent |
|
130 // (other items were commented in a header). |
|
131 // ----------------------------------------------------------------------------- |
|
132 // |
|
133 TBool CAknFepVkbUiStateStandbycnWithChars::HandleTabEvent(TInt /*aEventType*/, |
|
134 const TDesC& aEventData) |
|
135 { |
|
136 return SendKey(aEventData); |
|
137 } |
|
138 |
|
139 // ----------------------------------------------------------------------------- |
|
140 // CAknFepVkbUiStateStandby::HandleArrowKeyEvent |
|
141 // (other items were commented in a header). |
|
142 // ----------------------------------------------------------------------------- |
|
143 // |
|
144 TBool CAknFepVkbUiStateStandbycnWithChars::HandleArrowKeyEvent(TInt /*aEventType*/, |
|
145 const TDesC& aEventData) |
|
146 { |
|
147 return SendKey(aEventData); |
|
148 } |
|
149 // End Of File |