|
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: header file of Stroke phrase entry state |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef T_AKNFEPUIINPUTSTATEENTRYSTROKEPHRASE_H |
|
30 #define T_AKNFEPUIINPUTSTATEENTRYSTROKEPHRASE_H |
|
31 |
|
32 // User includes |
|
33 #include "aknfepuiinputstatestrokephrasebase.h" |
|
34 |
|
35 /** |
|
36 * TAknFepInputStateEntryStrokePhrase class. |
|
37 * |
|
38 * Implementation of Stroke phrase entry state |
|
39 * |
|
40 * @lib avkonfep.dll |
|
41 * @since S60 v5.0 |
|
42 */ |
|
43 class TAknFepInputStateEntryStrokePhrase : |
|
44 public TAknFepInputStateStrokePhraseBase |
|
45 { |
|
46 public: |
|
47 |
|
48 /** |
|
49 * C++ default constructor |
|
50 * |
|
51 * @since S60 V5.0 |
|
52 * @param aOwner Pointer to UI manager state interface |
|
53 * @param aUIContainer Pointer to Chinese UI container |
|
54 */ |
|
55 TAknFepInputStateEntryStrokePhrase( |
|
56 MAknFepUIManagerStateInterface* aOwner, |
|
57 MAknFepUICtrlContainerChinese* aUIContainer ); |
|
58 /** |
|
59 * Handling Command events. |
|
60 * This Method is called by CAknFepUIManagerJapanese. |
|
61 * |
|
62 * @param aCommandId Command ID value |
|
63 */ |
|
64 void HandleCommandL(TInt aCommandId); |
|
65 |
|
66 /** |
|
67 * From TAknFepInputStateEntryZhuyinStrokeBasePhrase |
|
68 * Handle system key press event |
|
69 * |
|
70 * @since S60 V5.0 |
|
71 * @param aKey System key |
|
72 * @param aLength Key press length |
|
73 * @return ETrue if handle, otherwise this class do not handle this key |
|
74 */ |
|
75 TBool HandleKeyL(TInt aKey, TKeyPressLength aLength); |
|
76 private: |
|
77 /** |
|
78 * Commit phrase to the EEP ctrl. |
|
79 * |
|
80 * @since S60 v5.0 |
|
81 * @param aText that need to commint to the EEP phrase. |
|
82 * @return ETrue commit to the EEP phrase successful, EFalse other. |
|
83 */ |
|
84 TBool CommitInlineEEPL( const TDesC& aText ); |
|
85 /** |
|
86 * Handle CBA1,ok and select candidate phrase key press. |
|
87 * |
|
88 * @since S60 v5.0 |
|
89 * @return None. |
|
90 */ |
|
91 void HandleCommitL(); |
|
92 }; |
|
93 |
|
94 /** |
|
95 * TAknFepInputStateEditStrokePhrase class. |
|
96 * |
|
97 * Implementation of Stroke phrase creation edit state |
|
98 * |
|
99 * @lib avkonfep.dll |
|
100 * @since S60 v5.0 |
|
101 */ |
|
102 class TAknFepInputStateEditStrokePhrase : public TAknFepInputStateStrokePhraseBase |
|
103 { |
|
104 public: |
|
105 |
|
106 /** |
|
107 * C++ construct. |
|
108 * |
|
109 * @since S60 v5.0. |
|
110 * @return self object. |
|
111 */ |
|
112 TAknFepInputStateEditStrokePhrase( |
|
113 MAknFepUIManagerStateInterface* aOwner, |
|
114 MAknFepUICtrlContainerChinese* aUIContainer); |
|
115 |
|
116 /** |
|
117 * HandleKeyL. |
|
118 * |
|
119 * @since S60 v5.0. |
|
120 * @return ETrue. |
|
121 */ |
|
122 TBool HandleKeyL(TInt aKey, TKeyPressLength aLength); |
|
123 |
|
124 }; |
|
125 |
|
126 |
|
127 /** |
|
128 * TAknFepInputStateEntryStrokePhraseCreation class. |
|
129 * |
|
130 * Implementation of Stroke phrase creation candidate state |
|
131 * |
|
132 * @lib avkonfep.dll |
|
133 * @since S60 v5.0 |
|
134 */ |
|
135 class TAknFepInputStateCandidateStrokePhrase : |
|
136 public TAknFepInputStateStrokePhraseBase |
|
137 { |
|
138 public: |
|
139 |
|
140 /** |
|
141 * C++ default constructor |
|
142 * |
|
143 * @since S60 v5.0 |
|
144 * @param aOwner Pointer to UI manager state interface |
|
145 * @param aUIContainer Pointer to Chinese UI container |
|
146 */ |
|
147 TAknFepInputStateCandidateStrokePhrase( |
|
148 MAknFepUIManagerStateInterface* aOwner, |
|
149 MAknFepUICtrlContainerChinese* aUIContainer); |
|
150 |
|
151 /** |
|
152 * From TAknFepInputStateEntryZhuyinStrokeBasePhrase |
|
153 * Handle system key press event |
|
154 * |
|
155 * @since S60 v5.0 |
|
156 * @param aKey System key |
|
157 * @param aLength Key press length |
|
158 * @return ETrue if handle, otherwise this class do not handle this key |
|
159 */ |
|
160 TBool HandleKeyL(TInt aKey, TKeyPressLength aLength); |
|
161 /** |
|
162 * Handling Command events. |
|
163 * This Method is called by CAknFepUIManagerJapanese. |
|
164 * |
|
165 * @param aCommandId Command ID value |
|
166 */ |
|
167 void HandleCommandL( TInt aCommandId ); |
|
168 |
|
169 private: |
|
170 |
|
171 /** |
|
172 * Handle Horizontal Navigation. |
|
173 * |
|
174 * @since S60 v5.0 |
|
175 * @param aKey,key press. |
|
176 * @return None |
|
177 */ |
|
178 void HandleHorizontalNavigation(TInt aKey); |
|
179 |
|
180 /** |
|
181 * Commit phrase to the EEP ctrl. |
|
182 * |
|
183 * @since S60 v5.0 |
|
184 * @param aText that need to commint to the EEP phrase. |
|
185 * @return ETrue commit to the EEP phrase successful, EFalse other. |
|
186 */ |
|
187 TBool CommitInlineEEPL( const TDesC& aText ); |
|
188 |
|
189 /** |
|
190 * Handle CBA1,ok and select candidate phrase key press. |
|
191 * |
|
192 * @since S60 v5.0 |
|
193 * @return None. |
|
194 */ |
|
195 void HandleCommitL(); |
|
196 |
|
197 inline TInt MapKeyToIndex(TInt aKey); |
|
198 |
|
199 }; |
|
200 |
|
201 inline TInt TAknFepInputStateCandidateStrokePhrase::MapKeyToIndex( TInt aKey ) |
|
202 { |
|
203 TInt index = aKey - EPtiKey0; // get zero-based value first |
|
204 return !index ? 9 : --index; // map it for one-based keys... |
|
205 } |
|
206 |
|
207 #endif //T_AKNFEPUIINPUTSTATEENTRYSTROKEPHRASE_H |
|
208 |
|
209 // End of file |