|
1 /* |
|
2 * Copyright (c) 2003-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 CAknFepUIManagerChinese definition. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 #ifndef __AKN_FEP_UI_MANAGER_CHINESE_H__ |
|
31 #define __AKN_FEP_UI_MANAGER_CHINESE_H__ |
|
32 |
|
33 // INCLUDES |
|
34 #include <uikon.hrh> //TAknEditorNumericKeymap |
|
35 #include "AknFepUIManagerStateInterface.h" |
|
36 #include "AknFepUICtrlInputPane.h" |
|
37 #include "AknFepUiInputStateChineseBase.h" |
|
38 #include <PtiDefs.h> |
|
39 |
|
40 // CONSTANTS |
|
41 |
|
42 // MACROS |
|
43 |
|
44 // DATA TYPES |
|
45 |
|
46 // FUNCTION PROTOTYPES |
|
47 |
|
48 // FORWARD DECLARATIONS |
|
49 |
|
50 // CLASS DECLARATION |
|
51 class CAknFepUIManagerBase; |
|
52 class MAknFepUICtrlContainerChinese; |
|
53 |
|
54 /** |
|
55 * CAknFepUIManagerChinese class. |
|
56 * |
|
57 * @lib AknFep.lib |
|
58 * @since 2.6 |
|
59 * |
|
60 */ |
|
61 class CAknFepUIManagerChinese : public CAknFepUIManagerBase |
|
62 { |
|
63 private: |
|
64 /** |
|
65 * private constants |
|
66 */ |
|
67 enum |
|
68 { |
|
69 EBaseLanguageNumericKeymapIndex = 0x00FF, |
|
70 EMaskShiftOffset = 8 , |
|
71 ESupportPinyinPhrase = 0x0010, |
|
72 ESupportZhuyinPhrase = 0x0020, |
|
73 ESupportStrokePhrase = 0x0040, |
|
74 EQueryPtiEngineAlready = 0x0080 |
|
75 }; |
|
76 |
|
77 public: // Constructors and destructor |
|
78 /** |
|
79 * |
|
80 * |
|
81 * @since 2.6 |
|
82 */ |
|
83 static CAknFepUIManagerChinese* NewL(MAknFepManagerUIInterface* aFepMan, |
|
84 CAknFepCaseManager* aCaseMan, TLanguage aLanguage); |
|
85 |
|
86 /** |
|
87 * |
|
88 * |
|
89 * @since 2.6 |
|
90 */ |
|
91 virtual ~CAknFepUIManagerChinese(); |
|
92 |
|
93 public: // Functions from base classes |
|
94 /** |
|
95 * From CAknFepUIManagerBase |
|
96 * |
|
97 * @since 2.6 |
|
98 */ |
|
99 TBool HandleKeyL(TInt aKey, TKeyPressLength aLength,TEventCode aEventCode = EEventKey); |
|
100 |
|
101 /** |
|
102 * From CAknFepUIManagerBase |
|
103 * |
|
104 * @since 2.6 |
|
105 */ |
|
106 void CloseUI(); |
|
107 |
|
108 /** |
|
109 * From CAknFepUIManagerBase |
|
110 * |
|
111 * @since 2.6 |
|
112 */ |
|
113 void GetFormatOfFepInlineText(TCharFormat& aFormat, TInt& aNumberOfCharactersWithSameFormat, |
|
114 TInt aPositionOfCharacter) const; |
|
115 |
|
116 /** |
|
117 * From CAknFepUIManagerBase |
|
118 * |
|
119 * @since 2.6 |
|
120 */ |
|
121 TInt SupportLanguage(TInt aMode) const; |
|
122 |
|
123 /** |
|
124 * From CAknFepUIManagerBase |
|
125 * |
|
126 * @since 2.6 |
|
127 */ |
|
128 void SetInputLanguageL(TLanguage aLanguage); |
|
129 |
|
130 /** |
|
131 * From CAknFepUIManagerBase |
|
132 * |
|
133 * @since 2.6 |
|
134 */ |
|
135 void SetEditorContext(TInt aContext); |
|
136 |
|
137 /** |
|
138 * From CAknFepUIManagerBase |
|
139 * |
|
140 * @since 2.6 |
|
141 */ |
|
142 TUIState ChangeState(TUIState aState); |
|
143 |
|
144 /** |
|
145 * From CAknFepUIManagerBase |
|
146 * |
|
147 * @since 3.0 |
|
148 */ |
|
149 void ChangeStatetItut(TUIState aState); |
|
150 |
|
151 /** |
|
152 * From CAknFepUIManagerBase |
|
153 * |
|
154 * @since 3.0 |
|
155 */ |
|
156 void ChangeStateQwerty(TUIState aState); |
|
157 |
|
158 /** |
|
159 * From CAknFepUIManagerBase |
|
160 * |
|
161 * @since 2.6 |
|
162 */ |
|
163 TBool IsValidChineseInputKey(TInt aKey) const; |
|
164 /** |
|
165 * From CAknFepUIManagerBase |
|
166 * |
|
167 * @since 3.0 |
|
168 */ |
|
169 TBool IsValidChineseInputKeyQwerty(TInt aKey) const; |
|
170 |
|
171 /** |
|
172 * From CAknFepUIManagerBase |
|
173 * |
|
174 * @since 3.0 |
|
175 */ |
|
176 TBool IsQwertyZhuyinToneMarkKey(TInt aKey) const; |
|
177 |
|
178 /** |
|
179 * From CAknFepUIManagerBase |
|
180 * |
|
181 * @since 2.6 |
|
182 */ |
|
183 TPtr GetLatestDeliberateSelection() const; |
|
184 |
|
185 /** |
|
186 * From CAknFepUIManagerBase |
|
187 * |
|
188 * @since 3.0 |
|
189 */ |
|
190 void UpdateCangJieState(); |
|
191 |
|
192 /** |
|
193 * From CAknFepUIManagerBase |
|
194 * |
|
195 * @since 3.0 |
|
196 */ |
|
197 TBool IsValidChineseSymbol(TInt aKey) const; |
|
198 |
|
199 private: // Functions from base classes |
|
200 /** |
|
201 * From CAknFepUIManagerBase |
|
202 * |
|
203 * @since 2.6 |
|
204 */ |
|
205 TAknFepInputStateBase* FepUIState(); |
|
206 |
|
207 /** |
|
208 * Clears all flags down |
|
209 */ |
|
210 inline void ResetFlags(); |
|
211 |
|
212 /** |
|
213 * Clears aFlag bitfield in iFlags |
|
214 */ |
|
215 inline void ClearFlag(TInt aFlag); |
|
216 |
|
217 /** |
|
218 * Sets aFlag bitfield in iFlags |
|
219 */ |
|
220 inline void SetFlag(TInt aFlag); |
|
221 |
|
222 /** |
|
223 * Returns ETrue if the aFlag bitfield in iFlags is set, EFalse if it |
|
224 * is clear |
|
225 */ |
|
226 inline TBool IsFlagSet(TInt aFlag) const; |
|
227 /** |
|
228 * Query PtiEngine for phrase input |
|
229 */ |
|
230 void QueryPtiEngine(); |
|
231 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
232 /** |
|
233 * Decide if the key mapped stroke |
|
234 * |
|
235 * since 3.2.3 |
|
236 */ |
|
237 TBool IsKeyMappedStroke(TInt aKey) const; |
|
238 #endif |
|
239 public: // New Fanctions |
|
240 /** |
|
241 * |
|
242 * |
|
243 * @since 2.6 |
|
244 */ |
|
245 MAknFepUICtrlContainerChinese* UIContainer() const; |
|
246 |
|
247 /** |
|
248 * Check valid shift key press |
|
249 */ |
|
250 TBool IsValidShiftKeyPress() const; |
|
251 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
252 TBool IsValidFnKeyPress() const; |
|
253 |
|
254 TBool IsValidLongChrKeyPress() const; |
|
255 |
|
256 #endif |
|
257 #ifdef __ITI_LONGPRESS_NUM_SHIFT_COPYPASTE__ |
|
258 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
259 protected: // from CAknFepUIManagerBase |
|
260 TBool RollbackPreviousCharL(); |
|
261 #endif // RD_INTELLIGENT_TEXT_INPUT |
|
262 #endif // __ITI_LONGPRESS_NUM_SHIFT_COPYPASTE__ |
|
263 private: // New Fanctions |
|
264 /** |
|
265 * |
|
266 * |
|
267 * @since 2.6 |
|
268 */ |
|
269 CAknFepUIManagerChinese(MAknFepManagerUIInterface* aFepMan, CAknFepCaseManager* aCaseMan); |
|
270 |
|
271 /** |
|
272 * |
|
273 * |
|
274 * @since 2.6 |
|
275 */ |
|
276 void ConstructL(TLanguage aLanguage); |
|
277 |
|
278 private: // Data |
|
279 TAknFepInputStateChineseBase iFepUiState; |
|
280 MAknFepUICtrlContainerChinese* iContainerPane; |
|
281 |
|
282 // note that this must be stored in the manager, as the input states cannot allocate any memory |
|
283 TBufC<MAknFepUICtrlInputPane::EMaxInputCharsPinyinPopupNotIncludingToneMark> iLatestDeliberateSelection; |
|
284 TUint iFlags; |
|
285 TInt iPrevMode; |
|
286 TBool iQwertyMode; |
|
287 }; |
|
288 |
|
289 inline void CAknFepUIManagerChinese::SetFlag(TInt aFlag) |
|
290 { |
|
291 iFlags |= aFlag; |
|
292 } |
|
293 |
|
294 inline void CAknFepUIManagerChinese::ClearFlag(TInt aFlag) |
|
295 { |
|
296 iFlags &= ~aFlag; |
|
297 } |
|
298 |
|
299 inline void CAknFepUIManagerChinese::ResetFlags() |
|
300 { |
|
301 iFlags = 0; |
|
302 } |
|
303 |
|
304 inline TBool CAknFepUIManagerChinese::IsFlagSet(TInt aFlag) const |
|
305 { |
|
306 return iFlags & aFlag; |
|
307 } |
|
308 |
|
309 |
|
310 #endif //__AKN_FEP_UI_MANAGER_CHINESE_H__ |
|
311 |
|
312 // End of file |