author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:55:58 +0300 | |
branch | RCL_3 |
changeset 56 | 8152b1f1763a |
parent 50 | 5a1685599b76 |
permissions | -rw-r--r-- |
44 | 1 |
/* |
2 |
* Copyright (c) 2002-2004 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 CAknFepManager definition. |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
||
20 |
||
21 |
||
22 |
||
23 |
||
24 |
||
25 |
||
26 |
||
27 |
||
28 |
||
29 |
||
30 |
#ifndef __AKN_FEP_MANAGER_H__ |
|
31 |
#define __AKN_FEP_MANAGER_H__ |
|
32 |
||
33 |
#include "AknFepGlobalEnums.h" //TKeyPressLength |
|
34 |
#include "AknFepManagerUIInterface.h" //MAknFepManagerUIInterface |
|
35 |
#include "AknFepLanguageManager.h" //CAknFepLanguageManager |
|
36 |
#include <gulicon.h> |
|
37 |
#include "aknfepuiinterface.h" |
|
38 |
#include "aknfepuimenus.h" |
|
39 |
#include <fepbase.h> //CCoeFep |
|
40 |
#include <coeinput.h> //TCoeInputCapabilities |
|
41 |
#include <fepitfr.h> //MFepInlineTextFormatRetriever |
|
42 |
#include <aknedstsobs.h> //MAknEdStateObserver |
|
43 |
#include <uikon.hrh> //TAknEditorNumericKeymap |
|
44 |
#include <aknEditStateIndicator.h> //TAknEditingState |
|
45 |
#include <frmtlay.h> |
|
46 |
#include <biditext.h> |
|
47 |
#include <PtiDefs.h> |
|
48 |
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
49 |
#include <tagmalayoutandsource.h> |
|
50 |
#endif |
|
51 |
||
52 |
#include <aknextendedinputcapabilities.h> |
|
53 |
#ifdef RD_SCALABLE_UI_V2 |
|
54 |
#include <peninputclient.h> |
|
55 |
#endif //#ifdef RD_SCALABLE_UI_V2 |
|
56 |
||
57 |
#include <AknNullService.h> // CAknNullService |
|
58 |
#include <AknServerApp.h> // MAknServerAppExitObserver |
|
59 |
#include <aknfeppensupportinterface.h> |
|
60 |
#include "avkon.hrh" |
|
61 |
#ifdef RD_HINDI_PHONETIC_INPUT |
|
62 |
#include <PtiIndicDefs.h> |
|
63 |
#endif |
|
64 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
65 |
// Predictive QWERTY (XT9) changes ----> |
|
66 |
class MAknFepUiWordPopupContent; |
|
67 |
#include "AknFepCandidatePopup.h" |
|
68 |
#include "AknFepCandidatePopupCallback.h" |
|
69 |
// Predictive QWERTY (XT9) changes <---- |
|
70 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
71 |
class CAknFepPluginManager; |
|
72 |
class CAknFepKeyCatcherInterface; |
|
73 |
class MAknFepManagerInterface; |
|
74 |
class CAknFepIndicator; |
|
75 |
class CAknEdwinState; |
|
76 |
class CPeriodic; |
|
77 |
class MAknEditingStateIndicator; |
|
78 |
class CAknFepCaseManager; |
|
79 |
class CAknFepHashKeyManager; |
|
80 |
class CAknKeySoundSystem; |
|
81 |
class CPtiEngine; |
|
82 |
class CAknFepSharedDataInterface; |
|
83 |
class CApaDocument; // User Dictionary |
|
84 |
class CAknFepInlineTextDecorator; |
|
85 |
class CTextView; |
|
86 |
class MPeninputServerEventHandler; |
|
87 |
class MAknFepDocumentNavigation; |
|
88 |
class CAknFepUIInterface; |
|
89 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
90 |
class CAknFepFnKeyManager; |
|
91 |
#endif |
|
92 |
//phrase creation |
|
93 |
class CZhuyinKeyHandler; |
|
94 |
class CAknFepZhuyinAnalyser; |
|
95 |
class CZhuyinAnalyserDbFeed; |
|
96 |
//User DB view |
|
97 |
class CAknFepUserdbDlg; |
|
98 |
class CAknFepThaiSCTSelector; |
|
99 |
class CAknNavigationDecorator; |
|
100 |
// This could be moved inside FepManager class? |
|
101 |
enum TWesternNaviEvent |
|
102 |
{ |
|
103 |
ENullNaviEvent, |
|
104 |
ELeftNaviEvent, |
|
105 |
ERightNaviEvent, |
|
106 |
EBackspaceEvent, |
|
107 |
EUpNaviEvent, |
|
108 |
EDownNaviEvent |
|
109 |
}; |
|
110 |
enum TSpecialTextField |
|
111 |
{ |
|
112 |
/** |
|
113 |
* Constraints |
|
114 |
*/ |
|
115 |
ESplAny, |
|
116 |
ESplMailAddr, |
|
117 |
ESplNumeric, |
|
118 |
ESplPhoneNumber, |
|
119 |
ESplUrl, |
|
120 |
ESplDecimal, |
|
121 |
/** |
|
122 |
* Modifiers |
|
123 |
*/ |
|
124 |
ESplPassword=0x10000, |
|
125 |
ESplUneditable=0x20000, |
|
126 |
ESplSensitive=0x40000, |
|
127 |
ESplNonPredictive=0x80000, |
|
128 |
ESPlInitialCapsWord=0x100000, |
|
129 |
ESplInitialCapsWordSentence=0x200000, |
|
130 |
ESplConstraintMask=0xFFFF |
|
131 |
}; |
|
132 |
||
133 |
const TInt KChrKeyMultitapTimeout = 1000000; |
|
134 |
const TInt KFnKeyLongPressTimeout = 600000; |
|
135 |
/** |
|
136 |
* Translates ET9Eng language codes into localised descriptors and command Id's |
|
137 |
*/ |
|
138 |
class TFepLanguageTranslation |
|
139 |
{ |
|
140 |
public: |
|
141 |
void ReadFromResource(TResourceReader& aReader); |
|
142 |
public: |
|
143 |
TPtrC iName; |
|
144 |
TInt iLanguageId; |
|
145 |
TInt iCommandId; |
|
146 |
}; |
|
147 |
class CChrMultiTapTimer : public CTimer |
|
148 |
{ |
|
149 |
public: |
|
150 |
static CChrMultiTapTimer* NewL(TCallBack aCallback); |
|
151 |
void After(TTimeIntervalMicroSeconds32 aInterval); |
|
152 |
private: |
|
153 |
CChrMultiTapTimer(TCallBack aCallback); |
|
154 |
void ConstructL(); |
|
155 |
// from CActive |
|
156 |
virtual void RunL(); |
|
157 |
private: |
|
158 |
TCallBack iCallback; |
|
159 |
}; |
|
160 |
/** |
|
161 |
* The CCoeFep derived class of AknFep |
|
162 |
* Controls mode in the Fep. Handles all interaction with the editor |
|
163 |
* Creates and owns the UI Manger, the Key Catcher and the edit state indicators |
|
164 |
*/ |
|
165 |
class CAknFepManager : |
|
166 |
public CCoeFep, |
|
167 |
public MAknFepManagerUIInterface, |
|
168 |
public MFepInlineTextFormatRetriever, |
|
169 |
public MFepPointerEventHandlerDuringInlineEdit, |
|
170 |
public MAknFepUiInterfaceMenuObserver, |
|
171 |
public MAknServerAppExitObserver, //embedding |
|
172 |
private MAknEdStateObserver, |
|
173 |
#ifdef RD_SCALABLE_UI_V2 |
|
174 |
public CAknExtendedInputCapabilities::MAknEventObserver, |
|
175 |
#endif |
|
176 |
private MFormCustomDraw |
|
177 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
178 |
,public MAknFepCandidatePopupCallback // Predictive QWERTY (XT9) changes |
|
179 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
180 |
{ |
|
181 |
||
182 |
private: |
|
183 |
class TTextDirectionalInfo |
|
184 |
{ |
|
185 |
public: |
|
186 |
||
187 |
enum TTextDirectionalStatus |
|
188 |
{ |
|
189 |
EUnknown, |
|
190 |
ENotInDocument, |
|
191 |
ENoDirectionalChunks, |
|
192 |
ERightToLeft, |
|
193 |
ELeftToRight |
|
194 |
}; |
|
195 |
||
196 |
enum TDirectionalBlockEnvironment |
|
197 |
{ |
|
198 |
EUndefined, |
|
199 |
EInsideBlock, |
|
200 |
EAtRightEndOfLine, |
|
201 |
EAtLeftEndOfLine, |
|
202 |
EAtRightEndOfBlockFacingOppositeDirectionalBlock, |
|
203 |
EAtLeftEndOfBlockFacingOppositeDirectionalBlock, |
|
204 |
EAtRightEndOfBlockFacingSameDirectionBlock, |
|
205 |
EAtLeftEndOfBlockFacingSameDirectionBlock |
|
206 |
}; |
|
207 |
public: |
|
208 |
// Constructor |
|
209 |
TTextDirectionalInfo(); |
|
210 |
void SetDirectionFromChunk( const CTmTextLayout::TTmChunkDescription& aChunk); |
|
211 |
public: |
|
212 |
TTextDirectionalStatus iDirectionalStatus; |
|
213 |
TDirectionalBlockEnvironment iBlockEnvironment; |
|
214 |
}; |
|
215 |
||
216 |
public: |
|
217 |
/** |
|
218 |
* values for the flags required to maintain the internal |
|
219 |
* state of the Fep Manager during operation |
|
220 |
*/ |
|
221 |
enum |
|
222 |
{ |
|
223 |
EFlagInsideMultitapInlineEditingTransaction =0x00000001, |
|
224 |
EFlagLaunchEditMenu =0x00000002, |
|
225 |
EFlagLongShiftKeyPress =0x00000004, |
|
226 |
EFlagNoActionDuringShiftKeyPress =0x00000008, |
|
227 |
EFlagShiftKeyDepressed =0x00000010, |
|
228 |
EFlagInsideInlineEditingTransaction =0x00000020, |
|
229 |
EFlagPassNextKey =0x00000040, |
|
230 |
EFlagQwertyChrKeyDepressed =0x00000080, // Not used. Qwerty mode is not supported. |
|
231 |
EFlagLineFeedCharacter =0x00000100, |
|
232 |
EFlagEditorFull =0x00000200, |
|
233 |
EFlagNewSharedDataInputMode =0x00000400, |
|
234 |
EFlagNoActionDuringChrKeyPress =0x00000800, |
|
235 |
||
236 |
EFlagSupressAutoUpdateAtEditorStart =0x00001000, |
|
237 |
EFlagNoMatches =0x00002000, |
|
238 |
EFlagSuppressInputStateChange =0x00004000, |
|
239 |
EFlagCompoundWord =0x00008000, |
|
240 |
EFlagChangeInputMode =0x00010000, |
|
241 |
EFlagForegroundUIComponentVisible =0x00020000, |
|
242 |
EFlagMenuPaneVisible =0x00040000, |
|
243 |
EFlagRemoveMatchesMenuItem =0x00080000, |
|
244 |
EFlagInlineEditInBackground =0x00100000, |
|
245 |
EFlagNewSharedDataInputLanguage =0x00200000, |
|
246 |
EFlagLastCharacterInEditor =0x00400000, |
|
247 |
||
248 |
EFlagSpaceCharacter =0x00800000, // adding for japanese |
|
249 |
EFlagFullWidthSpaceCharacter =0x01000000, // adding for japanese |
|
250 |
EFlagBidiCursorIsInitialized =0x02000000, |
|
251 |
EFlagCursorPointsRightToLeft =0x04000000, |
|
252 |
EFlagAtDirectionallyAmbiguousPoint =0x08000000, |
|
253 |
EFlagCharacterAdded =0x10000000, |
|
254 |
EFlagNoInlineEditFormatting =0x20000000, // Not really used yet! |
|
255 |
EFlagQwertyShiftMode =0x40000000, // Not used. Qwerty mode is not supported. |
|
256 |
EFlagSupressAutoUpdate =0x80000000 |
|
257 |
}; |
|
258 |
||
259 |
enum |
|
260 |
{ |
|
261 |
EExtendedFlagShortPressHashKey =0x00000001, |
|
262 |
EExtendedFlagNoModeChange =0x00000002, |
|
263 |
EExtendedFlagShiftReleasedOnPopup =0x00000004, |
|
264 |
EExtendedFlagOkKeyPressOnCandidatePopup =0x00000008, |
|
265 |
/* Flag to take care of graceful exit for FEP launched dialog when the underneath editor is closed */ |
|
266 |
EExtendedFlagEdwinEditorDestroyed =0x00000010, |
|
267 |
/* Flag to set decide when to set multiple observer for FEP. Set this flag whenever a FEP aware dialog is launched */ |
|
268 |
EExtendedFlagFepAwareDialogLaunched =0x00000020, |
|
269 |
/* Flag to specify that pointer event type EDrag has happened */ |
|
50
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
270 |
EExtendedFlagPointerEventTypeEDrag =0x00000040, |
5a1685599b76
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
271 |
/* Flag to specify that Fn key will be set as lock mode when long press occurs*/ |
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
272 |
EExtendedFlagFnKeyNeedLockMode =0x00000080, |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
273 |
/* Flag to specify point in editor when EFlagNoMatches flag is set*/ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
274 |
EExtendedFlagPointInNoMatchEditor =0x00000100 |
44 | 275 |
}; |
276 |
||
277 |
//public constants |
|
278 |
||
279 |
enum |
|
280 |
{ |
|
281 |
ESingleCharacter =1, |
|
282 |
EMaximumFepWordLength =63 |
|
283 |
}; |
|
284 |
||
285 |
private: |
|
286 |
/** |
|
287 |
* private constants |
|
288 |
*/ |
|
289 |
enum |
|
290 |
{ |
|
291 |
EShiftKeyRepeatDelay =800000, // 0.8s |
|
292 |
EQueryBufferLength =63, |
|
293 |
EDefaultNumericCharMapResId =0, |
|
294 |
EDefaultSCTResourceId =-1, |
|
295 |
ENoCharacters =0, |
|
296 |
EAknFepUid =0x100056de, |
|
297 |
EStarKeyUnicodeValue =0x2A, |
|
298 |
EHashKeyUnicodeValue =0x23, |
|
299 |
ELeftSoftkeyIndex =CAknFepUIInterface::ELeftSoftkeyIndex, |
|
300 |
ERightSoftkeyIndex =CAknFepUIInterface::ERightSoftkeyIndex, |
|
301 |
EMiddleSoftkeyIndex =CAknFepUIInterface::EMiddleSoftkeyIndex, |
|
302 |
EWordConcatenationTimeout =2000000, // 2.0s |
|
303 |
ELanguageArrayGranularity =20, |
|
304 |
EChrKeyRepeatDelay =1000000, // 1.0s |
|
305 |
EHalfQwertyChrKeyRepeatDelay =600000 //0.6 secs from Default actions UI spec |
|
306 |
}; |
|
307 |
||
308 |
enum TChineseFepCursorType |
|
309 |
{ |
|
310 |
EActive, |
|
311 |
EPassive |
|
312 |
}; |
|
313 |
||
314 |
public: |
|
315 |
enum |
|
316 |
{ |
|
317 |
ECcpuStateNone = 0, |
|
318 |
ECcpuStateStartCopy = 0x01, |
|
319 |
ECcpuStateCopy = 0x02, |
|
320 |
ECcpuStateStartCut = 0x04, |
|
321 |
ECcpuStateCut = 0x08, |
|
322 |
ECcpuStateButton = 0x10, |
|
323 |
ECcpuStatePosted = 0x20, |
|
324 |
ECcpuStateHashDown = 0x40, |
|
325 |
ECcpuStateSelectionEventPosted = 0x80, |
|
326 |
ECcpuStateEdwinInSelectionMode = 0x100, |
|
327 |
ECcpuStateIgnoreStarUp = 0x200, |
|
328 |
ECcpuSupressEditMenuFromShiftUp = 0x400, |
|
329 |
ECcpuStateCbaSymbol = 0x800, |
|
330 |
ECcpuStateIgnoreNextFocusChange = 0x1000, |
|
331 |
ECcpuStataCommitPredictiveWord = 0x2000, |
|
332 |
ECcpuStateIgnoreNextEdwinSyncEvent = 0x4000, |
|
333 |
ECcpuStateLosingFocus = 0x8000, |
|
334 |
ECcpuStateUncommitWhenFocused = 0x10000, |
|
335 |
ECcpuStateHashKeyDeleteDone = 0x20000, |
|
336 |
ECcpuStateSupressCursorMoveToEnd = 0x40000, |
|
337 |
ECcpuStateChangeToPredictionMode = 0x80000, |
|
338 |
ECcpuStateNewPredictiveWord = 0x100000, |
|
339 |
ECcpuStateShiftkeyWasPressedBeforeLosingFocus = 0x200000, |
|
340 |
ECcpuStateCbaShown = 0x400000 |
|
341 |
}; |
|
342 |
||
343 |
enum TShowSctMode |
|
344 |
{ |
|
345 |
EShowSctFirst=0, |
|
346 |
EShowPctFirst, |
|
347 |
EShowSmileyFirst |
|
348 |
}; |
|
349 |
||
350 |
private: |
|
351 |
// These are needed to remember editor's ccpu state |
|
352 |
// for editing options submenu. |
|
353 |
enum |
|
354 |
{ |
|
355 |
ECcpuStatusFlagCanCopy = 0x01, |
|
356 |
ECcpuStatusFlagCanCut = 0x02, |
|
357 |
ECcpuStatusFlagCanPaste = 0x04, |
|
358 |
}; |
|
359 |
||
360 |
||
361 |
private: |
|
362 |
class TLanguageCapabilities |
|
363 |
{ |
|
364 |
public: |
|
365 |
TInt iInputLanguageCode; // Symbian language code. |
|
366 |
TBool iLocalInputLanguageInUse; |
|
367 |
TBool iArabicIndicDigitsAllowed; |
|
368 |
TBool iEasternArabicIndicDigitsAllowed; |
|
369 |
TBool iIndicDigitsAllowed; |
|
370 |
TDigitType iLocalDigitType; |
|
371 |
TDigitType iNumericEditorDigitType; |
|
372 |
TBool iSupportsCase; |
|
373 |
TBool iSupportsWesternPredictive; |
|
374 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
375 |
// Predictive QWERTY changes ----> |
|
376 |
TBool iSupportsWesternQwertyPredictive; // predicitve QWERTY |
|
377 |
// Predictive QWERTY changes <---- |
|
378 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
379 |
TBool iRightToLeftLanguage; |
|
380 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
381 |
#ifdef __HALF_QWERTY_KEYPAD |
|
382 |
TBool iSupportsWesternHalfQwertyPredictive; |
|
383 |
#endif //__HALF_QWERTY_KEYPAD |
|
384 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
385 |
}; |
|
386 |
||
387 |
public: |
|
388 |
/** |
|
389 |
* C++ Constructor |
|
390 |
*/ |
|
391 |
CAknFepManager(CCoeEnv& aConeEnvironment); |
|
392 |
||
393 |
/** |
|
394 |
* Second phase construction |
|
395 |
*/ |
|
396 |
void ConstructL(const CCoeFepParameters& aFepParameters); |
|
397 |
||
398 |
/** |
|
399 |
* destructor |
|
400 |
*/ |
|
401 |
virtual ~CAknFepManager(); |
|
402 |
||
403 |
||
404 |
public: //from MAknFepManagerUIInterface |
|
405 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
406 |
/** |
|
407 |
Returns the keyboard layout |
|
408 |
*/ |
|
409 |
TPtiKeyboardType KeyboardLayout() const; |
|
410 |
/** |
|
411 |
Returns the current keyboard layout in use. |
|
412 |
*/ |
|
413 |
CAknFepFnKeyManager::TFnKeyState FnKeyState(); |
|
414 |
void SetFnKeyState(CAknFepFnKeyManager::TFnKeyState aState); |
|
415 |
/** |
|
416 |
* Returns the resource ID of the numeric editor in use |
|
417 |
*/ |
|
418 |
||
419 |
TInt GetNumericSCTResID(); |
|
420 |
||
421 |
||
422 |
#ifdef __REVERSE_FN_KEY_SUPPORTED |
|
423 |
/** |
|
424 |
Returns if the input is in reverse Fn key input mode. |
|
425 |
*/ |
|
426 |
virtual TBool IsReverseFnkeyInput(); |
|
427 |
||
428 |
void SetReverseFnkeyInputMode(TBool iIsOn); |
|
429 |
||
430 |
/** |
|
431 |
* Returns true if the aChar is allowed in the numeric editor |
|
432 |
*/ |
|
433 |
TBool IsValidCharInNumericEditorL( TChar aChar ) const; |
|
434 |
||
435 |
/** |
|
436 |
* Filter the char for Fn reverse mode in case of |
|
437 |
* numeric editor. This function should call |
|
438 |
* in case of numeric editor reverse mapping. |
|
439 |
*/ |
|
440 |
TBool IsValidCharForNumericInFnReverseL(TInt aKey, TPtiTextCase aCase) ; |
|
441 |
||
442 |
#endif //__REVERSE_FN_KEY_SUPPORTED |
|
443 |
virtual void AddOneSpaceOrMoveCursorL(); |
|
444 |
#endif |
|
445 |
virtual TBool IsAllowedKeymappingForNumberMode(TChar aChar) const; |
|
446 |
/** |
|
447 |
* closes the UI |
|
448 |
* commits any character in multitap |
|
449 |
*/ |
|
450 |
virtual TBool TryCloseUiL(); |
|
451 |
||
452 |
/** |
|
453 |
* Used by the UI manager to inform the Fep Manager that the UI has activated. |
|
454 |
*/ |
|
455 |
virtual void SendUIActivatedNotification(); |
|
456 |
||
457 |
/** |
|
458 |
* Used by the UI manager to inform the Fep Manger that the UI has not activated. |
|
459 |
*/ |
|
460 |
void SendUIDeActivatedNotification(); |
|
461 |
||
462 |
||
463 |
/** |
|
464 |
* Plays sound |
|
465 |
*/ |
|
466 |
virtual void PlaySound(TAvkonSystemSID aSound) const; |
|
467 |
||
468 |
/** |
|
469 |
* Set current long clear key press |
|
470 |
*/ |
|
471 |
virtual void SetLongClearAfterCloseUI(TBool aLongClear); |
|
472 |
||
473 |
/** |
|
474 |
* Align the Logical and Visual cursor positions. |
|
475 |
* |
|
476 |
* @since 3.2 |
|
477 |
* @param aType Cursor type. |
|
478 |
* @param aToLeft ETrue if the position to the left is to be found, |
|
479 |
* EFalse if the position to the right is to be found. |
|
480 |
* @return None |
|
481 |
*/ |
|
482 |
void AlignLogicalAndVisualCursorL( TTmDocPosSpec::TType aType, TBool aToLeft ); |
|
483 |
||
484 |
/** |
|
485 |
* This method removes the Repha character. The function goes to the |
|
486 |
* start of the syllable, checks if repha character is present and |
|
487 |
* removes it. |
|
488 |
* |
|
489 |
* @since 3.2 |
|
490 |
* @param None. |
|
491 |
* @return None. |
|
492 |
*/ |
|
493 |
void RemoveRephaCharacterL(); |
|
494 |
||
495 |
/** |
|
496 |
* Checks if the Repha character has been attached to the syllable |
|
497 |
* |
|
498 |
* @since 3.2 |
|
499 |
* @param None. |
|
500 |
* @return ETrue if present else EFalse. |
|
501 |
*/ |
|
502 |
TBool IsRephaPresent(); |
|
503 |
||
504 |
/** |
|
505 |
* Retrieve the Previous to previous character during multitapping. |
|
506 |
* |
|
507 |
* @since 3.2 |
|
508 |
* @param aContextSensitive EFalse is the default parameter. |
|
509 |
* ETrue is used for requesting the function |
|
510 |
* to check for extraction of the character |
|
511 |
* two positions before the seleted text. |
|
512 |
* |
|
513 |
* @return The previous to previous character if any. |
|
514 |
*/ |
|
515 |
TText PreviousToPreviousChar( TBool aContextSensitive = EFalse ); |
|
516 |
||
517 |
/** |
|
518 |
* This method is called for removing the Rakar character. The function |
|
519 |
* checks if Rakar (Virama+Ra) is present. |
|
520 |
* |
|
521 |
* @since 3.2 |
|
522 |
* @param None. |
|
523 |
* @return None. |
|
524 |
*/ |
|
525 |
void RemoveRakarCharacterL(); |
|
526 |
||
527 |
/** |
|
528 |
* This method is called for removing the N characters from the |
|
529 |
* specified position. If the text to be removed is not yet |
|
530 |
* committed, it is updated with NULL descriptor and committed. |
|
531 |
* |
|
532 |
* @since 5.0 |
|
533 |
* @param TInt aPos position to start searching from. By default |
|
534 |
* Searching will start from the cursor position. |
|
535 |
* @param TInt aNumOfCharacters Number of characters to remove. |
|
536 |
* @param TBool Should cursor be positioned at the original location. |
|
537 |
* @return None. |
|
538 |
*/ |
|
539 |
void RemoveTextFromEditorL( TInt aNumOfCharacters, TInt aPos = 0, |
|
540 |
TBool aIsToAlignCursor = ETrue ); |
|
541 |
||
542 |
/** |
|
543 |
* Align the Logical and Visual cursor positions. |
|
544 |
* Overloaded method which uses FindDocPos |
|
545 |
* |
|
546 |
* @since 5.0 |
|
547 |
* @param None |
|
548 |
* @return None |
|
549 |
*/ |
|
550 |
void AlignLogicalAndVisualCursorL(); |
|
551 |
||
552 |
CAknFepPluginManager* PluginUIManager(); |
|
553 |
//Phrase creation |
|
554 |
MZhuyinKeyHandler* ZhuyinKeyHandler(); |
|
555 |
CAknFepZhuyinAnalyser* ZhuyinAnalyser(); |
|
556 |
void UpdateStickyState(); |
|
557 |
||
558 |
#ifdef RD_MARATHI |
|
559 |
/** |
|
560 |
* This function checks if the previous two characters are |
|
561 |
* the combination of Chandra-A |
|
562 |
* |
|
563 |
* @since 5.0 |
|
564 |
* @param None |
|
565 |
* @return TBool. |
|
566 |
*/ |
|
567 |
TBool IsChandraAPresentL(); |
|
568 |
||
569 |
/** |
|
570 |
* This function checks if the previous Chandra-A is present |
|
571 |
* before the cursor position |
|
572 |
* |
|
573 |
* @since 5.0 |
|
574 |
* @param None |
|
575 |
* @return TBool. |
|
576 |
*/ |
|
577 |
TBool IsEyeLashRaPresentL(); |
|
578 |
#endif // RD_MARATHI |
|
579 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
580 |
/** |
|
581 |
* This function returns the current case. |
|
582 |
* Required for Shift key handling. |
|
583 |
* |
|
584 |
* @since 3.2 |
|
585 |
* @param None |
|
586 |
* @return TBool. |
|
587 |
*/ |
|
588 |
TInt GetCurrentCase(); |
|
589 |
||
590 |
/** |
|
591 |
* This function set the flag of chr composition key |
|
592 |
* in mini qwerty |
|
593 |
* |
|
594 |
* @since 3.2 |
|
595 |
* @param aFlag ETrue if it is chr composition key. |
|
596 |
* @return None. |
|
597 |
*/ |
|
598 |
void SetComposChrFlag( TBool aFlag ); |
|
599 |
||
600 |
/** |
|
601 |
* This function get the flag of chr composition key |
|
602 |
* in mini qwerty |
|
603 |
* |
|
604 |
* @since 3.2 |
|
605 |
* @param None. |
|
606 |
* @return ETrue if it is chr composition key.. |
|
607 |
*/ |
|
608 |
TBool GetComposChrFlag(); |
|
609 |
/** |
|
610 |
* Hides the exact word popup. |
|
611 |
*/ |
|
612 |
void HideExactWordPopUp(); |
|
613 |
/** |
|
614 |
* @return ETrue If the exact word pop up is shown. |
|
615 |
*/ |
|
616 |
||
617 |
TBool IsExactWordPopUpShown(); |
|
618 |
#endif |
|
619 |
#ifdef RD_HINDI_PHONETIC_INPUT |
|
620 |
//hindi_phonetic_fixes |
|
621 |
/* |
|
622 |
* This functions toggles the case from upper to lower |
|
623 |
* @since 5.0 |
|
624 |
* @param None |
|
625 |
* @return void |
|
626 |
*/ |
|
627 |
virtual void HandleIndicCaseL(); |
|
628 |
#endif |
|
629 |
||
630 |
public: //interface to the key catcher |
|
631 |
/** |
|
632 |
* Handles key events passed from the Key Catcher, excluding the shift key event |
|
633 |
* which is dealt with separately in the HandleShiftKeyEventL function. |
|
634 |
* State will always be Intital or UIActive. |
|
635 |
*/ |
|
636 |
TKeyResponse HandleKeyEventL(TUint aCode, TKeyPressLength aLength, TEventCode aEventCode = EEventKey); |
|
637 |
||
638 |
/** |
|
639 |
* Shift keys are dealt with in a different way to other keys, the action is on the up |
|
640 |
* key event. |
|
641 |
*/ |
|
642 |
TKeyResponse HandleShiftKeyEventL(TEventCode aEventCode); |
|
643 |
||
644 |
/** |
|
645 |
* Thai 0 key is handled differently. If 0 key is up before long keypress, we show SCT. |
|
646 |
*/ |
|
647 |
TKeyResponse HandleThai0KeyEvent(TEventCode aEventCode, TKeyPressLength aLength, |
|
648 |
TBool& aThai0KeyHandling); |
|
649 |
||
650 |
/** |
|
651 |
* Chr key handling |
|
652 |
*/ |
|
653 |
TBool HandleQwertyChrKeyEventL( TEventCode aEventCode ); |
|
654 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
655 |
#ifdef __HALF_QWERTY_KEYPAD |
|
656 |
/** |
|
657 |
* Chr Key handling in half qwerty |
|
658 |
*/ |
|
659 |
TKeyResponse HandleChrKeyForHalfQwertyL( TEventCode aEventCode); |
|
660 |
#endif //__HALF_QWERTY_KEYPAD |
|
661 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
662 |
/** |
|
663 |
* Control key handling |
|
664 |
*/ |
|
665 |
TKeyResponse HandleQwertyControlKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode); |
|
666 |
||
667 |
/** |
|
668 |
* Handles key events for qwerty input mode. |
|
669 |
* |
|
670 |
* @since 3.0 |
|
671 |
* @param aKeyEvent An event to be handled. |
|
672 |
* @param aResponse Repsonse (consumed / not consumed) will be stored here. |
|
673 |
* @return ETrue if evenat was handled by this method. |
|
674 |
* EFalse otrherwise. |
|
675 |
*/ |
|
676 |
TBool HandleQwertyKeyEventL(const TKeyEvent& aKeyEvent, TKeyResponse& aResponse); |
|
677 |
||
678 |
/** |
|
679 |
* Returns boolean value indicating whether it is ok to set edwin into "copy/paste" |
|
680 |
* mode. |
|
681 |
* |
|
682 |
* @since 3.1 |
|
683 |
* @return ETrue if it is ok to editor into selectuion mode. |
|
684 |
* EFalse otherwise. |
|
685 |
*/ |
|
686 |
TBool OkToActivateSelectionMode() const; |
|
687 |
||
688 |
/** |
|
689 |
* Returns the status of arabic-indic digit mode setting. |
|
690 |
* |
|
691 |
* @since 3.0 |
|
692 |
*/ |
|
693 |
TBool ArabicIndicDigitsInUse() const; |
|
694 |
||
695 |
/** |
|
696 |
* Returns the status of Eastern arabic-indic digit mode setting. |
|
697 |
* |
|
698 |
* @since 3.0 |
|
699 |
*/ |
|
700 |
TBool EasternArabicIndicDigitsInUse() const; |
|
701 |
void NumberModeChangeGSNotification(); |
|
702 |
void DimInputmodeMenuItems(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
703 |
||
704 |
/** |
|
705 |
* Dims the item corresponding to the mode aMode, in the edit mode menu |
|
706 |
* |
|
707 |
* @param aMenuPane the edit menu pane |
|
708 |
* @param aMode the mode to be dimmed |
|
709 |
*/ |
|
710 |
void DimMenuItem(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aMode); |
|
711 |
||
712 |
TInt FepShowVkbPreviewStatus(); |
|
713 |
||
714 |
TInt PluginInputMode() const; |
|
715 |
private: // from CCoeFep |
|
716 |
/** |
|
717 |
* from CCoeFep - not used |
|
718 |
*/ |
|
719 |
virtual void CancelTransaction(); |
|
720 |
||
721 |
/** |
|
722 |
* from CCoeFep - not used |
|
723 |
*/ |
|
724 |
virtual void IsOnHasChangedState(); |
|
725 |
||
726 |
/** |
|
727 |
* from CCoeFep - not used |
|
728 |
*/ |
|
729 |
virtual void OfferKeyEventL(TEventResponse& aEventResponse, const TKeyEvent& aKeyEvent, |
|
730 |
TEventCode aEventCode); |
|
731 |
||
732 |
/** |
|
733 |
* from CCoeFep - not used |
|
734 |
*/ |
|
735 |
virtual void OfferPointerEventL(TEventResponse& aEventResponse, |
|
736 |
const TPointerEvent& aPointerEvent, |
|
737 |
const CCoeControl* aWindowOwningControl); |
|
738 |
||
739 |
/** |
|
740 |
* from CCoeFep - not used |
|
741 |
*/ |
|
742 |
virtual void OfferPointerBufferReadyEventL(TEventResponse& aEventResponse, |
|
743 |
const CCoeControl* aWindowOwningControl); |
|
744 |
||
745 |
private: // from MFepAttributeStorer (via CCoeFep) |
|
746 |
/** |
|
747 |
* from MFepAttributeStorer (via CCoeFep) - not used |
|
748 |
*/ |
|
749 |
virtual TInt NumberOfAttributes() const; |
|
750 |
||
751 |
/** |
|
752 |
* from MFepAttributeStorer (via CCoeFep) - not used |
|
753 |
*/ |
|
754 |
virtual TUid AttributeAtIndex(TInt aIndex) const; |
|
755 |
||
756 |
/** |
|
757 |
* from MFepAttributeStorer (via CCoeFep) - not used |
|
758 |
*/ |
|
759 |
virtual void WriteAttributeDataToStreamL(TUid aAttributeUid, RWriteStream& aStream) const; |
|
760 |
||
761 |
/** |
|
762 |
* from MFepAttributeStorer (via CCoeFep) - not used |
|
763 |
*/ |
|
764 |
virtual void ReadAttributeDataFromStreamL(TUid aAttributeUid, RReadStream& aStream); |
|
765 |
||
766 |
private: // from MCoeForegroundObserver (via CCoeFep) |
|
767 |
/** |
|
768 |
* from MCoeForegroundObserver (via CCoeFep) - not used |
|
769 |
*/ |
|
770 |
virtual void HandleGainingForeground(); |
|
771 |
||
772 |
/** |
|
773 |
* from MCoeForegroundObserver (via CCoeFep) - not used |
|
774 |
*/ |
|
775 |
virtual void HandleLosingForeground(); |
|
776 |
||
777 |
private: // from MCoeFocusObserver (via CCoeFep) |
|
778 |
||
779 |
virtual void HandleChangeInFocus(); |
|
780 |
||
781 |
/** |
|
782 |
* in queries the editor is destroyed before the call to HandleChangeInFocus |
|
783 |
* so NULL the iInputCapabilities variables to prevent trying to save to an unreferenced object |
|
784 |
*/ |
|
785 |
virtual void HandleDestructionOfFocusedItem(); |
|
786 |
||
787 |
public: // from MAknEdStateObserver |
|
788 |
/** |
|
789 |
* from MAknEdStateObserver - not used |
|
790 |
*/ |
|
791 |
virtual void HandleAknEdwinStateEventL(CAknEdwinState* aAknEdwinState, |
|
792 |
EAknEdwinStateEvent aEventType); |
|
793 |
||
794 |
private: // from MEikCommandObserver (via MAknFepUiInterfaceMenuObserver) |
|
795 |
/** |
|
796 |
* from MEikCommandObserver |
|
797 |
* Processes user commands, in this case only commands from the edit menu |
|
798 |
*/ |
|
799 |
virtual void ProcessCommandL(TInt aCommandId); |
|
800 |
||
801 |
/** |
|
802 |
* Constructs the component fully. This method is called when a |
|
803 |
* fep aware editor is first time focused for text input. |
|
804 |
*/ |
|
805 |
void ConstructFullyL(); |
|
806 |
||
807 |
/** |
|
808 |
* Deletes the objects constructed with ConstructFullyL() method. |
|
809 |
*/ |
|
810 |
void CommonDestroyFep(); |
|
811 |
||
812 |
private: // from MAknFepUiInterfaceMenuObserver |
|
813 |
/* |
|
814 |
* not used as DynInitMenuPaneL() is now called before SetEmphasis() and HandleChangeInFocus() |
|
815 |
*/ |
|
816 |
virtual void SetEmphasis(CBase* aMenuControl,TBool aEmphasis); |
|
817 |
||
818 |
/** |
|
819 |
* removes app menu panes and adds the FEP edit menu pane to the menu bar |
|
820 |
*/ |
|
821 |
virtual void DynInitMenuBarL(TInt aResourceId,CAknFepUiInterfaceMenuBar* aMenuBar); |
|
822 |
||
823 |
/** |
|
824 |
* dynamically changes the edit menu depending on fep and editor state |
|
825 |
*/ |
|
826 |
virtual void DynInitMenuPaneL(TInt aResourceId,CAknFepUiInterfaceMenuPane* aMenuPane); |
|
827 |
||
828 |
private: //from MFepPointerEventHandlerDuringInlineEdit |
|
829 |
/** |
|
830 |
* from MFepPointerEventHandlerDuringInlineEdit - not needed, has to be implemented for MCoeFepAwareTextEditor interface |
|
831 |
* No pointer in Chinese Series 60 |
|
832 |
*/ |
|
833 |
virtual void HandlePointerEventInInlineTextL(TPointerEvent::TType aType, TUint aModifiers, |
|
834 |
TInt aPositionInInlineText); |
|
835 |
||
836 |
private: //from MFepInlineTextFormatRetriever |
|
837 |
/** |
|
838 |
* from MFepInlineTextFormatRetriever - not needed, has to be implemented for MCoeFepAwareTextEditor interface |
|
839 |
*/ |
|
840 |
virtual void GetFormatOfFepInlineText(TCharFormat& aFormat, |
|
841 |
TInt& aNumberOfCharactersWithSameFormat, |
|
842 |
TInt aPositionOfCharacter) const; |
|
843 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
844 |
||
845 |
// Predictive QWERTY changes (XT9) ----> |
|
846 |
public: |
|
847 |
//from MAknFepCandidatePopupCallback ----> |
|
848 |
/** |
|
849 |
* Callback the get the current set of candidates |
|
850 |
* @param aArray An output parameter for the candidate strings |
|
851 |
* @param aActiveIdx An output parameter for the index of the |
|
852 |
* currently active candidate |
|
853 |
*/ |
|
854 |
virtual void GetCandidatesL( CDesCArray& aArray, TInt& aActiveIdx ); |
|
855 |
||
856 |
/** |
|
857 |
* Callback get new position for candidate list |
|
858 |
* @param aRect New rect position for candidate list. |
|
859 |
*/ |
|
860 |
virtual void GetUpdateCandidatePositionL(TRect& aRect); |
|
861 |
||
862 |
//from MAknFepManagerUIInterfaceWestern ----> |
|
863 |
||
864 |
/** |
|
865 |
* Function to get the text direction for current language. |
|
866 |
* @return ETrue if language id RTL, EFalse if it is not |
|
867 |
*/ |
|
868 |
TBool IsRightToLeftLanguage(); |
|
869 |
TBool IsLanguageSupportPrediction(); |
|
870 |
// Predictive QWERTY changes (XT9) <---- |
|
871 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
872 |
||
873 |
public: |
|
874 |
||
875 |
/** |
|
876 |
* Launches the mode selection menu |
|
877 |
*/ |
|
878 |
void LaunchSelectModeMenuL(); |
|
879 |
||
880 |
/** |
|
881 |
* Launches the edit word query in western predictive text mode |
|
882 |
*/ |
|
883 |
void LaunchEditWordQueryL(); |
|
884 |
||
885 |
/** |
|
886 |
* Returns the status of given extended input capability flag. |
|
887 |
*/ |
|
888 |
TUint ExtendedInputCapabilities() const; |
|
889 |
||
890 |
/** |
|
891 |
* Exit plugin itut spell mode by press ok btn |
|
892 |
*/ |
|
893 |
void ExitPluginSpellModeByOk(); |
|
894 |
||
895 |
/** |
|
896 |
* Exit plugin itut spell mode by press cancel btn |
|
897 |
*/ |
|
898 |
void ExitPluginSpellModeByCancel(); |
|
899 |
||
900 |
void SynCCPSoftKey(); |
|
901 |
||
902 |
/** |
|
903 |
* checks that the editor the editor has free space to add another character |
|
904 |
* An editor of unlimited length will return its maximum size as zero |
|
905 |
*/ |
|
906 |
TBool EditorHasFreeSpace( TInt aNumberOfCharacter = 0 ) const; |
|
907 |
TBool IsSpecialNumericEditor(); |
|
908 |
||
909 |
void TryPopExactWordInICFL(); |
|
910 |
||
911 |
/** |
|
912 |
* checks whether the current editor is a Java Secret editor. |
|
913 |
* return value: Etrue when it is a Java Secret editor. |
|
914 |
* Efalse when it is not. |
|
915 |
*/ |
|
916 |
TBool IsJavaSecretEditor(); |
|
917 |
||
918 |
void HandleChangeInFocusForSettingFep(); |
|
919 |
||
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
920 |
/** |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
921 |
* Returns initial rectangle used for the top-left point of split candidate. |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
922 |
*/ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
923 |
TRect InitRectForSplitCandL(); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
924 |
|
44 | 925 |
private: |
926 |
||
927 |
/** |
|
928 |
* Handles notifications that the UI has changed focus |
|
929 |
* <ul> |
|
930 |
* <\li>When moving away from a fep aware text editor saves the mode of the old editor |
|
931 |
* <\li>When moving to fep aware text editor gets the the mode if it has previously been saved |
|
932 |
* and checks if the editor supports secret text |
|
933 |
* <\ul> |
|
934 |
*/ |
|
935 |
void HandleChangeInFocusL(); |
|
936 |
||
937 |
/** |
|
938 |
* cleans up the fep after trapping a leave |
|
939 |
*/ |
|
940 |
void CleanUpFep(); |
|
941 |
||
942 |
/** |
|
943 |
* |
|
944 |
* @param aKeyCode the value of the key to simulate |
|
945 |
*/ |
|
946 |
void SimulateKeyEventL(TUint aKeyCode, TBool aActiveObj=EFalse); |
|
947 |
||
948 |
/** |
|
949 |
* Tries to Reset the Shift Key Monitor |
|
950 |
* Cleans up FEP if failed |
|
951 |
* |
|
952 |
* @return KErrNone if succeed, KErrDied if failed |
|
953 |
*/ |
|
954 |
static TInt ResetShiftKeyMonitorCallback(TAny* aObj); |
|
955 |
||
956 |
/** |
|
957 |
* Cancels the shift monitor |
|
958 |
* tells the editor to up date its cba |
|
959 |
* to enable copy/paste support on cba. We simulate via CCoeEnv |
|
960 |
* to avoid fep SimulateL adding shift modifiers |
|
961 |
*/ |
|
962 |
void ResetShiftKeyMonitorL(); |
|
963 |
||
964 |
/** |
|
965 |
* Cancels the shift key and concatenation timers if they are active |
|
966 |
*/ |
|
967 |
void CancelAllTimerActivity(); |
|
968 |
||
969 |
/** |
|
970 |
* checks whether a mode is permitted by the current editor |
|
971 |
* |
|
972 |
* @return ETrue is aMode is permitted, EFalse if it is not |
|
973 |
*/ |
|
974 |
TBool IsModePermitted(TInt aMode, TWidthChar aWidth = ENoneWidthChar) const; |
|
975 |
||
976 |
/** |
|
977 |
* |
|
978 |
* |
|
979 |
* @return |
|
980 |
*/ |
|
981 |
TUint EditorMode(TInt aMode, TWidthChar aWidth) const; |
|
982 |
||
983 |
/** |
|
984 |
* Synchronises the states of the Fep Manager and the Key Catcher |
|
985 |
* |
|
986 |
* @return System wide error code. |
|
987 |
*/ |
|
988 |
TInt SyncStates(TAknFepManagerState aState); |
|
989 |
||
990 |
/** |
|
991 |
* Launches the matches popup list |
|
992 |
*/ |
|
993 |
void LaunchMatchesPopupListL(); |
|
994 |
||
995 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
996 |
// Predictive QWERTY (XT9) changes ----> |
|
997 |
/** |
|
998 |
* Launches the compact match candidate list which follows the inline editor. |
|
999 |
* @param aFocusedIndex The index of the word focused by default. |
|
1000 |
* If KErrNotFound is given, the currently active |
|
1001 |
* word will be focused. |
|
1002 |
*/ |
|
1003 |
void LaunchCandidatePopupListL( TInt aFocusedIndex = KErrNotFound ); |
|
1004 |
void StartInlineEditingWithSelectedWord(TDesC& aTextToUncommit); |
|
1005 |
/** |
|
1006 |
* Shows the exactly typed word above the inline editor if it differs from the |
|
1007 |
* best guess word shown inline. |
|
1008 |
*/ |
|
1009 |
void ShowExactWordPopupIfNecessaryL(); |
|
1010 |
||
1011 |
/** |
|
1012 |
* Launches the predictive setting dialog. |
|
1013 |
*/ |
|
1014 |
void LaunchPredictiveSettingDialogL(); |
|
1015 |
#ifdef FF_DUAL_LANGUAGE_SUPPORT |
|
1016 |
void LaunchWritingLanguageSettingDialogL(); |
|
1017 |
||
1018 |
void LaunchDualLanguageSettingDialogL(); |
|
1019 |
#endif //FF_DUAL_LANGUAGE_SUPPORT |
|
1020 |
||
1021 |
// Predictive QWERTY (XT9) changes <---- |
|
1022 |
||
1023 |
/** |
|
1024 |
* Handle shift loop in chinese variant for half qwerty |
|
1025 |
*/ |
|
1026 |
||
1027 |
void HandleShiftHalfQwertyChineseL(TEventCode aEventCode); |
|
1028 |
||
1029 |
/** |
|
1030 |
* Handle shift key loop in chinese variant for qwerty and mini qwerty |
|
1031 |
*/ |
|
1032 |
void HandleShiftQwertyChineseL(TEventCode aEventCode); |
|
1033 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
1034 |
||
1035 |
void GetCandidatesWithIndexL(CDesCArray* aArray, |
|
1036 |
TInt& aActiveIdx, TInt& aSecondaryIdx); |
|
1037 |
void TryPopExactWordInOtherPlaceL(); |
|
1038 |
||
1039 |
/** |
|
1040 |
* Launches the insert word query in western predictive text mode |
|
1041 |
*/ |
|
1042 |
void LaunchInsertWordQueryL(const TDesC& aInitialText, TCursorSelection aTextSpanToReplace); |
|
1043 |
||
1044 |
/** |
|
1045 |
* Actual query dialog for LaunchInsertWordQueryL and LaunchEditWordQueryL |
|
1046 |
*/ |
|
1047 |
void LaunchFepQueryDialogL(TInt aResourceId, const TDesC& aInitialText, |
|
1048 |
TCursorSelection aTextSpanToReplace); |
|
1049 |
||
1050 |
/** |
|
1051 |
* Inserts a text directly into the editor which previously had focus |
|
1052 |
*/ |
|
1053 |
void InsertTextFromDialogL(const TDesC& aTextFromDialog, |
|
1054 |
TCursorSelection aExtentOfTextToReplace); |
|
1055 |
||
1056 |
/** |
|
1057 |
* Launch the KutenCodeQuery |
|
1058 |
*/ |
|
1059 |
void LaunchKutenCodeQueryL(); |
|
1060 |
||
1061 |
/** |
|
1062 |
* Returns the resource ID for the numeric mode special character map |
|
1063 |
* available in the current editor. |
|
1064 |
*/ |
|
1065 |
TInt NumericModeSCTResourceId() const; |
|
1066 |
||
1067 |
/** |
|
1068 |
* Handles the hash key |
|
1069 |
* <ul> |
|
1070 |
* <\li>a short hash cycles through the modes |
|
1071 |
* <\li>a long key press moves to number mode unless the mode is already number, in which case |
|
1072 |
* it goes to default |
|
1073 |
* <\ul> |
|
1074 |
*/ |
|
1075 |
TKeyResponse HandleHashKeyL(TKeyPressLength aLength); |
|
1076 |
||
1077 |
/** |
|
1078 |
* |
|
1079 |
* @return Editor's numeric keymap for # and * keys of ITU-T mode. |
|
1080 |
*/ |
|
1081 |
TInt EditorNumericKeymap() const; |
|
1082 |
||
1083 |
/** |
|
1084 |
* dims the item on the edit menu corresponding to the current mode |
|
1085 |
* the user can press cancel to remain in the same mode |
|
1086 |
* |
|
1087 |
* @param aMenuPane the edit menu pane |
|
1088 |
*/ |
|
1089 |
void DimEditMenuModeItems(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
1090 |
||
1091 |
/** |
|
1092 |
* Launch confirmation note. |
|
1093 |
* |
|
1094 |
* @param aResourceId Confirmation note resource Id. |
|
1095 |
*/ |
|
1096 |
void LaunchConfirmationNoteL(TInt aResourceId); |
|
1097 |
||
1098 |
/** |
|
1099 |
* Enters a new character into the editing window |
|
1100 |
* <p> Secret Text Editors do not use the MCoeFepAwareTextEditorInterface, |
|
1101 |
* they interact with the editor by simlulating key events. When in Multitap, simultating a |
|
1102 |
* numeric key event causes an extra key to be added to the control stack because the numeric |
|
1103 |
* keys exist on the Series 60 keypad; the flag EFlagPassNextKey is used to ignore this. |
|
1104 |
* <p> When secret editing in multitap, a backspace is simulated to replace the last |
|
1105 |
* character in the editor. |
|
1106 |
*/ |
|
1107 |
void NewCharacterL(const TDesC& aChar); |
|
1108 |
/** |
|
1109 |
* Enters a new phrase into the editing window |
|
1110 |
* |
|
1111 |
*/ |
|
1112 |
void NewTextL(const TDesC& aText); |
|
1113 |
||
1114 |
/** |
|
1115 |
* Commits given string in the editing window. This function checks that |
|
1116 |
* the editor has enough space to insert given string. If it not, |
|
1117 |
* given string is cut, then it is committed. |
|
1118 |
*/ |
|
1119 |
void CommitInlineEditL(const TDesC& aText, TInt aUncommitedTextChange); |
|
1120 |
||
1121 |
/** |
|
1122 |
* Cansel inline input. |
|
1123 |
*/ |
|
1124 |
void CancelInlineEdit(); |
|
1125 |
||
1126 |
/** |
|
1127 |
* Used by editing window when it draws inline input characters. |
|
1128 |
*/ |
|
1129 |
void GetScreenCoordinatesL(TPoint& aLeftSideOfBaseLine, TInt& aHeight, |
|
1130 |
TInt& aAscent, TInt aDocumentOffset); |
|
1131 |
||
1132 |
/** |
|
1133 |
* Used by Chinese UI to get cursor baseline position. |
|
1134 |
*/ |
|
1135 |
void GetScreenCoordinatesL(TPoint& aLeftSideOfBaseLine,TInt& aHeight,TInt& aAscent); |
|
1136 |
||
1137 |
||
1138 |
||
1139 |
/** |
|
1140 |
* checks that the editor the editor has free space to add another character |
|
1141 |
* An editor of unlimited length will return its maximum size as zero |
|
1142 |
*/ |
|
1143 |
TBool IsEditorHasFreeSpace()const; |
|
1144 |
||
1145 |
/** |
|
1146 |
* Returns the free space left in the Editor. |
|
1147 |
* |
|
1148 |
* @param aUnlimit. Set to EFalse in case of Editors with limited text |
|
1149 |
* size |
|
1150 |
* isToCountUncommittedTextLength. Pass ETrue if the lenght of |
|
1151 |
* Uncommitted text is to be counted. |
|
1152 |
* |
|
1153 |
* @return TInt. Free space left in the Editor. |
|
1154 |
*/ |
|
1155 |
TInt EditorFreeSpace(TBool& aUnlimit, |
|
1156 |
TBool isToCountUncommittedTextLength = EFalse ) const; |
|
1157 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
1158 |
/** |
|
1159 |
* Returns the free space left in the Editor. ITI Specific Implementation |
|
1160 |
* |
|
1161 |
* @param aUnlimit. Set to EFalse in case of Editors with limited text |
|
1162 |
* size |
|
1163 |
* isToCountUncommittedTextLength. Pass ETrue if the lenght of |
|
1164 |
* Uncommitted text is to be counted. |
|
1165 |
* |
|
1166 |
* @return TInt. Free space left in the Editor. |
|
1167 |
*/ |
|
1168 |
TInt EditorFreeSpaceForAutoWordCompletion(TBool& aUnlimit, |
|
1169 |
TBool isToCountUncommittedTextLength = EFalse ) const; |
|
1170 |
#endif |
|
1171 |
||
1172 |
#ifdef __ITI_LONGPRESS_NUM_SHIFT_COPYPASTE__ |
|
1173 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
1174 |
/** |
|
1175 |
* Gives the amount of characters in the document. |
|
1176 |
* @return The number of characters in the active editor. |
|
1177 |
*/ |
|
1178 |
TInt DocumentLength() const; |
|
1179 |
||
1180 |
/** |
|
1181 |
* Tells if the given key event will replace the latest character in editor |
|
1182 |
* because of multitapping or long press handling. |
|
1183 |
*/ |
|
1184 |
TBool KeyEventWillReplaceCharacter( const TKeyEvent& aKeyEvent ); |
|
1185 |
||
1186 |
#endif |
|
1187 |
#endif |
|
1188 |
||
1189 |
/** |
|
1190 |
* Uses TLocale to access the localized decimal separator in the kernel |
|
1191 |
*/ |
|
1192 |
TChar CurrentDecimalSeparator() const; |
|
1193 |
||
1194 |
/** |
|
1195 |
* Sets up the FEP state from the Editor State |
|
1196 |
* Called by HandleChangeInFocusL() |
|
1197 |
*/ |
|
1198 |
void ConfigureFEPFromEditorStateL(); |
|
1199 |
||
1200 |
/** |
|
1201 |
* Sets up the FEP State(character width) from the Editor Mode |
|
1202 |
* @return FepMode |
|
1203 |
*/ |
|
1204 |
TInt ConfigureFepModeFromEditorMode(TInt aEditorMode); |
|
1205 |
||
1206 |
/** |
|
1207 |
* launch query which contains instructions on how to enter |
|
1208 |
* chinese text using the FEP |
|
1209 |
*/ |
|
1210 |
void LaunchHelpTextQueryL(); |
|
1211 |
||
1212 |
/** |
|
1213 |
* ensure that the UI is aware of the current editor context |
|
1214 |
*/ |
|
1215 |
void UpdateEditorContext() const; |
|
1216 |
||
1217 |
/** |
|
1218 |
* query whether the text is valid in the current editor |
|
1219 |
*/ |
|
1220 |
TBool TextIsValidInEditor(const TDesC& aText); |
|
1221 |
||
1222 |
||
1223 |
/** |
|
1224 |
* Sets the style of the cursor to aType |
|
1225 |
*/ |
|
1226 |
void SetCursorType(TChineseFepCursorType aType); |
|
1227 |
||
1228 |
/** |
|
1229 |
* Returns the current editing state indicator |
|
1230 |
*/ |
|
1231 |
MAknEditingStateIndicator* EditingStateIndicator() const; |
|
1232 |
||
1233 |
/** |
|
1234 |
* Adds space at the end of the buffer if the feature is enabled. |
|
1235 |
*/ |
|
1236 |
TBool TryHandleArrowRightEventL(TInt aDocumentLength); |
|
1237 |
||
1238 |
/** |
|
1239 |
* Remove spaces from the end of the buffer if the cursor |
|
1240 |
* is in last position. Only in Japanese variant. |
|
1241 |
* Opposite functionality of TryHandleArrowRightEventL(). |
|
1242 |
*/ |
|
1243 |
TBool TryHandleArrowLeftEventL(TInt aDocumentLength); |
|
1244 |
||
1245 |
/** |
|
1246 |
* Adds enter to the buffer if the cursor is at the end of the buffer and |
|
1247 |
* feature KAknFepEnterWithScrollDown is enabled. |
|
1248 |
* |
|
1249 |
* @since 2.6 |
|
1250 |
* @param aDocumentLength Editor's document length |
|
1251 |
* @return Boolean if the down key event was handled. |
|
1252 |
*/ |
|
1253 |
TBool TryHandleArrowDownEventL(TInt aDocumentLength); |
|
1254 |
||
1255 |
inline void ResetFlags(); |
|
1256 |
||
1257 |
/** |
|
1258 |
* Handle the Chr Key Monitor |
|
1259 |
* for Japanese variant only. |
|
1260 |
* |
|
1261 |
* @since 3.0 |
|
1262 |
* @return KErrNone if succeed, KErrDied if failed |
|
1263 |
*/ |
|
1264 |
static TInt HandleChrKeyMonitorCallback(TAny* aObj); |
|
1265 |
||
1266 |
/** |
|
1267 |
* Enters a new ligature into the editing window. |
|
1268 |
* |
|
1269 |
* @since 3.2 |
|
1270 |
* @param aText Unicode value of the ligature. |
|
1271 |
* @return None |
|
1272 |
*/ |
|
1273 |
void NewLigatureL( const TDesC& aText ); |
|
1274 |
/** |
|
1275 |
* Sets the current state to aState based on the input mode |
|
1276 |
* used to show the indicator |
|
1277 |
* @since 3.2 |
|
1278 |
*/ |
|
1279 |
void SetPredictiveIndicatorState(TAknEditingState& aState); |
|
1280 |
static TInt HandleResourceChangedCallback(TAny* aObj); |
|
1281 |
||
1282 |
void ResourceChangedTimeroutL(); |
|
1283 |
/** |
|
1284 |
* Exit plugin itut spell mode by press ok btn |
|
1285 |
*/ |
|
1286 |
void ExitPluginSpellModeByOkL(); |
|
1287 |
||
1288 |
#ifdef RD_SCALABLE_UI_V2 |
|
1289 |
/** |
|
1290 |
* Unregisters Fep as observer |
|
1291 |
*/ |
|
1292 |
void UnregisterObserver(); |
|
1293 |
||
1294 |
/** |
|
1295 |
* Unregisters Fep as observer |
|
1296 |
*/ |
|
1297 |
void RegisterObserver(); |
|
1298 |
||
1299 |
#endif // RD_SCALABLE_UI_V2 |
|
1300 |
private: |
|
1301 |
TUint EditorModeFromFepMode(TInt aFepMode); |
|
1302 |
||
1303 |
// returns sound system |
|
1304 |
CAknKeySoundSystem* SoundSystem() const; |
|
1305 |
||
1306 |
void SetHashKeyStyle(); |
|
1307 |
void ReadHashKeyLoopL(); |
|
1308 |
||
1309 |
TBool IsValidInLineCharacter(TChar aCharacter) const; |
|
1310 |
TBool HandleLoopingInNaviEventL(TWesternNaviEvent aNaviEvent); |
|
1311 |
||
1312 |
static TInt WordConcatenationTimerTimeoutCallback(TAny* aObj); |
|
1313 |
void WordConcatenationTimerTimeoutL(); |
|
1314 |
||
1315 |
void AddInputLanguageItemL(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex); |
|
1316 |
void SetQwertyModeToInputcapbility(); |
|
1317 |
void SetExtendedInputCapabilities( TUint aCapabilities); |
|
1318 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
1319 |
||
1320 |
// Predictive QWERTY (XT9) changes ----> |
|
1321 |
/** |
|
1322 |
* Adds the "Input Options" option and its sub menu to the given menu. |
|
1323 |
* @param aMenuPane The menu where the option should be added. |
|
1324 |
* @param aIndex The location in the menu where the option should be added. |
|
1325 |
*/ |
|
1326 |
||
1327 |
void AddPredictiveModeOptionsL(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex) const; |
|
1328 |
||
1329 |
/** |
|
1330 |
* Adds the XT9 Edit menu options to the given menu. |
|
1331 |
* @param aMenuPane The menu where the option should be added. |
|
1332 |
* @param aIndex The location in the menu where the option should be added. |
|
1333 |
*/ |
|
1334 |
||
1335 |
void AddPredictiveModeEditMenuL(CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex) const; |
|
1336 |
||
1337 |
// Predictive QWERTY (XT9) changes <---- |
|
1338 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
1339 |
/* Sets default number mode when arabic language is used. |
|
1340 |
* @param aMode either Latin or Arabic |
|
1341 |
* @param aNbrModeType number mode type from GSLangPlugin.hrh |
|
1342 |
*/ |
|
1343 |
void SetDefaultNumberMode( TInt aMode, TInt aNbrModeType ); |
|
1344 |
||
1345 |
/** |
|
1346 |
* Loads an icon from avkon bitmap file. |
|
1347 |
* @param aIcons The array into which the icon will be added. Icons will be |
|
1348 |
* owned by this array. |
|
1349 |
* @param aBitmapId ID of the actual bitmap. |
|
1350 |
* @param aMaskId ID of the mask. |
|
1351 |
*/ |
|
1352 |
void LoadIconL( CArrayPtr<CGulIcon>* aIcons, TInt aBitmapId, TInt aMaskId ); |
|
1353 |
||
1354 |
/** |
|
1355 |
* Add a menu item for User DB management. |
|
1356 |
* phrase creation |
|
1357 |
* @since S60 5.0 S60_version |
|
1358 |
* @param aMenuPane The menu into which the mune item will be added. |
|
1359 |
* @param aIndex Index of the menu item to insert. |
|
1360 |
* @return none |
|
1361 |
*/ |
|
1362 |
void AddUserDBDlgItemL( CAknFepUiInterfaceMenuPane* aMenuPane, TInt aIndex ); |
|
1363 |
||
1364 |
/** |
|
1365 |
* Return wether ipnut mode is change by press shift+space. |
|
1366 |
* This is for half-qwerty. |
|
1367 |
* @return ETure is change by press shift+space, otherwise EFalse. |
|
1368 |
*/ |
|
1369 |
TBool IsChangeModeByShiftAndSpace(); |
|
1370 |
||
1371 |
/** |
|
1372 |
* Set wether ipnut mode is change by press shift+space. |
|
1373 |
* This is for half-qwerty. |
|
1374 |
* @return none |
|
1375 |
*/ |
|
1376 |
void SetChangeModeByShiftAndSpace( TBool aFlag ); |
|
1377 |
||
1378 |
/** |
|
1379 |
* Handle the Fn Key Monitor |
|
1380 |
* |
|
1381 |
* @since 3.0 |
|
1382 |
* @return KErrNone if succeed, KErrDied if failed |
|
1383 |
*/ |
|
1384 |
static TInt HandleFnKeyPressMonitorCallback(TAny* aObj); |
|
1385 |
||
1386 |
/** |
|
1387 |
* Handle the Fn Key Monitor |
|
1388 |
* for Qwerty only. |
|
1389 |
* |
|
1390 |
* @since 3.0 |
|
1391 |
*/ |
|
1392 |
void HandleFnKeyPressMonitor(); |
|
1393 |
||
1394 |
/** |
|
1395 |
* Activate fn key press monitor to detect long pressing event |
|
1396 |
*/ |
|
1397 |
void ActivateFnkeyPressMonitor(); |
|
1398 |
||
1399 |
/** |
|
1400 |
* Deactivate fn key press monitor |
|
1401 |
*/ |
|
1402 |
void DeactivateFnkeyPressMonitor(); |
|
1403 |
||
1404 |
public: |
|
1405 |
//Hash Key Manager Interface |
|
1406 |
TBool IsOnlyNumericPermitted() const; |
|
1407 |
void TryIncrementModeL(TInt aCurrentMode); |
|
1408 |
void TryIncrementModeChineseQwertyL(TInt aCurrentMode); |
|
1409 |
void TryIncrementChineseModeForQwertyL(TInt aCurrentMode); |
|
1410 |
void TryChangeToSharedDataModeL(); |
|
1411 |
void TryChangeToModeBeforeL(); |
|
1412 |
TBool TryChangeModeL(TInt aMode); |
|
1413 |
void ChangeInputLanguageL(TInt aInputLanguage); |
|
1414 |
void RemovePreviousCharacterL(); |
|
1415 |
void TryChangePredictiveInputModeL(TBool aFlag); |
|
1416 |
||
1417 |
/** |
|
1418 |
* To Handle Indic Hash key |
|
1419 |
* |
|
1420 |
* |
|
1421 |
* @since 3.2 |
|
1422 |
* @return the language id of the Input Language as in Cenral Repository (General Settings) |
|
1423 |
*/ |
|
1424 |
TLanguage GetInputLanguageFromSharedDataInterface(); |
|
1425 |
||
1426 |
||
1427 |
/** |
|
1428 |
* To Handle Hash key |
|
1429 |
* |
|
1430 |
* |
|
1431 |
* @since 3.2 |
|
1432 |
* @return ETrue if the Last Key press was Hash key. |
|
1433 |
*/ |
|
1434 |
TBool WasLastKeyPressAHashKey(); |
|
1435 |
||
1436 |
/** |
|
1437 |
* To Handle Hash key |
|
1438 |
* To set or Reset the status maintained to know if last key pressed was Hash Key |
|
1439 |
* |
|
1440 |
* @since 3.2 |
|
1441 |
* @return nothin |
|
1442 |
*/ |
|
1443 |
void SetLastPressedHashKeyStatus(TBool aStatus); |
|
1444 |
||
1445 |
//Case Manager Interface |
|
1446 |
MCoeFepAwareTextEditor* FepAwareTextEditor() const; |
|
1447 |
||
1448 |
TBool IsFepAwareTextEditor() const; |
|
1449 |
||
1450 |
TCursorSelection UncommittedText() const; |
|
1451 |
void SetCase(TCase aCase); |
|
1452 |
||
1453 |
//made public for western |
|
1454 |
||
1455 |
/** |
|
1456 |
* Retreives the State of the current editor |
|
1457 |
* |
|
1458 |
* @return the current editors state object |
|
1459 |
*/ |
|
1460 |
CAknEdwinState* EditorState() const; |
|
1461 |
||
1462 |
/** |
|
1463 |
* update the edit indicators when moving into a new input mode |
|
1464 |
*/ |
|
1465 |
void UpdateIndicators(); |
|
1466 |
||
1467 |
/** |
|
1468 |
* Checks if the editor is in a state where a Special Character Table can be launched |
|
1469 |
*/ |
|
1470 |
TBool IsAbleToLaunchSCT() const; |
|
1471 |
||
1472 |
/** |
|
1473 |
* Get SCT Chars' Length to judge it's null |
|
1474 |
*/ |
|
1475 |
TBool GetSctLengthL(TInt resourceId)const; |
|
1476 |
||
1477 |
/** |
|
1478 |
* Get current editor's SCT resource id |
|
1479 |
*/ |
|
1480 |
TInt GetCurrentEditorSCTResId() const; |
|
1481 |
||
1482 |
/** |
|
1483 |
* Launch the Special Character Table |
|
1484 |
*/ |
|
1485 |
void LaunchSpecialCharacterTableL(TInt aResourceId = EDefaultNumericCharMapResId, |
|
1486 |
TBool aLaunchedByTouchWin=EFalse, |
|
1487 |
TBool aSmileyFirst=EFalse); |
|
1488 |
||
1489 |
/** |
|
1490 |
* Checks if the editor is in a state where a Pictograph Character Table can be launched |
|
1491 |
*/ |
|
1492 |
TBool IsAbleToLaunchPCT() const; |
|
1493 |
||
1494 |
/** |
|
1495 |
* Checks if the editor is in a state where a Pictograph Character Table can be launched |
|
1496 |
*/ |
|
1497 |
TBool IsAbleToLaunchSmiley() const; |
|
1498 |
||
1499 |
/** |
|
1500 |
* Launch the Pictograph Character Table |
|
1501 |
*/ |
|
1502 |
void LaunchPictographCharacterTableL(); |
|
1503 |
||
1504 |
//MAknFepManagerUIInterfaceWestern |
|
1505 |
virtual void UpdateInlineEditL(const TDesC& aNewInlineText, |
|
1506 |
TInt aPositionOfInsertionPointInInlineText); |
|
1507 |
virtual void StartInlineEditL(); |
|
1508 |
virtual void StartInlineEditL(const TDesC& aText); |
|
1509 |
virtual void StartInlineEditL(TCursorSelection aCursorSelection, |
|
1510 |
const TDesC& aInitialInlineText, |
|
1511 |
TInt aPositionOfInsertionPointInInlineText, |
|
1512 |
TBool aCursorVisibility); |
|
1513 |
||
1514 |
virtual TBool CloseUiIfWordDeletedL(); |
|
1515 |
virtual TBool TryGetTextToUncommitL(TDes& aText, TInt aCode, TBool& aComsumeKey); |
|
1516 |
||
1517 |
/** |
|
1518 |
* Addition for ITI features on FSQ. |
|
1519 |
* To check which characters will be underlined. |
|
1520 |
*/ |
|
1521 |
TBool TryGetTextToUncommitL(TDes& aText, TBool& aComsumeKey); |
|
1522 |
||
1523 |
virtual void UpdateCbaL(TInt aResourceId); |
|
1524 |
virtual TBool TryRemoveNoMatchesIndicatorL(); |
|
1525 |
virtual TBool IsMoreGoodWordsComing(TInt aNewWordLength) const; |
|
1526 |
#ifndef RD_INTELLIGENT_TEXT_INPUT |
|
1527 |
virtual TBool IsMoreGoodAutoCompleteWordsComing(TInt aInputMode, TInt aPreviousWordLengh, |
|
1528 |
TInt aNewWordLength) const; |
|
1529 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
1530 |
virtual void TryStartCompoundWord(); |
|
1531 |
virtual void AddCompoundWordToUdbL(); |
|
1532 |
||
1533 |
//MAknFepManagerUIInterfaceWestern made public for western |
|
1534 |
inline TBool IsFlagSet(TInt aFlag) const; |
|
1535 |
inline void SetFlag(TInt aFlag); |
|
1536 |
inline void ClearFlag(TInt aFlag); |
|
1537 |
||
1538 |
inline TBool IsExtendedFlagSet(TInt aExtendedFlag) const; |
|
1539 |
inline void SetExtendedFlag(TInt aExtendedFlag); |
|
1540 |
inline void ClearExtendedFlag(TInt aExtendedFlag); |
|
1541 |
inline void ResetExtendedFlags(); |
|
1542 |
||
1543 |
inline TCoeInputCapabilities& InputCapabilities(); |
|
1544 |
||
1545 |
void SetWesternPredictive( const TBool aWesternPredictive ); |
|
1546 |
void SetWesternAutoComplete( const TBool aWesternAutoComplete ); |
|
1547 |
void SetJapanesePredictive(const TBool aJapanesePredictive); |
|
1548 |
void SetQwertyMode(const TBool aQwertyMode); // Empty implementation. Qwerty mode is not supported. |
|
1549 |
||
1550 |
TBool WesternPredictive(TInt aMode = 0) const; |
|
1551 |
TBool IsPredictive(TInt aMode = 0) const; |
|
1552 |
TBool Japanese() const; |
|
1553 |
TBool IsOnlyFullWidthCharacterPermitted() const; |
|
1554 |
TBool IsOnlyHalfWidthCharacterPermitted() const; |
|
1555 |
TBool IsHalfAndFullKatakanaPermitted() const; |
|
1556 |
TBool IsHalfAndFullLatinPermitted() const; |
|
1557 |
TBool IsHalfAndFullNumberPermitted() const; |
|
1558 |
virtual TWidthChar CharacterWidth() const; |
|
1559 |
||
1560 |
virtual CPtiEngine* PtiEngine() const; |
|
1561 |
virtual void SetInlineEditingCursorVisibilityL(TBool aCursorVisibility); |
|
1562 |
||
1563 |
TInt InputMode() const; |
|
1564 |
TInt CangJieMode() const; |
|
1565 |
||
1566 |
TBool InputLanguageSupportsCaseChanges() const; |
|
1567 |
||
1568 |
/** |
|
1569 |
* Queries supportting of KAknFepScrollLatinPredictive feature |
|
1570 |
* |
|
1571 |
* @since 2.6 |
|
1572 |
* @return ETrue if ScrollLatinPredictive was supported |
|
1573 |
*/ |
|
1574 |
TBool IsAbleScrollLatinPredictive() const; |
|
1575 |
||
1576 |
/** |
|
1577 |
* Previous case is returned. |
|
1578 |
* |
|
1579 |
* @since 2.6 |
|
1580 |
* @return TInt EAknEditorTextCase or EAknEditorUpperCase or EAknEditorLowerCase |
|
1581 |
* If case cannot be saved, 0 value is returned. |
|
1582 |
*/ |
|
1583 |
inline TInt CaseBefore() const; |
|
1584 |
||
1585 |
/** |
|
1586 |
* @return true if current input language is one of Chinese input languages. |
|
1587 |
*/ |
|
1588 |
inline TBool IsChineseInputLanguage() const; |
|
1589 |
||
1590 |
/** |
|
1591 |
* @return true if current input language is arabic input languages. |
|
1592 |
*/ |
|
1593 |
inline TBool IsArabicInputLanguage() const; |
|
1594 |
||
1595 |
/** |
|
1596 |
* @return true if current input language is Korean input language. |
|
1597 |
*/ |
|
1598 |
||
1599 |
inline TBool IsKoreanInputLanguage() const; |
|
1600 |
||
1601 |
/** |
|
1602 |
* Check Qwerty keypad |
|
1603 |
* |
|
1604 |
* @since 3.0 |
|
1605 |
* @return ETrue is Qwerty |
|
1606 |
*/ |
|
1607 |
inline TBool IsQwerty() const; |
|
1608 |
||
1609 |
||
1610 |
/** |
|
1611 |
* Returns boolean value indicating whether hash key is in selection mode or |
|
1612 |
* in traditional mode. |
|
1613 |
* |
|
1614 |
* @since 3.1 |
|
1615 |
* @return ETrue if hash key is in text selection mode. |
|
1616 |
* EFalse otherwise. |
|
1617 |
*/ |
|
1618 |
TBool HashKeySelectionInUse() const; |
|
1619 |
||
1620 |
/** |
|
1621 |
* Returns the UI interface implementation used in the current app. |
|
1622 |
* |
|
1623 |
* @since 3.2 |
|
1624 |
* @return The UI interface object used in the current app. |
|
1625 |
*/ |
|
1626 |
CAknFepUIInterface* UiInterface(); |
|
1627 |
||
1628 |
/** |
|
1629 |
* Returns boolean value indicating whether edit submenu functionality is in use. |
|
1630 |
* |
|
1631 |
* @since 3.1 |
|
1632 |
* @return ETrue if edit submenu functionality is in use. |
|
1633 |
* EFalse otherwise. |
|
1634 |
*/ |
|
1635 |
TBool EditSubmenuInUse() const; |
|
1636 |
||
1637 |
/** |
|
1638 |
* Set MultiTap Timer |
|
1639 |
* |
|
1640 |
* @since 3.0 |
|
1641 |
* @param aMultiTapTimer value of KAknFepMultiTapTimer setting |
|
1642 |
*/ |
|
1643 |
void SetMultiTapTimer(const TInt aMultiTapTimer); |
|
1644 |
||
1645 |
/** |
|
1646 |
* Set Japanese Qwerty Flags |
|
1647 |
* |
|
1648 |
* @since 3.0 |
|
1649 |
* @param aJapaneseQwertyFlags value of KAknFepJapaneseSpecialCharFlag setting |
|
1650 |
*/ |
|
1651 |
void SetJapaneseQwertyFlags(const TInt aJapaneseQwertyFlags); |
|
1652 |
||
1653 |
/** |
|
1654 |
* Calling this method will raise a flag which will cause predictive |
|
1655 |
* word to be commited during next call to TryCloseUiL-method. This |
|
1656 |
* is needed because of Japanese ReadingTextL. |
|
1657 |
* |
|
1658 |
* @since 3.1 |
|
1659 |
*/ |
|
1660 |
void SetDelayedCommit(); |
|
1661 |
||
1662 |
/** |
|
1663 |
* from MAknFepManagerUIInterface |
|
1664 |
* query whether the special char is valid in the current editor |
|
1665 |
* |
|
1666 |
* @param aChar Checking a chracter |
|
1667 |
*/ |
|
1668 |
TBool CharIsValidInEditor(TChar aChar); |
|
1669 |
||
1670 |
/** |
|
1671 |
* from MAknFepManagerUIInterface |
|
1672 |
* Returns the status of predictive input. |
|
1673 |
* |
|
1674 |
* @since 3.2 |
|
1675 |
* @return ETrue is available predictive input. |
|
1676 |
*/ |
|
1677 |
TBool IsAbleToChangePrediction() const; |
|
1678 |
||
1679 |
/** |
|
1680 |
* Commits uncommitted text in the editing window. For secret text editors, |
|
1681 |
* only inline editing flags are changed |
|
1682 |
*/ |
|
1683 |
void CommitInlineEditL(); |
|
1684 |
||
1685 |
TBool GetIndicatorImgID(TInt& aIndicatorImgID, TInt& aIndicatorTextID); |
|
1686 |
||
1687 |
TInt CurrentInputLangCode(); |
|
1688 |
||
1689 |
inline TFepSymbolOfHardwareOne SymbolInfoOfHardKey1(); |
|
1690 |
public: |
|
1691 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
1692 |
/* |
|
1693 |
Sets the keyboard layout. |
|
1694 |
**/ |
|
1695 |
void SetKeyboardLayout(TPtiKeyboardType aType); |
|
1696 |
#endif |
|
1697 |
virtual TText PreviousChar( TBool aContextSensitive = EFalse ); |
|
1698 |
virtual TText NextChar(); |
|
1699 |
virtual TBool IsZWSCharacterPresent( TBool aLigaturePresent = EFalse ); |
|
1700 |
void RemoveZWSCharacterL( TBool aIsViramaInputted, |
|
1701 |
TBool aIsInMultitappingHalant = EFalse, |
|
1702 |
TBool aIsCharModifier = EFalse, |
|
1703 |
TBool aIsLigaturePresent = EFalse ); |
|
1704 |
void NewCharacterSequenceL(const TDesC& aText, TIndicInputResponse aResponse); |
|
1705 |
TBool IsValidInlineIndicCharacter(TChar aCharacter) const; |
|
1706 |
#ifdef RD_HINDI_PHONETIC_INPUT |
|
1707 |
TBool IsIndicPhoneticInputLanguage() const; |
|
1708 |
TInt SetPhoneticIndicator(TLanguage aInputLanguage); |
|
1709 |
void TryChangePhoneticModeL(); |
|
1710 |
#endif |
|
1711 |
TDigitType LocalDigit(); |
|
1712 |
public: |
|
1713 |
/** |
|
1714 |
* Auto word Completion is Enabled |
|
1715 |
* |
|
1716 |
* @since 3.2 |
|
1717 |
*/ |
|
1718 |
void SetAutoCompletionState(TInt aValue); |
|
1719 |
#ifndef RD_INTELLIGENT_TEXT_INPUT |
|
1720 |
void RemoveSuggestedCompletionL(); |
|
1721 |
#endif //RD_PRED_AW_COMPLETION |
|
1722 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
1723 |
TBool IsFnKeyMappedL(TPtiKeyboardType aKeyboardType = EPtiKeyboardNone); |
|
1724 |
TBool IsFnKeyMapped(); |
|
1725 |
void SetFnKeyMappingState(); |
|
1726 |
TBool KeyMapsDifferentCharacterWithFn( TPtiKey aKey ) const; |
|
1727 |
||
1728 |
/** |
|
1729 |
* Setter for the advanced predictive typing correction. |
|
1730 |
* @param aLevel The level to be set. |
|
1731 |
*/ |
|
1732 |
void SetTypingCorrectionLevel(TInt aLevel); |
|
1733 |
||
1734 |
/** |
|
1735 |
* Resetter for the advanced predictive Number Candidate setting. |
|
1736 |
* @param aValue The value to be set. |
|
1737 |
*/ |
|
1738 |
void SetNumberCandidateState(TInt aValue); |
|
1739 |
||
1740 |
/** |
|
1741 |
* Setes the primary candidate from GS to the local state |
|
1742 |
*/ |
|
1743 |
void SetPrimaryCandidate(TInt aValue); |
|
1744 |
#endif |
|
1745 |
||
1746 |
void SetStopProcessFocus(TBool aStop, TBool aClose = ETrue); |
|
1747 |
||
1748 |
TBool StopProcessFocus(); |
|
1749 |
||
1750 |
TBool CloseUiOnFocusChange(); |
|
1751 |
||
1752 |
||
1753 |
public: |
|
1754 |
void HandleOwnedSimulateKeyL(); |
|
1755 |
||
1756 |
TBool HandleCcpuModeKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode, |
|
1757 |
TKeyResponse& aRetCode, TBool aLongPressFlag = EFalse); |
|
1758 |
||
1759 |
/** |
|
1760 |
* Sets aFlag bitfield in iCcpuFlags |
|
1761 |
*/ |
|
1762 |
inline void SetCcpuFlag(TInt aFlag); |
|
1763 |
||
1764 |
/** |
|
1765 |
* Clears aFlag bitfield in iCcpuFlags |
|
1766 |
*/ |
|
1767 |
inline void ClearCcpuFlag(TInt aFlag); |
|
1768 |
||
1769 |
/** |
|
1770 |
* Clears all flags in iCcpuFlags |
|
1771 |
*/ |
|
1772 |
inline void ResetCcpuFlags(); |
|
1773 |
||
1774 |
/** |
|
1775 |
* Returns ETrue if the aFlag bitfield in iCcpuFlags is set, EFalse if it |
|
1776 |
* is clear |
|
1777 |
*/ |
|
1778 |
inline TBool IsCcpuFlagSet(TInt aFlag) const; |
|
1779 |
/** |
|
1780 |
* Check if Auto word Completion is Enabled |
|
1781 |
* |
|
1782 |
* @since 3.2 |
|
1783 |
* @return ETrue if Auto word Completion is enabled |
|
1784 |
*/ |
|
1785 |
inline TBool IsAutoCompleteOn() const; |
|
1786 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
1787 |
||
1788 |
||
1789 |
||
1790 |
/** |
|
1791 |
* @return TInt Typing correction level. |
|
1792 |
*/ |
|
1793 |
inline TInt AdvancedPredictiveTypingCorrectionLevel() const; |
|
1794 |
||
1795 |
/** |
|
1796 |
* @return ETrue If the number candidate shown. EFalse otherwise. |
|
1797 |
*/ |
|
1798 |
inline TBool IsAdvancedPredictiveNumberCandidateShown() const; |
|
1799 |
||
1800 |
/** |
|
1801 |
* Cuts off the automatically completed tail of the suggested word candidate. |
|
1802 |
*/ |
|
1803 |
virtual void RemoveSuggestedAdvanceCompletionL(); |
|
1804 |
||
1805 |
/** |
|
1806 |
* @return ETrue If the number candidate shown. EFalse otherwise. |
|
1807 |
*/ |
|
1808 |
inline TBool AdvancedPredictivePrimaryCandidate() const; |
|
1809 |
TBool LongPressNumberEntryOnQwerty() const; |
|
1810 |
||
1811 |
// Predictive QWERTY (XT9) changs <---- |
|
1812 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
1813 |
/** |
|
1814 |
* Returns ETrue if Feature manager supports Japanese. |
|
1815 |
*/ |
|
1816 |
inline TBool IsFeatureSupportedJapanese() const; |
|
1817 |
||
1818 |
/** |
|
1819 |
* Cancels shift key timer. |
|
1820 |
*/ |
|
1821 |
void CancelShiftKeyTimer(); |
|
1822 |
||
1823 |
/** |
|
1824 |
* Queries supportting of SecretText |
|
1825 |
* |
|
1826 |
* @since 2.6 |
|
1827 |
* @return ETrue if SecretText was supported |
|
1828 |
*/ |
|
1829 |
TBool IsSupportsSecretText() const; |
|
1830 |
||
1831 |
void SendEventsToPluginManL( TInt aEventType, TInt aEventData = 0 ); |
|
1832 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
1833 |
/** |
|
1834 |
Sends the key event received to the Fn key handler and sets the Fn key state. |
|
1835 |
*/ |
|
1836 |
TKeyResponse HandleFnKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aEventCode ); |
|
1837 |
#endif |
|
1838 |
||
1839 |
MAknFepManagerInterface* FepUI() const; |
|
1840 |
||
1841 |
TTmDocPosSpec DocPos(); |
|
1842 |
||
1843 |
void HandleCopyCutEventL(TInt aCommandId); |
|
1844 |
||
1845 |
void LaunchPenSupportMenuL(); |
|
1846 |
||
1847 |
private: //navigation |
|
1848 |
void FindStartOfWord(TInt& aAnchorPos) const; |
|
1849 |
void FindEndOfWord(TInt& aCursorPos) const; |
|
1850 |
TBool CursorInsideWord(); |
|
1851 |
void MoveCursorToStartOfWordL(); |
|
1852 |
void MoveCursorToEndOfWordL(); |
|
1853 |
TKeyResponse HandleNaviEventOutsideInlineEditL(TUint aCode, TKeyPressLength aLength); |
|
1854 |
TKeyResponse HandleWesternPredictiveArrowKeyL(TInt aCode, TKeyPressLength aLength); |
|
1855 |
TBool TryHandleTextSelectedNaviEventL(TInt aCode, TKeyResponse& aResponse); |
|
1856 |
TBool TryHandleCommonArrowAndBackspaceFunctionalityL(TInt aCode, TKeyResponse& aResponse); |
|
1857 |
void TransferFepStateToEditorL(TBool aFnLockSync=ETrue); |
|
1858 |
inline MAknFepManagerInterface* InternalFepUI(); |
|
1859 |
||
1860 |
||
1861 |
void LaunchLanguagesPopupListL(TBool aLaunchedByTouchWin = EFalse); |
|
1862 |
void LaunchRecognitionWithDictionaryPopupListL(); |
|
1863 |
void LaunchWritingSpeedPopupListL(); |
|
1864 |
void LaunchGuidingLinePopupListL(); |
|
1865 |
TBool IsInputModeAvailable(TInt aMode) const; |
|
1866 |
TInt NewInputModeAfterLanguageChange() const; |
|
1867 |
||
1868 |
/** |
|
1869 |
* Launch User DB dialog |
|
1870 |
* phrase creation |
|
1871 |
* @since S60 5.0 S60_version |
|
1872 |
* @param none |
|
1873 |
* @return none |
|
1874 |
*/ |
|
1875 |
void LaunchUserDBDlgL(); |
|
1876 |
||
1877 |
/** |
|
1878 |
* Set current input language and the capabilities of the language to |
|
1879 |
* the iLanguageCapabilities member variable. |
|
1880 |
* |
|
1881 |
* @param aInputLanguage New (current) input language. |
|
1882 |
*/ |
|
1883 |
void SetInputLanguageCapabilities(const TInt aInputLanguage); |
|
1884 |
||
1885 |
/** |
|
1886 |
* Returns input language code that corresponds to UI language. |
|
1887 |
* |
|
1888 |
* @param aUiLanguage Ui language code. |
|
1889 |
* @return Input language code that corresponds to the UI language code. |
|
1890 |
*/ |
|
1891 |
TInt SubstituteSublanguageId(const TInt aUiLanguage) const; |
|
1892 |
||
1893 |
CTextView* TextView() const; |
|
1894 |
CTextLayout* TextLayout() const; |
|
1895 |
CPlainText* PlainText() const; |
|
1896 |
||
1897 |
void DoWesternMenu(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
1898 |
void DoChineseMenu(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
1899 |
void DoJapaneseMenu(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
1900 |
void DoChineseSubMenu(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
1901 |
||
1902 |
TBool IsRightToLeftParagraph(TTmDocPosSpec aPos) const; |
|
1903 |
void FindAdjacentChunks(const TTmDocPosSpec& aPos, |
|
1904 |
CTmTextLayout::TTmChunkDescription& aLeft, |
|
1905 |
CTmTextLayout::TTmChunkDescription& aRight) const; |
|
1906 |
||
1907 |
TBool GetNextVisualRightCharacter( TInt& aPosition ); |
|
1908 |
TBool GetNextVisualLeftCharacter( TInt& aPosition ); |
|
1909 |
void FindVisualRightOfWord(TInt& aPosition); |
|
1910 |
void FindVisualLeftOfWord(TInt& aPosition); |
|
1911 |
||
1912 |
// |
|
1913 |
// Remaining methods here are candidates for turning into TextViewUtility methods. Some |
|
1914 |
// have been made static already in anticipation of this. |
|
1915 |
// |
|
1916 |
/** |
|
1917 |
* Obtains the visual beginning of the document. This may be the left or right the right |
|
1918 |
* end of the first line, depending on first paragraph's direction. If the beginning of the document |
|
1919 |
* is currently not formatted, then EFalse is returned |
|
1920 |
* |
|
1921 |
* @param aEndPos DocPosSpec is returned for the visual beginning of the document. |
|
1922 |
* @return ETrue if the value is successfully calculated, that is the first line is formatted |
|
1923 |
*/ |
|
1924 |
TBool GetVisualDocStart( TTmDocPosSpec& aStartPos ) const; |
|
1925 |
||
1926 |
/** |
|
1927 |
* Obtains the visual end of the document. This may be the left or right the right |
|
1928 |
* end of the last line, depending on last paragraphs direction. If the end of the document |
|
1929 |
* is currently not formatted, then EFalse is returned |
|
1930 |
* |
|
1931 |
* @param aEndPos DocPosSpec is returned for the visual end of the document. |
|
1932 |
* @return ETrue if the value is successfully calculated, that is the last line is formatted |
|
1933 |
*/ |
|
1934 |
TBool GetVisualDocEnd( TTmDocPosSpec& aEndPos ) const; |
|
1935 |
||
1936 |
/** |
|
1937 |
* Get the document position of the visual extrem of the line in which the passed position |
|
1938 |
* is in. |
|
1939 |
* |
|
1940 |
* @param aPos A position within the line you are interested in |
|
1941 |
* @param aToRight ETrue if you want the right hand end. |
|
1942 |
* @param aExtreme Output value of the doc pos spec for the end of the line |
|
1943 |
* @return ETrue if the line was formatted. If False, the value of eExtreme |
|
1944 |
* cannot be trusted. |
|
1945 |
*/ |
|
1946 |
TBool GetAknFepLineExtreme( const TTmDocPosSpec& aPos, TBool aToRight, |
|
1947 |
TTmDocPosSpec& aExtreme) const; |
|
1948 |
||
1949 |
/** |
|
1950 |
* This is a very general routine for finding the visual extreme (according to |
|
1951 |
* Avkon rules) of a piece of selected text. |
|
1952 |
* - Text may in general have many varying directional sections. |
|
1953 |
* - It may extend from one paragraph to another. |
|
1954 |
* - If the paragraph directions are different the current input language is |
|
1955 |
* |
|
1956 |
* @param aSelection Logical range for which the visual extreme is required |
|
1957 |
* @param aEvent The direction being navigated (Right/Left/Up/Down); eg. ELeftNaviEvent if moving to the left end |
|
1958 |
* @param aLimitPos returned position in document |
|
1959 |
* @param aEffectiveRightOrLeftEvent Pointer to TWesternNaviEvent, if passed from the client, will |
|
1960 |
* return either ERightNaviEvent or ELeftNaviEvent |
|
1961 |
*/ |
|
1962 |
void GetAvkonDefinedVisualLimitsOfSelection( |
|
1963 |
const TCursorSelection& aSelection, |
|
1964 |
TWesternNaviEvent aEvent, |
|
1965 |
TTmDocPosSpec& aLimitPos, |
|
1966 |
TWesternNaviEvent* aEffectiveRightOrLeftEvent) const; |
|
1967 |
||
1968 |
/** |
|
1969 |
* Returns the position at the visual left extreme end for a logical range |
|
1970 |
* |
|
1971 |
* @param aStartPos Starting position for the search |
|
1972 |
* @param aMinPos minimum logical position of the logical range |
|
1973 |
* @param aMaxPos maximum logical position of the logical range |
|
1974 |
* @return TTmDocPosSpec for the visual left end |
|
1975 |
*/ |
|
1976 |
TTmDocPosSpec LeftVisualExtremePos( const TTmDocPosSpec& aStartPos, |
|
1977 |
TInt aMinPos, TInt aMaxPos ) const; |
|
1978 |
||
1979 |
/** |
|
1980 |
* Returns the position at the visual right extreme end for a logical range. The range may consist |
|
1981 |
* of many directional chunks. They are iterated through until the visual end is found. |
|
1982 |
* |
|
1983 |
* @param aStartPos Starting position for the search |
|
1984 |
* @param aMinPos minimum logical position of the logical range |
|
1985 |
* @param aMaxPos maximum logical position of the logical range |
|
1986 |
* @return TTmDocPosSpec for the visual right end |
|
1987 |
*/ |
|
1988 |
TTmDocPosSpec RightVisualExtremePos( const TTmDocPosSpec& aStartPos, |
|
1989 |
TInt aMinPos, TInt aMaxPos ) const; |
|
1990 |
||
1991 |
/** |
|
1992 |
* Gets the visual left-most position in a chunk within a logical range |
|
1993 |
*/ |
|
1994 |
TBool LeftEndOfChunkWithinRange( const CTmTextLayout::TTmChunkDescription& aChunk, |
|
1995 |
TInt aMinPos, TInt aMaxPos, TTmDocPosSpec& aNewPos) const; |
|
1996 |
||
1997 |
/** |
|
1998 |
* Gets the visual right-most position in a chunk within a logical range |
|
1999 |
*/ |
|
2000 |
TBool RightEndOfChunkWithinRange( const CTmTextLayout::TTmChunkDescription& aChunk, |
|
2001 |
TInt aMinPos, TInt aMaxPos, TTmDocPosSpec& aNewPos) const; |
|
2002 |
||
2003 |
/** |
|
2004 |
* Adjust the passed docpos to reflect the avkon principal that after a left navigation |
|
2005 |
* the cursor should adhere to the bordering directional run on the left of that point. |
|
2006 |
* This may mean that the logical position and leading/trailing feature of aPos are adjusted |
|
2007 |
* This method does not perform the navigation, but may be called after a navigation. |
|
2008 |
*/ |
|
2009 |
void AdjustPosSpecForAmbiguityAfterLeftOrRightNavigation( TTmDocPosSpec& aPos, |
|
2010 |
TWesternNaviEvent aEvent ) const; |
|
2011 |
||
2012 |
/** |
|
2013 |
* Do not move the visual position, but ensure that the docpos passed is adhering to the left |
|
2014 |
* side of the right chunk passed in. |
|
2015 |
*/ |
|
2016 |
static void AttachToRightChunk( TTmDocPosSpec& aPos, |
|
2017 |
const CTmTextLayout::TTmChunkDescription& aRightChunk ); |
|
2018 |
||
2019 |
/** |
|
2020 |
* Do not move the visual position, but ensure that the docpos passed is adhering to the |
|
2021 |
* right side of the left chunk passed in. |
|
2022 |
*/ |
|
2023 |
static void AttachToLeftChunk( TTmDocPosSpec& aPos, |
|
2024 |
const CTmTextLayout::TTmChunkDescription& aRightChunk ); |
|
2025 |
||
2026 |
/** |
|
2027 |
* Modify the cursor position after a jump to the start or end of a document. |
|
2028 |
* The current input direction is used to modify the position, so as to avoid attaching the |
|
2029 |
* new cursor position to a block of the opposite input directionality |
|
2030 |
* |
|
2031 |
* @param aPos target position of the jump; may be modified by the routine. |
|
2032 |
* @param aEvent navigation event that caused the loop. |
|
2033 |
* @param aLoopToTop ETrue if the looping is from bottom to top; EFalse if from top to bottom |
|
2034 |
* |
|
2035 |
*/ |
|
2036 |
void AdjustPosSpecForInputLanguageAfterDocumentLoop( TTmDocPosSpec& aPos, |
|
2037 |
TWesternNaviEvent aEvent, |
|
2038 |
TBool aLoopToTop ) const; |
|
2039 |
||
2040 |
/** |
|
2041 |
* Tests a chunk for validity. |
|
2042 |
* |
|
2043 |
* @return ETrue if the chunk is valid - is a real chunk. |
|
2044 |
*/ |
|
2045 |
static TBool ChunkIsValid( const CTmTextLayout::TTmChunkDescription& aChunk ); |
|
2046 |
||
2047 |
/** |
|
2048 |
* Finds the current input direction. This is determined as best as it can using |
|
2049 |
* - iT9Interface as the preferred source of information |
|
2050 |
* if that is not active/defined then |
|
2051 |
* - shared data (via AknTextUtils) if that fails |
|
2052 |
* - localLanguage overrides may be in place |
|
2053 |
* |
|
2054 |
* - when fep is in numeric mode it returns LTR |
|
2055 |
* - if FEP is in an irelevant mode, then LTR is returned |
|
2056 |
* |
|
2057 |
* Note that secret alpha modes return LTR always, as entry is alwas LTR for these |
|
2058 |
* |
|
2059 |
* @return TDirectionality::ERightToLeft when in an alpha mode and direction is RTL; |
|
2060 |
* Otherwise returns ELeftToRight |
|
2061 |
*/ |
|
2062 |
TBidiText::TDirectionality CurrentInputDirectionality() const; |
|
2063 |
||
2064 |
/** |
|
2065 |
* Access the local language if defined |
|
2066 |
* |
|
2067 |
* @param aLanguage - returns the Symbian OS language code for the local language |
|
2068 |
* @return EFalse iff no local language is in force |
|
2069 |
*/ |
|
2070 |
TBool GetLocalLanguage( TLanguage& aLanguage ) const; |
|
2071 |
||
2072 |
/** |
|
2073 |
* Looks through the FEP aware editor's text starting at character aPos, looking for a |
|
2074 |
* strongly directional character. Direction of search can be set. |
|
2075 |
* Search is carried out until a strong character is found or the end (or beginning) |
|
2076 |
* of the editor text has been reached. |
|
2077 |
* The value returned in aIsRightToLeft should not be used unless the method returns ETrue |
|
2078 |
* @param aPos First character to look at |
|
2079 |
* @param aForward If EFalse, then search is backward (decreasing index) in logical buffer |
|
2080 |
* @param aIsRightToLeft Set to ETrue on return if first strong character found is RTL |
|
2081 |
* |
|
2082 |
* @return EFalse if no strong character was found. |
|
2083 |
*/ |
|
2084 |
TBool GetExposedDirectionOfText( TInt aPos, TBool aForward, TBool& aIsRightToLeft ) const; |
|
2085 |
||
2086 |
/** |
|
2087 |
* Looks through the passed descriptor, looking for a strongly directional character. |
|
2088 |
* Direction of search can be set. Search starts at the begining if searching forward; |
|
2089 |
* starts at the end if searching backwards. |
|
2090 |
* |
|
2091 |
* Search is carried out until a strong character is found or the end (or beginning) |
|
2092 |
* of the descriptor has been reached. |
|
2093 |
* The value returned in aIsRightToLeft should not be used unless the method returns ETrue |
|
2094 |
* |
|
2095 |
* @param aText Descriptor to search. |
|
2096 |
* @param aForward If EFalse, then search is backward (decreasing index) in logical buffer |
|
2097 |
* @param aIsRightToLeft Set to ETrue on return if first strong character found is RTL |
|
2098 |
* |
|
2099 |
* @return EFalse if no strong character was found. |
|
2100 |
*/ |
|
2101 |
TBool GetExposedDirectionOfTextInDescriptor( const TDesC& aText, TBool aForward, |
|
2102 |
TBool& aIsRightToLeft ) const; |
|
2103 |
||
2104 |
/** |
|
2105 |
* Access character in editor text at index aPos. |
|
2106 |
* |
|
2107 |
* @param aPos Index of character to access. Must be a valid index or panic may ensue. |
|
2108 |
* @return charater at index aPos; returns TChar(0) if cannot get at the text. |
|
2109 |
*/ |
|
2110 |
TChar CharAt( TInt aPos ) const; |
|
2111 |
||
2112 |
/** |
|
2113 |
* Navigate off of selected text using an Up/Down/Right/Left navigation event |
|
2114 |
* |
|
2115 |
* The code takes account of the paragraph directionality that the passed selection is |
|
2116 |
* found in. |
|
2117 |
* |
|
2118 |
* The new cursor position is resolved for ambiguity and then set using SetCursorPosition, and |
|
2119 |
* so it has the same side-effects: |
|
2120 |
* iUncommittedText is set to the zero-width "cursor" state with the new cursor position |
|
2121 |
* iUncommittedText is set into the FepAwareTextEditor state |
|
2122 |
* iCaseManager is updated with a ENullNaviEvent |
|
2123 |
* the doc pos is set in TextView object if present |
|
2124 |
* |
|
2125 |
* @param aSelection currently selected text |
|
2126 |
* @param aNaviEvent navigation event. One of ERight/Left/Down/UpNaviEvent. Others are ignored |
|
2127 |
* @param aPos Ouput, new position of the cursor |
|
2128 |
* @return EKeyWasNotConsumed if the key is not consumed |
|
2129 |
*/ |
|
2130 |
TKeyResponse NavigateFromSelectionL( |
|
2131 |
const TCursorSelection& aSelection, |
|
2132 |
TWesternNaviEvent aNaviEvent, |
|
2133 |
TTmDocPosSpec& aPos ); |
|
2134 |
||
2135 |
||
2136 |
/** |
|
2137 |
* This method is the standard way for the FEP to move the cursor when there is |
|
2138 |
* no inline edit or selection. |
|
2139 |
* Side effects: |
|
2140 |
* iUncommittedText is set to the zero-width "cursor" state with the passed position |
|
2141 |
* iUncommittedText is set into the FepAwareTextEditor state |
|
2142 |
* iCaseManager is updated with a ENullNaviEvent |
|
2143 |
* the doc post is set in TextView object if present |
|
2144 |
* |
|
2145 |
* @param aNewCursorPos - defines the position to set the cursor at, including leading/trailing |
|
2146 |
* @param aDragSelectOn - iff EFalse, do not keep old anchor position (that is, cancel any selection) |
|
2147 |
* properties. |
|
2148 |
*/ |
|
2149 |
void SetCursorPositionL( const TTmDocPosSpec& aNewCursorPos, TBool aDragSelectOn = EFalse ); |
|
2150 |
||
2151 |
/** |
|
2152 |
* Returns ETrue if the passed position is formatted and is in the first line |
|
2153 |
*/ |
|
2154 |
TBool InFirstLineAndFormatted( const TTmDocPosSpec& aPos ) const; |
|
2155 |
||
2156 |
/** |
|
2157 |
* Returns ETrue if the passed position is formatted and is in the last line |
|
2158 |
*/ |
|
2159 |
TBool InLastLineAndFormatted( const TTmDocPosSpec& aPos ) const; |
|
2160 |
||
2161 |
/** |
|
2162 |
* Returns ETrue if the passed position is in the |
|
2163 |
* @param aCheckFirstLine if ETrue, check for first line; else check last line |
|
2164 |
* @return ETrue if the passed position is formatted and is first (or last - depending on switch) |
|
2165 |
*/ |
|
2166 |
TBool DocPosInFirstOrLastLineAndFormatted( const TTmDocPosSpec& aPos, |
|
2167 |
TBool aCheckFirstLine ) const; |
|
2168 |
||
2169 |
/** |
|
2170 |
* Method to determine if the passed position is equivalent visually to the "canonical" |
|
2171 |
* value determined by the limit algorithms. The methods allow two visually equivalent, |
|
2172 |
* but logically different TTmDocPosSpecs to be be checked for equivalence. |
|
2173 |
* @param aCurrentPos Position in document as returned by GetDocPos |
|
2174 |
* @param aLimitPos Visual start of document as returned by GetVisualDocStart |
|
2175 |
* @returns ETrue if the positions are visully equivalent |
|
2176 |
*/ |
|
2177 |
TBool AtVisualStart( const TTmDocPosSpec& aCurrentPos, const TTmDocPosSpec& aLimitPos ) const; |
|
2178 |
||
2179 |
/** |
|
2180 |
* Method to determine if the passed position is equivalent visually to the "canonical" |
|
2181 |
* value determined by the limit algorithms. The methods allow two visually equivalent, |
|
2182 |
* but logically different TTmDocPosSpecs to be be checked for equivalence. |
|
2183 |
* @param aCurrentPos Position in document as returned by GetDocPos |
|
2184 |
* @param aLimitPos The visual end of document as returned by GetVisualDocStart |
|
2185 |
* @returns ETrue if the positions are visully equivalent |
|
2186 |
*/ |
|
2187 |
TBool AtVisualEnd( const TTmDocPosSpec& aCurrentPos, const TTmDocPosSpec& aLimitPos, |
|
2188 |
TInt aDocLength ) const; |
|
2189 |
||
2190 |
void SetCursorType(TBool aIsLeftToRight); |
|
2191 |
TBool DeviceSupportsRTLLanguageL(); |
|
2192 |
||
2193 |
/** |
|
2194 |
* Performs calculations of digit mode; |
|
2195 |
* used in UpdateLocalDigitMode() and in UpdateNumericEditorDigitType() |
|
2196 |
*/ |
|
2197 |
void CalculateEditorDigitType(TDigitType& aDestination); |
|
2198 |
||
2199 |
void UpdateNumericEditorDigitType(); |
|
2200 |
||
2201 |
/** |
|
2202 |
* Updates FEP digit mode from global locale settings. |
|
2203 |
*/ |
|
2204 |
void UpdateLocalDigitMode(); |
|
2205 |
||
2206 |
/** |
|
2207 |
* Checks to see if the cursor position is at an ambiguous point (one where the text blocks |
|
2208 |
* on either side are of different directionality) and potentially moves the cursor from |
|
2209 |
* one block to the other, depending on the key identity. |
|
2210 |
* |
|
2211 |
* To be called before key event is processed by the FEP in the usual way. |
|
2212 |
* If the key is acted upon to move the cursor, then the event is "eaten" and it is not |
|
2213 |
* to be passed on for processing. |
|
2214 |
* |
|
2215 |
* @param aCode Key code from standard TKeyEvent key event structure |
|
2216 |
* @return EKeyWasConsumed if a cursor adjustement was made; |
|
2217 |
* else EKeyWasNotConsumed |
|
2218 |
*/ |
|
2219 |
// TKeyResponse AttemptCursorFlipAtAmbiguousPointL( const TKeyEvent& aKeyEvent, TEventCode aEventCode ); |
|
2220 |
TKeyResponse AttemptCursorFlipAtAmbiguousPointL( const TUint aCode ); |
|
2221 |
||
2222 |
/** |
|
2223 |
* Call back method for the "Post Event Check" mechanism. Called from a CIdle after |
|
2224 |
* any event that might required a check of the new cursor position or other invariant |
|
2225 |
*/ |
|
2226 |
static TInt PostEventCheckCallback(TAny* aObj); |
|
2227 |
||
2228 |
/** |
|
2229 |
* Access method for whether bidirectional cursor is to be used |
|
2230 |
* |
|
2231 |
* @return EFalse iff the bidi cursor is not to be used |
|
2232 |
*/ |
|
2233 |
TBool BidiCursorRequired() const; |
|
2234 |
||
2235 |
/** |
|
2236 |
* Since FEP does not complete the navigation of an event (editor and form do that), FEP |
|
2237 |
* has to ensure after all navigation is finished if the cursor is displayed correctly. |
|
2238 |
* |
|
2239 |
* <p> This method, called from the post event callback, implements the action to check the |
|
2240 |
* current cursor directionality against the text directionality at the cursor position, |
|
2241 |
* and alters the cursor appearance as required. |
|
2242 |
*/ |
|
2243 |
void DoCursorDirectionCheckL(); |
|
2244 |
||
2245 |
/** |
|
2246 |
* Check the directionality of text in the vicinity of the current document position |
|
2247 |
* and ensure that the cursor is indicated appropriately. |
|
2248 |
* |
|
2249 |
* This routine has no side-effect on the cursor position. It merely changes the |
|
2250 |
* appearance of the cursor. |
|
2251 |
*/ |
|
2252 |
void AdjustCursorTypeForCurrentPosition(); |
|
2253 |
||
2254 |
/** |
|
2255 |
* Kicks off the post event check idle event |
|
2256 |
* |
|
2257 |
* @param aCode Key event code |
|
2258 |
*/ |
|
2259 |
void SchedulePostEventCheckL(TUint aCode); |
|
2260 |
||
2261 |
/** |
|
2262 |
* Check the directionality of text in the vicinity of the supplied document position |
|
2263 |
* and ensure that the cursor is indicated appropriately. |
|
2264 |
* |
|
2265 |
* This routine has no side-effect on the cursor position. It merely changes the |
|
2266 |
* appearance of the cursor. |
|
2267 |
* |
|
2268 |
* @param aDocPos document position that is to be analysed and acted on |
|
2269 |
*/ |
|
2270 |
void AdjustCursorTypeForPosition( const TTmDocPosSpec& aDocPos ); |
|
2271 |
||
2272 |
/** |
|
2273 |
* "Hook" method for managing a bidi cursor according to the text directionality at the cursor |
|
2274 |
* Only one of this method or SetCursorTypeForInputDirection will be in operation at any |
|
2275 |
* time. |
|
2276 |
* |
|
2277 |
* @param aLeftToRight Supply ETrue iff cursor required is LTR cursor |
|
2278 |
*/ |
|
2279 |
void SetCursorTypeForTextDirection( TBool aLeftToRight ); |
|
2280 |
||
2281 |
/** |
|
2282 |
* "Hook" method for managing a bidi cursor according to the current input direction |
|
2283 |
* Only one of this method or SetCursorTypeForTextDirection will be in operation at any |
|
2284 |
* time. |
|
2285 |
* |
|
2286 |
* @param aLeftToRight Supply ETrue iff cursor required is LTR cursor |
|
2287 |
*/ |
|
2288 |
void SetCursorTypeForInputDirection( TBool aLeftToRight ); |
|
2289 |
||
2290 |
/** |
|
2291 |
* Routine to analyse the directionalities surrounding the supplied document position |
|
2292 |
* and to return the results. |
|
2293 |
* |
|
2294 |
* @param aDocPos document position that is to be analysed |
|
2295 |
* @return Structure containing the results of the analysis |
|
2296 |
*/ |
|
2297 |
TTextDirectionalInfo LocalTextDirectionalStatus( const TTmDocPosSpec& aDocPos ) const; |
|
2298 |
||
2299 |
||
2300 |
/** |
|
2301 |
* |
|
2302 |
* This method is used to add directional markers to protect neutrals that may be |
|
2303 |
* exposed to the opposite directional formatting to their situation before the deletion |
|
2304 |
* |
|
2305 |
* Redecoration is carried out if a neutral is exposed by the deletion to a directionality |
|
2306 |
* different to that which is was already marked. |
|
2307 |
* |
|
2308 |
* An inline edit may be stated and then committed. |
|
2309 |
* |
|
2310 |
* iUncommittedText is required to be set to the cursor position that existed after |
|
2311 |
* the deletion. |
|
2312 |
* |
|
2313 |
* iUncommittedText will be updated to the new cursor position. |
|
2314 |
* |
|
2315 |
* @param aTextThatWasDeleted Informs the method of what text has just been removed |
|
2316 |
*/ |
|
2317 |
void RedecorateAfterDeletionL( const TDesC& aTextThatWasDeleted ); |
|
2318 |
||
2319 |
||
2320 |
TBool EditorSupportsNeutralProtection(); |
|
2321 |
||
2322 |
||
2323 |
/** |
|
2324 |
* Wrapper function for the MCoeFepAwareTextEditor commit method. |
|
2325 |
* This method terminates the inline by accepting the current inline edit into the buffer. |
|
2326 |
* |
|
2327 |
* At entry, iUncommittedText is required to have the span of the current inline edit. |
|
2328 |
* iAnchorPos should be the index of the first character in the inline edit. |
|
2329 |
* iCursorPos should be the index of the next character after the inline edit. |
|
2330 |
* |
|
2331 |
* At exit, iUncommittedText has 0-length and represents the current cursor position. |
|
2332 |
* That is, iAnchorPos = iCursorPos = index of the character next after the cursor |
|
2333 |
* |
|
2334 |
* These indices may be more easily though of as "gap indices" where gap 0 precedes |
|
2335 |
* character 0, gap 1 follows character 0, gap 2 follows charcacter 1, etc.. until gap |
|
2336 |
* N follows character (N-1). |
|
2337 |
* |
|
2338 |
* This routine does not attempt to consolidate any directional markers that may be |
|
2339 |
* extraneous in the new buffer. It is therefore used when it is important to know what |
|
2340 |
* span after the commit, e.g. to make it reversible. |
|
2341 |
* |
|
2342 |
* @param aFepAwareTextEditor Editor for which there is a current inline edit. |
|
2343 |
* @param aCursorVisibility EFalse if the cursor is to be suppressed during the commit. |
|
2344 |
*/ |
|
2345 |
void CommitInlineEditWithoutResolutionL(MCoeFepAwareTextEditor& aFepAwareTextEditor, |
|
2346 |
TBool aCursorVisibility, TBool aClearPti = ETrue); |
|
2347 |
||
2348 |
||
2349 |
TKeyResponse HandlePredictiveNaviEventOutsideInlineEditL(TUint aCode, TKeyPressLength aLength); |
|
2350 |
||
2351 |
static TInt DoSimulateKey(TAny* aThisPtr); |
|
2352 |
||
2353 |
/** |
|
2354 |
* This method is that the label of CBA is updated by aTextResId. |
|
2355 |
* @param aPosition CBA position, either ELeftSoftkeyIndex or ERightSoftkeyIndex |
|
2356 |
* @param aCommandId command id for softkey |
|
2357 |
* @param aTextResId resource id to set string on label. |
|
2358 |
* @return TBool The return value is ETrue in case it is necessary to update CBA. |
|
2359 |
*/ |
|
2360 |
TBool UpdateCBALabelL(TInt aPosition, TInt aCommandId, TInt aTextResId); |
|
2361 |
||
2362 |
/** |
|
2363 |
* Launches special character table (SCT) and pictograph character table (PCT). |
|
2364 |
* |
|
2365 |
* @param aResourceId Resource of SCT content. NULL if the default SCT content |
|
2366 |
* is used. At the moment only Thai language sets non-default |
|
2367 |
* content. |
|
2368 |
* @param aShowSctParam Set the show mode for sct. EShowSctFirst or EShowPctFirst or EShowSmileyFirst |
|
2369 |
*/ |
|
2370 |
void DoLaunchSctAndPctL(TInt aResourceId, TShowSctMode aShowSctMode); |
|
2371 |
||
2372 |
/** |
|
2373 |
* Update CangJie mode |
|
2374 |
* |
|
2375 |
* @param aNewMode New CangJie mode |
|
2376 |
* @since 3.0 |
|
2377 |
*/ |
|
2378 |
void UpdateCangJieState(TInt aNewMode); |
|
2379 |
||
2380 |
/** |
|
2381 |
* Launch CangJie setting dialog |
|
2382 |
* |
|
2383 |
* @since 3.0 |
|
2384 |
* @return Selected CangJie level or KErrGeneral if user cancel the selection |
|
2385 |
*/ |
|
2386 |
TInt LaunchCangJieOptionDlgL(); |
|
2387 |
||
2388 |
||
2389 |
void AddEditSubmenuL(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
2390 |
void DisableEditSubmenuItems(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
2391 |
void StartCcpuModeL(TBool aCopyMode); |
|
2392 |
||
2393 |
/** |
|
2394 |
* Handle the Chr Key Monitor |
|
2395 |
* for Japanese variant only. |
|
2396 |
* |
|
2397 |
* @since 3.0 |
|
2398 |
*/ |
|
2399 |
void HandleChrKeyMonitorL(); |
|
2400 |
||
2401 |
TBool IsCursorAtEndOfWord(); |
|
2402 |
||
2403 |
/* This method should be called after launching any dialog by FEP */ |
|
2404 |
void PrepareFepAfterDialogExitL(TUid aFepUid); |
|
2405 |
/* This method should be called before launching any fep aware dialog by FEP */ |
|
2406 |
void PrepareFepForFepAwareDialogLaunch(); |
|
2407 |
/* This method should be called after launching any fep aware dialog by FEP */ |
|
2408 |
void PrepareFepAfterFepAwareDialogExitL(TUid aFepUid); |
|
2409 |
||
2410 |
public: |
|
2411 |
||
2412 |
/** |
|
2413 |
* Handle layout change. |
|
2414 |
* When screen layout change, Key Catcher calls this method |
|
2415 |
* |
|
2416 |
*/ |
|
2417 |
void HandleResourceChange(TInt aType); |
|
2418 |
||
2419 |
TBool IsHybridAplhaEditor() const; |
|
2420 |
TBool IsHybridAlphaModeChangedtoAplhanumeric() const; |
|
2421 |
||
2422 |
TBool QueryPredictiveState(const TAknEditingState aState); |
|
2423 |
TInt EvaluateState(TAknEditingState aState); |
|
2424 |
TBool QueryPredictiveAutoCompleteState(TAknEditingState aState); |
|
2425 |
CAknExtendedInputCapabilities::TEditorType EditorType() const; |
|
2426 |
TUint MIDPConstraint() const; |
|
2427 |
/** |
|
2428 |
* Tells if the current editor is phone number editor |
|
2429 |
* @return ETrue if the current editor is phone number editor |
|
2430 |
*/ |
|
2431 |
TBool IsPhoneNumberEditor() const; |
|
2432 |
||
2433 |
||
2434 |
#ifdef RD_SCALABLE_UI_V2 |
|
2435 |
||
2436 |
/** |
|
2437 |
* Pen input support functions |
|
2438 |
*/ |
|
2439 |
public: |
|
2440 |
||
2441 |
void HandlePointerEventL(const TPointerEvent &aPointerEvent); |
|
2442 |
||
2443 |
||
2444 |
/** |
|
2445 |
* Handle arrow key event when some chars have been selected |
|
2446 |
* |
|
2447 |
* @since S60 v3.2 |
|
2448 |
* @param aKeyEvent |
|
2449 |
* @param aEventCode |
|
2450 |
* @param aRetCode |
|
2451 |
*/ |
|
2452 |
TBool HandleSelModeArrowKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode, |
|
2453 |
TKeyResponse& aRetCode); |
|
2454 |
||
2455 |
/** |
|
2456 |
* From CAknExtendedInputCapabilities::MAknEventObserver |
|
2457 |
* Handle an event |
|
2458 |
* |
|
2459 |
* @since S60 v3.2 |
|
2460 |
* @param aEvent An event, see TInputCapabilitiesEvent |
|
2461 |
* @param aParams Event dependent parameters |
|
2462 |
*/ |
|
2463 |
void HandleInputCapabilitiesEventL( TInt aEvent, TAny* aParams ); |
|
2464 |
||
2465 |
void SubmitInlineTextL( const TDesC& aData ); |
|
2466 |
||
2467 |
inline TInt PermittedModes() const; |
|
2468 |
||
2469 |
inline void SetNotifyPlugin( TBool aNotifyFlag ); |
|
2470 |
||
2471 |
inline void RemeberEditorState(); |
|
2472 |
||
2473 |
inline TBool IsMfneEditor() const; |
|
2474 |
||
2475 |
inline TBool IsFindPaneEditor() const; |
|
2476 |
inline TBool IsSupportedAdaptiveSearch() const; |
|
2477 |
//for japanese |
|
2478 |
void NotifyJapaneseSetting(); |
|
2479 |
||
2480 |
||
2481 |
void ProcessEditorMenuCommand(TInt aCommand); |
|
2482 |
||
2483 |
TInt GetPermittedEditorMenu(TBool aOnlyCount = EFalse); |
|
2484 |
||
2485 |
void UpdateTouchCaseMode(); |
|
2486 |
||
2487 |
void DimInputmodeTouchMenuItems(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
2488 |
||
2489 |
inline TLanguageCapabilities InputLanguageCapabilities() const; |
|
2490 |
||
2491 |
inline TAknFepManagerState& FepManState(); |
|
2492 |
||
2493 |
inline TBool IsSupportNativeNumber() const; |
|
2494 |
||
2495 |
void NeedDisableKeySound(const TKeyEvent& aKeyEvent, TEventCode aEventCode); |
|
2496 |
||
2497 |
inline void SetGainForeground( TBool aGainForeground ); |
|
2498 |
void HandleEndKeyL(); |
|
2499 |
inline void SetCancelPopupInQwerty( TBool aCancelPopupInQwerty ); |
|
2500 |
||
2501 |
/** |
|
2502 |
* Return the chinese input mode used last time |
|
2503 |
*/ |
|
2504 |
inline TInt LastChineseInputMode() const; |
|
2505 |
||
2506 |
/** |
|
2507 |
* Return active input language, only used for languages popup list |
|
2508 |
*/ |
|
2509 |
inline TInt ActiveInputLanguage() const; |
|
2510 |
||
2511 |
/** |
|
2512 |
* Set active input language, only used for languages popup list |
|
2513 |
*/ |
|
2514 |
inline void SetActiveInputLanguage(TInt aInputLanguage); |
|
2515 |
||
2516 |
private: |
|
2517 |
||
2518 |
/** |
|
2519 |
* Checks if the current editor is fully FEP aware. |
|
2520 |
* |
|
2521 |
* @since 3.2 |
|
2522 |
* |
|
2523 |
* @return ETrue if editor if fully FEP aware. |
|
2524 |
*/ |
|
2525 |
TBool FullyFepAwareTextEditor() const; |
|
2526 |
||
2527 |
/** |
|
2528 |
* Checks if the current editor is partially FEP aware. |
|
2529 |
* |
|
2530 |
* @since 3.2 |
|
2531 |
* |
|
2532 |
* @param aAtLeast if ETrue then ETrue is returned for also fully FEP aware editors. |
|
2533 |
* |
|
2534 |
* @return ETrue if editor is partially FEP aware. |
|
2535 |
*/ |
|
2536 |
TBool SemiFepAwareTextEditor( TBool aAtLeast = EFalse ) const; |
|
2537 |
||
2538 |
void DoWesternTouchMenu(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
2539 |
void DoChineseTouchMenu(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
2540 |
||
2541 |
/** |
|
2542 |
* Checks if the current input mode belongs to chinese input modes. |
|
2543 |
* |
|
2544 |
* @param aMode The current input mode. |
|
2545 |
* |
|
2546 |
* @return ETrue if the current input mode belongs to chinese input mode.. |
|
2547 |
*/ |
|
2548 |
TBool IsChineseInputMode( TInt aMode ); |
|
2549 |
||
2550 |
#endif //RD_SCALABLE_UI_V2 |
|
2551 |
||
2552 |
/** |
|
2553 |
* Returns the type of the focused editor. |
|
2554 |
* |
|
2555 |
* @since 3.2 |
|
2556 |
* |
|
2557 |
* @return Editor type. |
|
2558 |
*/ |
|
2559 |
//CAknExtendedInputCapabilities::TEditorType EditorType() const; |
|
2560 |
||
2561 |
/** |
|
2562 |
* Get the MAknFepDocumentNavigation object |
|
2563 |
* |
|
2564 |
* @since 3.2 |
|
2565 |
* @return pointer to MAknFepDocumentNavigation accessed through |
|
2566 |
* the input capabilites object provider. |
|
2567 |
*/ |
|
2568 |
MAknFepDocumentNavigation* AknFepDocumentNavigation() const; |
|
2569 |
||
2570 |
TInt GetPermittedEditorMenuL(TBool aOnlyCount = EFalse); |
|
2571 |
||
2572 |
private:// from MPeninputServerEventHandler |
|
2573 |
||
2574 |
void UpdateLatinIndicator( TAknEditingState& aNewState ); |
|
2575 |
void UpdateNumberIndicator( TAknEditingState& aNewState ); |
|
2576 |
void UpdateHindiIndicator( TAknEditingState& aNewState ); |
|
2577 |
void HandleCopyCutStateL(); |
|
2578 |
/** |
|
2579 |
* Returns ETrue if hash key selection is on and hash key mode selection should |
|
2580 |
* be blocked. |
|
2581 |
* |
|
2582 |
* @since 3.1 |
|
2583 |
*/ |
|
2584 |
TBool HashKeyModeChangeBlockedInSearchField() const; |
|
2585 |
/** |
|
2586 |
* Set editor cursor selection according plugin UI |
|
2587 |
* cursor state |
|
2588 |
* |
|
2589 |
* @since 3.2 |
|
2590 |
* @param aCurSel Cursor position. |
|
2591 |
* @param aSyncCursor ETrue if plug in UI need update cursor, EFalse otherwise |
|
2592 |
* @return None |
|
2593 |
*/ |
|
2594 |
void SetCursorSelectionL(const TCursorSelection& aCurSel, TBool aSyncCursor); |
|
2595 |
||
2596 |
/** |
|
2597 |
* An internal helper method for matches popup list. |
|
2598 |
* |
|
2599 |
* The index of currently selected prediction candidate. |
|
2600 |
* |
|
2601 |
* @since S60 3.2 |
|
2602 |
*/ |
|
2603 |
TInt ResolveCurrentCandidateListIndex(CDesCArrayFlat* aCandList); |
|
2604 |
||
2605 |
/** |
|
2606 |
* Removes underlining from predictive word and moves cursor the end of the word. |
|
2607 |
* |
|
2608 |
* @since 3.2 |
|
2609 |
* @param aData Key data |
|
2610 |
* @return None |
|
2611 |
*/ |
|
2612 |
void DeactivatePredicitveWordAndMoveCursorL(); |
|
2613 |
||
2614 |
/** |
|
2615 |
* Returns the Ccpu status of given editor state as a flag combination. |
|
2616 |
* |
|
2617 |
* @since 3.2 |
|
2618 |
* @param aEdwinState |
|
2619 |
* @return editor ccpu status |
|
2620 |
*/ |
|
2621 |
TInt EditorCcpuStatus(CAknEdwinState* aEdwinState); |
|
2622 |
||
2623 |
/** |
|
2624 |
* Cancels editing options copy / paste mode initialted from editing options -submenu. |
|
2625 |
* |
|
2626 |
* @since 3.2 |
|
2627 |
*/ |
|
2628 |
void CancelCcpuMode(); |
|
2629 |
||
2630 |
#ifdef RD_SCALABLE_UI_V2 |
|
2631 |
/** |
|
2632 |
* Launches stylus Ccpu-menu |
|
2633 |
* |
|
2634 |
* @since 5.0 |
|
2635 |
* @param aClickPoint Point where stylus was clicked. |
|
2636 |
*/ |
|
2637 |
void LaunchStylusCcpuMenuL(TPoint &aClickPoint); |
|
2638 |
||
2639 |
void DynInitTouchMenuPaneL(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
2640 |
#endif |
|
2641 |
||
2642 |
/** |
|
2643 |
* Has Japanese prediction input mode in PtiEngine |
|
2644 |
*/ |
|
2645 |
TBool HasJapanesePredictionInputMode() const; |
|
2646 |
||
2647 |
||
2648 |
void InitPreviewMenuPane(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
2649 |
||
2650 |
public: |
|
2651 |
void StopDisplayingMenuBar(); |
|
2652 |
||
2653 |
private: |
|
2654 |
void ConvertCharToKey(TChar aIn, TUint16& aKey) const; |
|
2655 |
||
2656 |
/** |
|
2657 |
* Update editor state' flag |
|
2658 |
* @since Symbian^3 |
|
2659 |
* @param aFlag editor state flag |
|
2660 |
* @param aAdd adding or removing |
|
2661 |
*/ |
|
2662 |
void UpdateEditorStateFlags( TInt aFlag, TBool aAdd = ETrue ) const; |
|
2663 |
||
2664 |
private: |
|
2665 |
// Data owned by this class |
|
2666 |
CAknFepKeyCatcherInterface* iKeyCatcher; |
|
2667 |
CAknFepIndicator* iIndicator; |
|
2668 |
CPeriodic* iShiftKeypressMonitor; |
|
2669 |
CAknFepLanguageManager* iLangMan; // own |
|
2670 |
MAknFepManagerInterface* iCurrentFepUI; // not own |
|
2671 |
CAknFepCaseManager* iCaseMan; |
|
2672 |
CAknFepInlineTextDecorator* iInlineTextDecorator; |
|
2673 |
||
2674 |
CAknFepHashKeyManager* iHashKeyMan; |
|
2675 |
CPeriodic* iConcatenationTimer; |
|
2676 |
//fep delay the resource changed message for getting the updated coordinate from editor. |
|
2677 |
CAsyncCallBack iAsyncResouceChanged; |
|
2678 |
||
2679 |
// shared data support |
|
2680 |
CAknFepSharedDataInterface* iSharedDataInterface; |
|
2681 |
||
2682 |
MAknEditingStateIndicator* iPreviousIndicator; |
|
2683 |
MAknEditingStateIndicator* iEditIndicatorAtLastUpdate; |
|
2684 |
TAknEditingState iPreviousEditingState; |
|
2685 |
||
2686 |
TLanguage iUiLanguage; // Symbian language code for UI language. |
|
2687 |
TLanguageCapabilities iLanguageCapabilities; // Input language and capabilities of the language. |
|
2688 |
TUint iFlags; |
|
2689 |
TUint iExtendedFlags; |
|
2690 |
TAknFepManagerState iFepManState; |
|
2691 |
TCoeInputCapabilities iInputCapabilities; |
|
2692 |
TInt iPermittedInputModes; |
|
2693 |
TInt iMode; |
|
2694 |
TInt iModeBefore; |
|
2695 |
TInt iCaseBefore; |
|
2696 |
TInt iResId; |
|
2697 |
TInt iVariantPermittedModes; |
|
2698 |
TInt iSpaceCharacterCode; // adding for japanese |
|
2699 |
TInt iFullWidthSpaceCharacterCode; // adding for japanese |
|
2700 |
TAknEditorNumericKeymap iAknEditorNumericKeymap; |
|
2701 |
TInt iAknEditorFlags; |
|
2702 |
TCursorSelection iUncommittedText; |
|
2703 |
RArray<TInt> iHashKeyLoop; |
|
2704 |
TBool iWesternPredictive; |
|
2705 |
TKeyPressLength iKeyRepeat; |
|
2706 |
TBool iIsAutoCompleteOn; // for Auto Word Completion |
|
2707 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
2708 |
TInt iKeyBackSpaceHit; |
|
2709 |
TInt iTypingCorrectionLevel; // for typing correction level |
|
2710 |
TBool iIsNumberCandidateShown; // for number candidates |
|
2711 |
TBool iPrimaryCandidate; // for primary candidate |
|
2712 |
TBool iKeyPressedDuringShift; |
|
2713 |
TPtiKeyboardType iKeyboardType; // for checking the keyboard layout |
|
2714 |
TBool iSupressCursorMoveToEndChrKeyPressed; // For supressing cursor movement when SCT launched |
|
2715 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
2716 |
TBool iJapanesePredictive; |
|
2717 |
TBool iDeviceSupportsRtlLanguage; // Could be removed |
|
2718 |
CIdle* iPostEventCheck; // Owned |
|
2719 |
||
2720 |
TWidthChar iCharWidth; // adding for japanese |
|
2721 |
CPtiEngine* iPtiEngine; // adding for japanese |
|
2722 |
||
2723 |
TUint iSimulateKey; |
|
2724 |
CApaDocument* iEmbedded; // User Dictionary |
|
2725 |
CAknNullService* iNullService; // User Dictionary |
|
2726 |
CAsyncCallBack iAsyncOwnSimulateKey; |
|
2727 |
TInt iFreeSpaceOfEditor; |
|
2728 |
TBool iQwertyInputMode; // Not used. The value is always EFalse. |
|
2729 |
TBool iLongThai0Key; |
|
2730 |
TBool iFepFullyConstructed; |
|
2731 |
CAknEdwinState* iRememberEditorState; // For "editing options" submenu |
|
2732 |
TInt iRememberLength; // For "editing options" submenu. |
|
2733 |
TInt iEditorCcpuStatus; // For "editing options" submenu. |
|
2734 |
TInt iCcpuMode; // For "editing options" submenu |
|
2735 |
TInt iMultiTapTimer; // for Japanese only: store MultiTap Timer |
|
2736 |
CAknFepUiInterfaceMenuBar* iEditMenuBar; // Remember menu bar instance for closing. |
|
2737 |
HBufC* iSctEditChars; // Buffer for characters selected in the edit menu |
|
2738 |
TPtr iEditCharsPtr; // Pointer to the buffer that holds all the selected characters. |
|
2739 |
TInt iStarScan; // Remember scan code for star key. |
|
2740 |
TInt iJapaneseQwertyFlags; // for Japanese only: store Japanese Qwerty Flags |
|
2741 |
||
2742 |
CPeriodic* iChrKeypressMonitor; // for Japanese only: Chr key monitor timer |
|
2743 |
TBool iLastKeyPressedWasHashKey; |
|
2744 |
TBool iStopProcessFocus; |
|
2745 |
TBool iClosePeninputUi; |
|
2746 |
/** |
|
2747 |
* User DB dialog |
|
2748 |
* Own, but doesn't need delete by myself |
|
2749 |
*/ |
|
2750 |
CAknFepUserdbDlg* iUserdbdlg; |
|
2751 |
||
2752 |
CAknNavigationDecorator* iTapGroup; |
|
2753 |
||
2754 |
TInt iEditorCommandList[30]; |
|
2755 |
||
2756 |
TBool iComposChrFlag; |
|
2757 |
//User db view(phrase creation) |
|
2758 |
TInt iIsUserdbdlgActive; |
|
2759 |
/** |
|
2760 |
* * Used for handle key event for zhuyin method.(phrase creation) |
|
2761 |
* |
|
2762 |
*/ |
|
2763 |
CZhuyinKeyHandler* iZhuyinKeyHandler; |
|
2764 |
CAknFepZhuyinAnalyser* iZhuyinAnalyser; |
|
2765 |
CZhuyinAnalyserDbFeed* iZhuyinAnalyserDb; |
|
2766 |
||
2767 |
#ifdef RD_SCALABLE_UI_V2 |
|
2768 |
||
2769 |
/** |
|
2770 |
* Used by itut spell mode, initial text in spell mode |
|
2771 |
*/ |
|
2772 |
HBufC* iSpellInitText; |
|
2773 |
||
2774 |
/** |
|
2775 |
* Used by itut spell mode, initial text selection in spell mode, |
|
2776 |
* whose position is relative to whole text in original editor |
|
2777 |
*/ |
|
2778 |
TCursorSelection iSpellInitCurSel; |
|
2779 |
||
2780 |
CAknFepPluginManager* iFepPluginManager; |
|
2781 |
||
2782 |
/** |
|
2783 |
* HKB predictive state before starting plugin IME |
|
2784 |
*/ |
|
2785 |
TBool iT9UsedBeforePluginInput; |
|
2786 |
||
2787 |
||
2788 |
/** |
|
2789 |
* Stylus ccpu menu |
|
2790 |
*/ |
|
2791 |
CAknFepUiInterfaceStylusPopUpMenu* iStylusCcpuMenu; |
|
2792 |
||
2793 |
/** |
|
2794 |
* Last known clik point, needed for stylus ccpu menu launch. |
|
2795 |
*/ |
|
2796 |
TPoint iClickPoint; |
|
2797 |
||
2798 |
TBool iGainForeground; |
|
2799 |
||
2800 |
TBool iLoseForeAndGainFocus; |
|
2801 |
||
2802 |
TBool iNotifyPlugin; |
|
2803 |
||
2804 |
TBool iCancelPopupInQwerty; |
|
2805 |
||
2806 |
TBool iStarKeyPressed; |
|
2807 |
||
2808 |
TInt iLastChineseInputMode; |
|
2809 |
||
2810 |
// Indicate Stroke is used in QWERTY, when default input mode is Cangjie |
|
2811 |
TBool iStrokeUsedInQWERTY; |
|
2812 |
// Save that which editor use stroke |
|
2813 |
CAknEdwinState* iEditorStateStrokeUsed; |
|
2814 |
||
2815 |
#endif //RD_SCALABLE_UI_V2 |
|
2816 |
||
2817 |
/** |
|
2818 |
* Long press clear key after close UI; |
|
2819 |
*/ |
|
2820 |
TBool iLongClearAfterCloseUI; |
|
2821 |
||
2822 |
TBool iFeatureSupportedJapanese; // Save the value of KFeatureIdJapanese |
|
2823 |
||
2824 |
// stores a reference to previous editor state for pointer comparision |
|
2825 |
CAknEdwinState* iPreviousEditorState; |
|
2826 |
||
2827 |
CAknFepUIInterface* iUiInterface; |
|
2828 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
2829 |
CAknFepFnKeyManager *iFnKeyManager; // Owned |
|
2830 |
TBool iIsFnKeyMapped; |
|
2831 |
#ifdef __REVERSE_FN_KEY_SUPPORTED |
|
2832 |
TBool iIsReverseFnkeyInput; |
|
2833 |
#endif //__REVERSE_FN_KEY_SUPPORTED |
|
2834 |
||
2835 |
// Predictive QWERTY (XT9) changes ----> |
|
2836 |
//! The exact word tooptip shown above the inline editor when the exact word differs from the best guess candidate |
|
2837 |
// CAknPreviewPopUpController* iExactWordPopup; |
|
2838 |
||
2839 |
//! The contents of the exact word popup. |
|
2840 |
MAknFepUiWordPopupContent* iExactWordPopupContent; |
|
2841 |
MAknFepCandidatePopup* iCandidatePopup; |
|
2842 |
TBool iSListLaunchedFromMenu; |
|
2843 |
TInt iAutoCmptnTailLength; |
|
2844 |
TInt iIsLastResourceEditMenu; |
|
2845 |
// Predictive QWERTY (XT9) changes <---- |
|
2846 |
#ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
2847 |
CAknFepUiInterfaceMenuBar* iOptionsMenuBar; |
|
2848 |
#endif |
|
2849 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
2850 |
//phrase creation |
|
2851 |
TInt iPhraseCreation; |
|
2852 |
TInt iPinyinPhraseCreation; |
|
2853 |
TInt iKeyStar; |
|
2854 |
TInt iEntryPhrase; |
|
2855 |
TBool iPenSupportMenu; |
|
2856 |
TFepSymbolOfHardwareOne iSymbolData; |
|
2857 |
||
2858 |
/** |
|
2859 |
* Flag for wether input mode is changed by shift+space |
|
2860 |
*/ |
|
2861 |
TBool iShiftAndSpace; |
|
2862 |
CAknFepThaiSCTSelector* iAknFepThaiSCTSelector; |
|
2863 |
||
2864 |
/** |
|
2865 |
* Active input language, only used for languages pop up list, |
|
2866 |
* can not changed in other cases, e.g. in latin-only editor |
|
2867 |
*/ |
|
2868 |
TInt iActiveInputLanguage; |
|
2869 |
||
2870 |
/** |
|
2871 |
* indicate whether matches popup list was lauched, |
|
2872 |
* when rotating the screen, we need to consider it, e.g V-ITUT to FSQ |
|
2873 |
*/ |
|
2874 |
TBool iMatchesListLaunched; |
|
2875 |
||
2876 |
/** |
|
2877 |
* monitor the long press event from Fn key |
|
2878 |
* when long press event occurs, Fn key will be set to Lock state |
|
2879 |
*/ |
|
2880 |
CPeriodic* iFnKeypressMonitor; |
|
2881 |
||
2882 |
public: |
|
2883 |
||
2884 |
//the follow 8 functions for phrase creation |
|
2885 |
/** |
|
2886 |
* Set the state to pinyin phrase creation |
|
2887 |
*/ |
|
2888 |
void PinyinPhraseCreation( TBool aPinyinPhraseCreation ); |
|
2889 |
||
2890 |
/** |
|
2891 |
* Is the state is in pinyin phrase creation |
|
2892 |
* |
|
2893 |
* @return if not enabled, return EFalse |
|
2894 |
*/ |
|
2895 |
TBool IsPinyinPhraseCreation() const; |
|
2896 |
||
2897 |
/** |
|
2898 |
* Set the state to phrase creation |
|
2899 |
*/ |
|
2900 |
void PhraseCreation( TBool aPhraseCreation ); |
|
2901 |
||
2902 |
/** |
|
2903 |
* Is the state is in phrase creation |
|
2904 |
* |
|
2905 |
* @return if not enabled, return EFalse |
|
2906 |
*/ |
|
2907 |
TBool IsPhraseCreation() const; |
|
2908 |
||
2909 |
/** |
|
2910 |
* Set the state to input phrase |
|
2911 |
*/ |
|
2912 |
void EntryPhrase( TBool aEntryPhrase ); |
|
2913 |
||
2914 |
/** |
|
2915 |
* Is the state is in input phrase |
|
2916 |
* |
|
2917 |
* @return if not enabled, return EFalse |
|
2918 |
*/ |
|
2919 |
TBool IsEntryPhrase() const; |
|
2920 |
||
2921 |
/** |
|
2922 |
* Set the state to enable star key |
|
2923 |
*/ |
|
2924 |
void EnableKeyStar( TBool aEnable ); |
|
2925 |
||
2926 |
/** |
|
2927 |
* Is the state is enable star key |
|
2928 |
* |
|
2929 |
* @return if not enabled, return EFalse |
|
2930 |
*/ |
|
2931 |
TBool IsEnableKeyStar() const; |
|
2932 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
2933 |
public: |
|
2934 |
/** |
|
2935 |
* multitaps thru the chars in the SCT. |
|
2936 |
* @param aCallback, the callback when the timer expires |
|
2937 |
*/ |
|
2938 |
void MultitapThroughSCTCharL(TCallBack aCallBack); |
|
2939 |
/** |
|
2940 |
* Notify mfne editor to toggle AM or PM for 12-hour time |
|
2941 |
*/ |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
50
diff
changeset
|
2942 |
void ChangeMfneAmPm(); |
44 | 2943 |
private: |
2944 |
TBool NumericResourceMultiTapTimerTimeoutL(); |
|
2945 |
||
2946 |
/** |
|
2947 |
* CAknFepManager::FindAndRemoveInputOptionsMenuItemL |
|
2948 |
* Helper method to check if the "Input options" menu item exists and |
|
2949 |
* if so, remove it from the menu pane. |
|
2950 |
* Params - |
|
2951 |
* aMenuPane : pointer to the menu pane to be checked for the resource id |
|
2952 |
*/ |
|
2953 |
void FindAndRemoveInputOptionsMenuItemL( CAknFepUiInterfaceMenuPane* aMenuPane ); |
|
2954 |
||
2955 |
/** |
|
2956 |
* CAknFepManager::FindAndRemoveEditSubMenuItemL |
|
2957 |
* Helper method to check if the "Edit Text" menu item exists and |
|
2958 |
* if so, remove it from the menu pane. |
|
2959 |
* Params - |
|
2960 |
* aMenuPane : pointer to the menu pane to be checked for the resource id |
|
2961 |
*/ |
|
2962 |
void FindAndRemoveEditSubMenuItemL( CAknFepUiInterfaceMenuPane* aMenuPane ); |
|
2963 |
||
2964 |
/** |
|
2965 |
* CAknFepManager::AddInputOptionsMenuItemL |
|
2966 |
* Helper method to add the "Input options" menu item in appropriate location |
|
2967 |
* Appropriate location is : |
|
2968 |
* - if Avkon Help command exists, then immediately above it |
|
2969 |
* - else if Avkon Exit command exists, then immediately above it |
|
2970 |
* - else if there are 3 or more items in the Options menu, then 3rd from last |
|
2971 |
* - else it is the last item. |
|
2972 |
* Params - |
|
2973 |
* aMenuPane : pointer to the menu pane to be checked for the resource id |
|
2974 |
*/ |
|
2975 |
void AddInputOptionsMenuItemL( CAknFepUiInterfaceMenuPane* aMenuPane ); |
|
2976 |
||
2977 |
private: |
|
2978 |
CChrMultiTapTimer* iNumericResourceTimer; |
|
2979 |
HBufC* iResourceString; |
|
2980 |
TInt iChrCharIndex; |
|
2981 |
#ifdef __HALF_QWERTY_KEYPAD |
|
2982 |
TKeyEvent iHalfQwertyLastKeyEvent; |
|
2983 |
// this variable is set whenever a long key press of chr happens |
|
2984 |
TBool iChrLongKeyPress; |
|
2985 |
TBool iFnCharInsertedForShift; |
|
2986 |
#endif //__HALF_QWERTY_KEYPAD |
|
2987 |
TInt iNumericResourceId; |
|
2988 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
2989 |
TBool iHybridAplphaChangedToAlphanumeric; |
|
2990 |
CAknEdwinState* iLastFocusedEditor; |
|
2991 |
CAknEdwinState* iFepAwareDialogParentEditor; |
|
2992 |
/** |
|
2993 |
* Indicate that the focused control is destroyed. |
|
2994 |
*/ |
|
2995 |
TBool iFocusedItemDestroy; |
|
2996 |
}; |
|
2997 |
||
2998 |
/** |
|
2999 |
* Sets aFlag bitfield in iFlags |
|
3000 |
*/ |
|
3001 |
inline void CAknFepManager::SetFlag(TInt aFlag) |
|
3002 |
{ |
|
3003 |
iFlags|=aFlag; |
|
3004 |
} |
|
3005 |
||
3006 |
/** |
|
3007 |
* Clears aFlag bitfield in iFlags |
|
3008 |
*/ |
|
3009 |
inline void CAknFepManager::ClearFlag(TInt aFlag) |
|
3010 |
{ |
|
3011 |
iFlags&=~aFlag; |
|
3012 |
} |
|
3013 |
||
3014 |
/** |
|
3015 |
* Clears all flags down |
|
3016 |
*/ |
|
3017 |
inline void CAknFepManager::ResetFlags() |
|
3018 |
{ |
|
3019 |
iFlags=0; |
|
3020 |
} |
|
3021 |
||
3022 |
/** |
|
3023 |
* Returns ETrue if the aFlag bitfield in iFlags is set, EFalse if it |
|
3024 |
* is clear |
|
3025 |
*/ |
|
3026 |
inline TBool CAknFepManager::IsFlagSet(TInt aFlag) const |
|
3027 |
{ |
|
3028 |
return iFlags&aFlag; |
|
3029 |
} |
|
3030 |
||
3031 |
/** |
|
3032 |
* Sets aExtendedFlag bitfield in iExtendedFlags |
|
3033 |
*/ |
|
3034 |
inline void CAknFepManager::SetExtendedFlag(TInt aExtendedFlag) |
|
3035 |
{ |
|
3036 |
iExtendedFlags|=aExtendedFlag; |
|
3037 |
} |
|
3038 |
||
3039 |
/** |
|
3040 |
* Clears aExtendedFlag bitfield in iExtendedFlags |
|
3041 |
*/ |
|
3042 |
inline void CAknFepManager::ClearExtendedFlag(TInt aExtendedFlag) |
|
3043 |
{ |
|
3044 |
iExtendedFlags&=~aExtendedFlag; |
|
3045 |
} |
|
3046 |
||
3047 |
/** |
|
3048 |
* Clears all ExtendedFlags down |
|
3049 |
*/ |
|
3050 |
inline void CAknFepManager::ResetExtendedFlags() |
|
3051 |
{ |
|
3052 |
iExtendedFlags=0; |
|
3053 |
} |
|
3054 |
||
3055 |
/** |
|
3056 |
* Returns ETrue if the aExtendedFlag bitfield in iExtendedFlags is set, EFalse if it |
|
3057 |
* is clear |
|
3058 |
*/ |
|
3059 |
inline TBool CAknFepManager::IsExtendedFlagSet(TInt aExtendedFlag) const |
|
3060 |
{ |
|
3061 |
return iExtendedFlags&aExtendedFlag; |
|
3062 |
} |
|
3063 |
||
3064 |
/** |
|
3065 |
* Returns previous case information |
|
3066 |
*/ |
|
3067 |
inline TInt CAknFepManager::CaseBefore() const |
|
3068 |
{ |
|
3069 |
return iCaseBefore; |
|
3070 |
} |
|
3071 |
||
3072 |
inline TBool CAknFepManager::IsChineseInputLanguage() const |
|
3073 |
{ |
|
3074 |
return ( iLanguageCapabilities.iInputLanguageCode == ELangPrcChinese || |
|
3075 |
iLanguageCapabilities.iInputLanguageCode == ELangHongKongChinese || |
|
3076 |
iLanguageCapabilities.iInputLanguageCode == ELangTaiwanChinese); |
|
3077 |
} |
|
3078 |
||
3079 |
inline TBool CAknFepManager::IsKoreanInputLanguage() const |
|
3080 |
{ |
|
3081 |
return iLanguageCapabilities.iInputLanguageCode == ELangKorean; |
|
3082 |
} |
|
3083 |
inline TBool CAknFepManager::IsArabicInputLanguage() const |
|
3084 |
{ |
|
3085 |
return ( iLanguageCapabilities.iInputLanguageCode == ELangArabic); |
|
3086 |
} |
|
3087 |
/** |
|
3088 |
* Returns the valid of Qwerty |
|
3089 |
*/ |
|
3090 |
inline TBool CAknFepManager::IsQwerty() const |
|
3091 |
{ |
|
3092 |
return iQwertyInputMode; |
|
3093 |
} |
|
3094 |
||
3095 |
||
3096 |
/** |
|
3097 |
* Sets aFlag bitfield in iCcpuFlags |
|
3098 |
*/ |
|
3099 |
inline void CAknFepManager::SetCcpuFlag(TInt aFlag) |
|
3100 |
{ |
|
3101 |
iCcpuMode|=aFlag; |
|
3102 |
} |
|
3103 |
||
3104 |
/** |
|
3105 |
* Clears aFlag bitfield in iCcpuFlags |
|
3106 |
*/ |
|
3107 |
inline void CAknFepManager::ClearCcpuFlag(TInt aFlag) |
|
3108 |
{ |
|
3109 |
iCcpuMode&=~aFlag; |
|
3110 |
} |
|
3111 |
||
3112 |
/** |
|
3113 |
* Clears all flags in iCcpuFlags |
|
3114 |
*/ |
|
3115 |
inline void CAknFepManager::ResetCcpuFlags() |
|
3116 |
{ |
|
3117 |
iCcpuMode=0; |
|
3118 |
} |
|
3119 |
||
3120 |
/** |
|
3121 |
* Returns ETrue if the aFlag bitfield in iCcpuFlags is set, EFalse if it |
|
3122 |
* is clear |
|
3123 |
*/ |
|
3124 |
inline TBool CAknFepManager::IsCcpuFlagSet(TInt aFlag) const |
|
3125 |
{ |
|
3126 |
return iCcpuMode&aFlag; |
|
3127 |
} |
|
3128 |
||
3129 |
inline MAknFepManagerInterface* CAknFepManager::InternalFepUI() |
|
3130 |
{ |
|
3131 |
return iCurrentFepUI; |
|
3132 |
} |
|
3133 |
||
3134 |
#ifdef RD_SCALABLE_UI_V2 |
|
3135 |
||
3136 |
inline void CAknFepManager::SetNotifyPlugin( TBool aNotifyFlag ) |
|
3137 |
{ |
|
3138 |
iNotifyPlugin = aNotifyFlag; |
|
3139 |
} |
|
3140 |
inline TInt CAknFepManager::PermittedModes() const |
|
3141 |
{ |
|
3142 |
return iPermittedInputModes; |
|
3143 |
} |
|
3144 |
||
3145 |
inline void CAknFepManager::RemeberEditorState() |
|
3146 |
{ |
|
3147 |
iRememberEditorState = EditorState(); |
|
3148 |
} |
|
3149 |
||
3150 |
inline TBool CAknFepManager::IsMfneEditor() const |
|
3151 |
{ |
|
3152 |
return EditorType() == CAknExtendedInputCapabilities::EMFNEBased; |
|
3153 |
} |
|
3154 |
||
3155 |
inline TBool CAknFepManager::IsFindPaneEditor() const |
|
3156 |
{ |
|
3157 |
return iAknEditorFlags & EAknEditorFlagFindPane; |
|
3158 |
} |
|
3159 |
||
3160 |
inline CAknFepManager::TLanguageCapabilities CAknFepManager::InputLanguageCapabilities() const |
|
3161 |
{ |
|
3162 |
return iLanguageCapabilities; |
|
3163 |
} |
|
3164 |
||
3165 |
inline TAknFepManagerState& CAknFepManager::FepManState() |
|
3166 |
{ |
|
3167 |
return iFepManState; |
|
3168 |
} |
|
3169 |
||
3170 |
inline void CAknFepManager::SetCancelPopupInQwerty( TBool aCancelPopupInQwerty ) |
|
3171 |
{ |
|
3172 |
iCancelPopupInQwerty = aCancelPopupInQwerty; |
|
3173 |
} |
|
3174 |
inline TInt CAknFepManager::LastChineseInputMode() const |
|
3175 |
{ |
|
3176 |
return iLastChineseInputMode; |
|
3177 |
}; |
|
3178 |
#endif //RD_SCALABLE_UI_V2 |
|
3179 |
||
3180 |
/** |
|
3181 |
* Returns ETrue if Feature manager supports Japanese. |
|
3182 |
*/ |
|
3183 |
inline TBool CAknFepManager::IsFeatureSupportedJapanese() const |
|
3184 |
{ |
|
3185 |
return iFeatureSupportedJapanese; |
|
3186 |
} |
|
3187 |
||
3188 |
/** |
|
3189 |
* Returns ETrue if Auto Word Completion is enabled in the edtior |
|
3190 |
*/ |
|
3191 |
inline TBool CAknFepManager::IsAutoCompleteOn() const |
|
3192 |
{ |
|
3193 |
return iIsAutoCompleteOn; |
|
3194 |
} |
|
3195 |
#ifndef RD_INTELLIGENT_TEXT_INPUT |
|
3196 |
/** |
|
3197 |
* Setes the current state from GS to the local state |
|
3198 |
*/ |
|
3199 |
||
3200 |
inline void CAknFepManager::SetAutoCompletionState(TInt aValue) |
|
3201 |
{ |
|
3202 |
iIsAutoCompleteOn = aValue; |
|
3203 |
} |
|
3204 |
#endif |
|
3205 |
#ifdef RD_INTELLIGENT_TEXT_INPUT |
|
3206 |
/** |
|
3207 |
* @return TInt Typing correction level. |
|
3208 |
*/ |
|
3209 |
inline TInt CAknFepManager::AdvancedPredictiveTypingCorrectionLevel() const |
|
3210 |
{ |
|
3211 |
return iTypingCorrectionLevel; |
|
3212 |
} |
|
3213 |
||
3214 |
/** |
|
3215 |
* @return ETrue If the number candidate shown. EFalse otherwise. |
|
3216 |
*/ |
|
3217 |
inline TBool CAknFepManager::IsAdvancedPredictiveNumberCandidateShown() const |
|
3218 |
{ |
|
3219 |
return iIsNumberCandidateShown; |
|
3220 |
} |
|
3221 |
||
3222 |
/** |
|
3223 |
* @return ETrue If the number candidate shown. EFalse otherwise. |
|
3224 |
*/ |
|
3225 |
inline TBool CAknFepManager::AdvancedPredictivePrimaryCandidate() const |
|
3226 |
{ |
|
3227 |
return iPrimaryCandidate; |
|
3228 |
} |
|
3229 |
#endif //RD_INTELLIGENT_TEXT_INPUT |
|
3230 |
||
3231 |
inline TBool CAknFepManager::WasLastKeyPressAHashKey() |
|
3232 |
{ |
|
3233 |
return iLastKeyPressedWasHashKey; |
|
3234 |
} |
|
3235 |
||
3236 |
inline void CAknFepManager::SetLastPressedHashKeyStatus(TBool aStatus) |
|
3237 |
{ |
|
3238 |
iLastKeyPressedWasHashKey = aStatus; |
|
3239 |
} |
|
3240 |
||
3241 |
inline TCoeInputCapabilities& CAknFepManager::InputCapabilities() |
|
3242 |
{ |
|
3243 |
return iInputCapabilities; |
|
3244 |
} |
|
3245 |
||
3246 |
inline TFepSymbolOfHardwareOne CAknFepManager::SymbolInfoOfHardKey1() |
|
3247 |
{ |
|
3248 |
return iSymbolData; |
|
3249 |
} |
|
3250 |
inline TBool CAknFepManager::IsSupportNativeNumber() const |
|
3251 |
{ |
|
3252 |
return ( iLanguageCapabilities.iLocalDigitType == EDigitTypeArabicIndic |
|
3253 |
|| iLanguageCapabilities.iLocalDigitType == EDigitTypeEasternArabicIndic |
|
3254 |
|| iLanguageCapabilities.iLocalDigitType == EDigitTypeDevanagari ); |
|
3255 |
} |
|
3256 |
||
3257 |
inline TBool CAknFepManager::IsSupportedAdaptiveSearch() const |
|
3258 |
{ |
|
3259 |
return iAknEditorFlags & EAknEditorFlagAdaptiveSearch; |
|
3260 |
} |
|
3261 |
||
3262 |
inline void CAknFepManager::SetGainForeground( TBool aGainForeground ) |
|
3263 |
{ |
|
3264 |
iGainForeground = aGainForeground; |
|
3265 |
} |
|
3266 |
||
3267 |
/** |
|
3268 |
* Return active input language, only used for languages popup list |
|
3269 |
*/ |
|
3270 |
inline TInt CAknFepManager::ActiveInputLanguage() const |
|
3271 |
{ |
|
3272 |
return iActiveInputLanguage; |
|
3273 |
} |
|
3274 |
||
3275 |
/** |
|
3276 |
* Set active input language, only used for languages popup list |
|
3277 |
*/ |
|
3278 |
inline void CAknFepManager::SetActiveInputLanguage( TInt aInputLanguage ) |
|
3279 |
{ |
|
3280 |
iActiveInputLanguage = aInputLanguage; |
|
3281 |
} |
|
3282 |
||
3283 |
#endif |
|
3284 |
||
3285 |
// End of file |