|
1 /* |
|
2 * Copyright (c) 2003 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef __AKN_FEP_PLUGIN_MANAGER__ |
|
30 #define __AKN_FEP_PLUGIN_MANAGER__ |
|
31 |
|
32 // INCLUDES |
|
33 #include <gulicon.h> |
|
34 #include <barsread.h> |
|
35 #include <aknfeppensupportinterface.h> |
|
36 #include <peninputclient.h> |
|
37 #include <aknextendedinputcapabilities.h> |
|
38 #include <eikedwob.h> // for MEikEdwinObserver |
|
39 |
|
40 #include "AknFepGlobalEnums.h" |
|
41 #include <aknfeppeninputenums.h> |
|
42 #include "AknFepPluginMenuManager.h" |
|
43 #include "AknFepSharedDataInterface.h" |
|
44 #include "AknFepManager.h" |
|
45 #include "AknFepCaseManager.h" |
|
46 #include <peninputsrveventhandler.h> |
|
47 |
|
48 // FORWARD DECLARATIONS |
|
49 //class MPeninputServerEventHandler; |
|
50 class MAknFepManagerInterface; |
|
51 class CAknFepUiSpellContainer; |
|
52 class CPenInputGSInterface; |
|
53 class CConnectAo; |
|
54 |
|
55 // CLASS DECLARATION |
|
56 |
|
57 |
|
58 /** |
|
59 * Plugin command type |
|
60 */ |
|
61 enum TPluginCmd |
|
62 { |
|
63 EPluginCloseMode, |
|
64 EPluginSyncFepAwareText, |
|
65 EPluginSetDataQueryShown, |
|
66 EPluginActivate, |
|
67 EPluginMenuCmd, |
|
68 EPluginFocusChanged, |
|
69 EPluginResourceChanged, |
|
70 EPluginFaseSwap, |
|
71 EPluginKeyEvent, |
|
72 EPluginUpdateIndicator, |
|
73 EPluginActivateInGlobalNote, |
|
74 EGainForeground, |
|
75 ELostForeground, |
|
76 EPluginEditorActivate, |
|
77 EPluginForegroundChanged, |
|
78 EPluginFocusItemDestroy, |
|
79 EPluginLanguageChanged, |
|
80 EPluginPreview, |
|
81 EPluginPromptChanged, |
|
82 EPluginShowCandidate, |
|
83 EPluginShowTooltip, |
|
84 EPluginHideTooltip |
|
85 }; |
|
86 |
|
87 /** |
|
88 * Plugin synchronization type |
|
89 */ |
|
90 enum TPluginSync |
|
91 { |
|
92 EPluginSyncCurSel, |
|
93 EPluginSyncUpdatedText, |
|
94 EPluginSyncAll |
|
95 }; |
|
96 |
|
97 #ifdef RD_SCALABLE_UI_V2 |
|
98 |
|
99 /** |
|
100 * CAknFepPluginManager class. |
|
101 * |
|
102 * @lib AknFep.lib |
|
103 * @since 2.8 |
|
104 */ |
|
105 class CAknFepPluginManager : |
|
106 public CBase, |
|
107 public MAknFepPenSupportInterface, |
|
108 public MPeninputServerEventHandler, |
|
109 public MEikEdwinObserver |
|
110 { |
|
111 public: |
|
112 |
|
113 /** |
|
114 * Simulate event mode |
|
115 * @remark: Used in SubmitUiPluginTextL() |
|
116 */ |
|
117 enum TSimulateEventMode |
|
118 { |
|
119 EIgnor, |
|
120 ERawEvent, |
|
121 EKeyEvent |
|
122 }; |
|
123 |
|
124 /** |
|
125 * NewL first phase construction |
|
126 * |
|
127 * @param aFepMan fep manager |
|
128 * |
|
129 */ |
|
130 static CAknFepPluginManager* NewL( CAknFepManager& aFepMan, |
|
131 CAknFepSharedDataInterface& aSharedData, |
|
132 CAknFepLanguageManager& aLangMan, |
|
133 CAknFepCaseManager& aCaseMan ); |
|
134 |
|
135 /** |
|
136 * Destructor |
|
137 */ |
|
138 virtual ~CAknFepPluginManager(); |
|
139 |
|
140 private: |
|
141 |
|
142 /** |
|
143 * private constructor |
|
144 */ |
|
145 CAknFepPluginManager( CAknFepManager& aFepMan, |
|
146 CAknFepSharedDataInterface& aSharedData, |
|
147 CAknFepLanguageManager& aLangMan, |
|
148 CAknFepCaseManager& aCaseMan ); |
|
149 |
|
150 /** |
|
151 * Construct |
|
152 * |
|
153 * @param aFepMan fep manager |
|
154 * |
|
155 */ |
|
156 void ConstructL(); |
|
157 |
|
158 public : |
|
159 |
|
160 enum TSpellCBA |
|
161 { |
|
162 ESpellCBANone, |
|
163 ESpellCBACancelEmpty, |
|
164 ESpellCBAOkCancel, |
|
165 }; |
|
166 |
|
167 public: |
|
168 |
|
169 // From MAknFepPenSupportInterface |
|
170 |
|
171 /** |
|
172 * From MAknFepPenSupportInterface |
|
173 * Activate pen input method |
|
174 * |
|
175 * @since 3.2 |
|
176 * @Return None |
|
177 */ |
|
178 void ActivatePenInputL(); |
|
179 |
|
180 /** |
|
181 * From MAknFepPenSupportInterface |
|
182 * Deactivate pen input method |
|
183 * |
|
184 * @since 3.2 |
|
185 * @Return None |
|
186 */ |
|
187 void DeactivatePenInputL(); |
|
188 |
|
189 // From MPeninputServerEventHandler |
|
190 |
|
191 /** |
|
192 * From MPeninputServerEventHandler |
|
193 * Handle pen input server events. |
|
194 * |
|
195 * @since 3.2 |
|
196 * @param aEventId Event to handle. |
|
197 * @return ETrue If server event handled |
|
198 */ |
|
199 TBool HandleServerEventL(TInt aEventId); |
|
200 |
|
201 /** |
|
202 * Handle events from FEP |
|
203 * suggested mode. |
|
204 * |
|
205 * @since 3.2 |
|
206 * @param aEventType, event type from FEP |
|
207 * @param aEventData, event data from FEP |
|
208 * @return ETrue successful, EFalse otherwise |
|
209 */ |
|
210 void HandleEventsFromFepL( TInt aEventType, TInt aEventData ); |
|
211 |
|
212 /** |
|
213 * Change current input method to plugin input method with |
|
214 * suggested mode. |
|
215 * |
|
216 * @since 3.2 |
|
217 * @return ETrue successful, EFalse otherwise |
|
218 */ |
|
219 TBool TryChangePluginInputModeByModeL(TPluginInputMode aSuggestMode, TInt aOpenMode, |
|
220 TInt aSuggestRange); |
|
221 |
|
222 /** |
|
223 * Close plugin input mode, reset iPluginInputMode |
|
224 * to EPluginInputModeNone |
|
225 * |
|
226 * @since 3.2 |
|
227 * @param aRestore, If ETrue, restor rembered HKB mode |
|
228 * @return None |
|
229 */ |
|
230 void ClosePluginInputModeL(TBool aRestore); |
|
231 |
|
232 /** |
|
233 * Close plugin input UI, only close UI |
|
234 * |
|
235 * @param aResetState If ETrue, reset UI state |
|
236 * to initial. |
|
237 * @return None. |
|
238 */ |
|
239 void ClosePluginInputUiL(TBool aResetState); |
|
240 |
|
241 /** |
|
242 * Handle resource change. |
|
243 * |
|
244 * @param aType The resource type |
|
245 * @return None. |
|
246 */ |
|
247 void OnResourceChangedL(TInt aType); |
|
248 |
|
249 /** |
|
250 * Synchronize plugin UI text with editor |
|
251 * |
|
252 * @since 3.2 |
|
253 * @return None |
|
254 */ |
|
255 void SyncFepAwareText( TPluginSync aSyncType = EPluginSyncCurSel, TBool aSendNow = ETrue ); |
|
256 |
|
257 /** |
|
258 * Processes commands from the edit menu |
|
259 * |
|
260 * @since 3.2 |
|
261 * @param aCommandId The menu command id |
|
262 * @return None. |
|
263 */ |
|
264 void ProcessMenuCommandL(TInt aCommandId); |
|
265 |
|
266 /** |
|
267 * Handle key events |
|
268 * |
|
269 * @since 3.2 |
|
270 * @param aCommandId The key id |
|
271 * @return None. |
|
272 */ |
|
273 void HandleKeyEventL(TInt aKeyId); |
|
274 |
|
275 /** |
|
276 * initialize the edit menu depending on fep and editor state |
|
277 * |
|
278 * @since 3.2 |
|
279 * @param aMenuPane The pointer to menu pane |
|
280 * @return None. |
|
281 */ |
|
282 void InitMenuPaneL( CAknEdwinState* aEditorState, |
|
283 CAknFepUiInterfaceMenuPane* aMenuPane, TInt aResourceId ); |
|
284 |
|
285 /** |
|
286 * Handles notifications that the UI has changed focus |
|
287 * |
|
288 * @since 3.2 |
|
289 * @param aFepFullyConstructed The flag of fep fully constructed |
|
290 * @return None. |
|
291 */ |
|
292 void OnFocusChangedL( TBool aGainForeground ); |
|
293 |
|
294 |
|
295 /** |
|
296 * Set ICF data |
|
297 * |
|
298 * @since 3.2 |
|
299 * @param aTextChanged If editor text changed |
|
300 * @param aIcfData ICF data |
|
301 * @return None |
|
302 */ |
|
303 void SendIcfDataL( TPluginSync aSyncType = EPluginSyncCurSel ); |
|
304 /** |
|
305 * Set editor cursor selection according plugin UI |
|
306 * cursor state |
|
307 * |
|
308 * @since 3.2 |
|
309 * @param aCurSel Cursor position. |
|
310 * @param aSyncCursor ETrue if plug in UI need update cursor, EFalse otherwise |
|
311 * @return None |
|
312 */ |
|
313 void SetCursorSelectionL(const TCursorSelection& aCurSel, TBool aSyncCursor); |
|
314 |
|
315 HBufC* GetNumberKeymapResource(TInt aCaseMode); |
|
316 |
|
317 HBufC* DoGetNumberKeymapResourceL(TInt aCaseMode); |
|
318 |
|
319 MAknFepManagerInterface* CurrentFepInputUI(); |
|
320 |
|
321 void SetFingerMatchSelectionState(TBool aMatchStateOn); |
|
322 TBool IsVisible(); |
|
323 TBool DoNextCandidates(); |
|
324 void DoPreviousCandidates(); |
|
325 // send all predictive candidates at once |
|
326 void ShowAllCandidates(); |
|
327 |
|
328 void ResetCandidateList(); |
|
329 |
|
330 void UpdateITUTIndicator(); |
|
331 |
|
332 void SetITUTSpellingStateL(TBool aState); |
|
333 |
|
334 void DisplaySpellEditor(const TInt aEditorFlag, const TDesC& aInitText, |
|
335 TCursorSelection aCurSel); |
|
336 void DisplaySpellEditorL(const TInt aEditorFlag, const TDesC& aInitText, |
|
337 TCursorSelection aCurSel); |
|
338 |
|
339 void DestroySpellEditor(); |
|
340 |
|
341 HBufC* SpellTextInput(); |
|
342 void SetTCursorSelection(); |
|
343 |
|
344 void HandleEdwinEventL(CEikEdwin* , TEdwinEvent aEventType); |
|
345 |
|
346 TInt GetSoftKeyResID(); |
|
347 |
|
348 void HasNoFreeSpace(); |
|
349 |
|
350 TBool EnterMatchSelectionState(); |
|
351 |
|
352 TPluginInputMode PluginInputMode(); |
|
353 |
|
354 void UpdateCaseMode(); |
|
355 |
|
356 TBool IsGlobleNotes(); |
|
357 TBool IsDimed(); |
|
358 /** |
|
359 * Save the cursor visibility. This function is called from fep side, |
|
360 * because of sync cursor visibility |
|
361 * |
|
362 * @since v5.0 |
|
363 */ |
|
364 void SetCursorVisibility(TBool aVisibility, TBool aReportPlugin = EFalse); |
|
365 /** |
|
366 * Get the correct indicator for VKB; |
|
367 * |
|
368 * @return The correct indicator state for VKB. |
|
369 */ |
|
370 TAknEditingState VKBIndicatorState( TAknEditingState aOldState ); |
|
371 void ClosePeninputSetting(); |
|
372 |
|
373 /** |
|
374 * Show tooltip on FSQ to show the best guess word shown inline, |
|
375 * when it is necessary |
|
376 * |
|
377 * @param aText The tooltip text to be displayed |
|
378 * @return None |
|
379 */ |
|
380 void ShowTooltipOnFSQL( TInt aSecondaryIdx ); |
|
381 |
|
382 /** |
|
383 * Hide tooltip on FSQ if necessary |
|
384 * |
|
385 * @return None |
|
386 */ |
|
387 void HideTooltipOnFSQL(); |
|
388 |
|
389 /** |
|
390 * Open a candidate list to show contents in aItemArray |
|
391 * |
|
392 * @param aCandidateList ITI candidate data |
|
393 * @return None |
|
394 */ |
|
395 void ShowCandidateListL( TFepITICandidateList aCandidateList ); |
|
396 |
|
397 /** |
|
398 * Hide candidate list |
|
399 * |
|
400 */ |
|
401 void HideCandidateListL(); |
|
402 |
|
403 /** |
|
404 * Commit candidate word on FSQ |
|
405 * |
|
406 * @param aIndex the index in candidate lists; |
|
407 * @return None |
|
408 */ |
|
409 void CommitCandidateWordOnFSQL( TInt aIndex ); |
|
410 |
|
411 /** |
|
412 * Check if ITI features is enabled when FSQ is opened. |
|
413 */ |
|
414 TBool EnableITIOnFSQ(); |
|
415 |
|
416 /** |
|
417 * Check if ITI can be supported by FSQ. |
|
418 */ |
|
419 TBool IsSupportITIOnFSQ(); |
|
420 |
|
421 /** |
|
422 * Restore some configuration after closing FSQ. |
|
423 * |
|
424 */ |
|
425 void ResetItiStateL(); |
|
426 |
|
427 /* |
|
428 #ifdef RD_TACTILE_FEEDBACK |
|
429 TBool VKBIsOpened(); |
|
430 #endif // RD_TACTILE_FEEDBACK |
|
431 */ |
|
432 |
|
433 void HandleiDimGainForeground(TBool aGain); |
|
434 |
|
435 void OnServerReady(TInt aErr); |
|
436 |
|
437 public: // inline |
|
438 |
|
439 /** |
|
440 * Get current plugin input UI |
|
441 * |
|
442 * @since 3.2 |
|
443 * @return The pointer to MAknFepManagerInterface |
|
444 */ |
|
445 inline MAknFepManagerInterface* CurrentPluginInputFepUI(); |
|
446 |
|
447 /** |
|
448 * Get current plugin input mode |
|
449 * |
|
450 * @since 3.2 |
|
451 * @return current plugin input mode |
|
452 */ |
|
453 |
|
454 inline TBool PluginNativeRange(); |
|
455 |
|
456 inline void SetPluginNativeRange( TBool aPluginNativeRange ); |
|
457 |
|
458 inline TBool SyncWithPluginRange(); |
|
459 |
|
460 inline RPointerArray<HBufC>& MatchCandidateList(); |
|
461 |
|
462 inline TBool IsMatchState(); |
|
463 |
|
464 inline TBool IsSpellVisible(); |
|
465 |
|
466 inline void SetCursorSelection(TCursorSelection& aCursorSel); |
|
467 |
|
468 inline TCursorSelection CursorSelection(); |
|
469 |
|
470 inline void SetCaseUpdatesSupressed(TBool aCaseUpdatesSupressed); |
|
471 inline TBool CaseUpdatesSupressed(); |
|
472 |
|
473 inline void SetBeforeSpell(TBool aBeforeSpell); |
|
474 inline TBool BeforeSpell(); |
|
475 inline HBufC* GetSpellText(); |
|
476 inline void SpellText(HBufC* aSpellText); |
|
477 inline TBool IsNonLatinLanguage(TLanguage aLang); |
|
478 inline TInt PreviousPermitMode(); |
|
479 /** |
|
480 * In T9 predictive text input, if user press "Spell" button, a edit word query dialog is opened. |
|
481 * This Flag is set for this case to indicate whether edit wod query dialog is opened. |
|
482 * @param aIsEditWordQueryDlg ETrue means dialog is open, |
|
483 EFalse means dialog is not open. |
|
484 * @since v5.0 |
|
485 */ |
|
486 inline void SetInEditWordQueryFlag(TBool aIsEditWordQueryDlg ); |
|
487 void LaunchPenInputLanguageSelectionL( TBool aLaunchedByTouchWin = EFalse ); |
|
488 void LaunchPenInputRecognitionWithDictionarySelectionL(); |
|
489 inline TBool IsInGlobleNoteEditor(); |
|
490 void SetMenuState(TBool aUpdateEditor = ETrue); |
|
491 void ResetMenuState(TBool aUnDim = ETrue); |
|
492 |
|
493 /** |
|
494 * When ITI setting opened, set this flag to ETrue |
|
495 * |
|
496 * @param aOpen ETrue means dialog is open, |
|
497 * EFalse means dialog is not open. |
|
498 * @return None |
|
499 */ |
|
500 inline void ITISettingDialogOpen( TBool aOpen ); |
|
501 |
|
502 /** |
|
503 * Check if tooltip box on FSQ is opened. |
|
504 * |
|
505 * @return if ETrue: Tooltip box on FSQ is enabled. |
|
506 */ |
|
507 inline TBool IsTooltipOpenOnFSQ(); |
|
508 private: |
|
509 |
|
510 /** |
|
511 * Initialize plugin UI, set permitted ranges, primary |
|
512 * range, case mode and etc. |
|
513 * |
|
514 * @since 3.2 |
|
515 * @Return None |
|
516 */ |
|
517 void InitializePluginInputL(TInt aOpenMode, TInt aSuggestRange, TBool aCleanContent); |
|
518 |
|
519 /** |
|
520 * Launch plugin menu |
|
521 * |
|
522 * @since 3.2 |
|
523 * @param aResource Menu resource id. |
|
524 * @return None |
|
525 */ |
|
526 void LaunchPenInputMenuL(TInt aResourceId, TBool aRemeber = ETrue); |
|
527 |
|
528 /** |
|
529 * Show pen input language setting of general setting view |
|
530 * |
|
531 * @since 3.2 |
|
532 * @return None |
|
533 */ |
|
534 |
|
535 /** |
|
536 * Show pen input setting of general setting view |
|
537 * @since 3.2 |
|
538 * @param aData Key data |
|
539 * @return None |
|
540 */ |
|
541 void LaunchPenInputSettingL(); |
|
542 |
|
543 /** |
|
544 * Parse editor text passed to plugin ICF |
|
545 * Only return current paragraph of current cursor position. |
|
546 * |
|
547 * @since 3.2 |
|
548 * @param aBuffer Editor text |
|
549 * @param aCurrent Current cursor position. |
|
550 * @param aFrom Returned paragraph start pos. |
|
551 * @param aTo Returned paragraph end pos. |
|
552 * @return None |
|
553 */ |
|
554 void ParseInputContextContent(TDes& aBuffer, TInt aCurrent, |
|
555 TInt& aFrom, TInt& aTo); |
|
556 |
|
557 |
|
558 /** |
|
559 * Submit text input from plugin UI to editor |
|
560 * |
|
561 * @since 3.2 |
|
562 * @param aData Key data |
|
563 * @param aForcedMode Forced simluate event mode. |
|
564 * @return None |
|
565 */ |
|
566 void SubmitUiPluginTextL(const TDesC& aData, |
|
567 TSimulateEventMode aForcedMode = EIgnor); |
|
568 |
|
569 /** |
|
570 * Handle key event sent from pen input server |
|
571 * |
|
572 * @since 3.2 |
|
573 * @param aData Key data |
|
574 * @return None |
|
575 */ |
|
576 void OnPenInputServerKeyEventL(const TDesC& aData); |
|
577 |
|
578 /** |
|
579 * Sync indicator with plugin range |
|
580 * |
|
581 * @since 3.2 |
|
582 * @Return None |
|
583 */ |
|
584 void SyncIndicatorWithPluginRangeL(); |
|
585 |
|
586 /** |
|
587 * Get current suggest mode |
|
588 * |
|
589 * @since 3.2 |
|
590 * @param aSuggestMode The mode suggested |
|
591 * @Return None |
|
592 */ |
|
593 TBool GetCurSuggestMode( TPluginInputMode& aSuggestMode ); |
|
594 |
|
595 /** |
|
596 * Connect server |
|
597 * |
|
598 * @since 3.2 |
|
599 * @Return ETrue If connection sucess |
|
600 */ |
|
601 TBool ConnectServer(); |
|
602 |
|
603 /** |
|
604 * Notify layout |
|
605 * |
|
606 * @since 3.2 |
|
607 * @param aOpenMode The current input mode |
|
608 * @param aSuggestRange The suggest range |
|
609 * @Return None |
|
610 */ |
|
611 void NotifyLayoutL(TInt aOpenMode, TInt aSuggestRange, TBool aCleanContent); |
|
612 |
|
613 /** |
|
614 * verify if mode switch button enable |
|
615 * |
|
616 * @since 3.2 |
|
617 * @Return ETrue if mode switch button enable |
|
618 */ |
|
619 TBool IsEnableModeSwitchBtn(); |
|
620 |
|
621 /** |
|
622 * verify if setting buttons enable |
|
623 * |
|
624 * @since 3.2 |
|
625 * @Return ETrue if setting buttons enable |
|
626 */ |
|
627 TBool IsEnableSettingBtn(); |
|
628 |
|
629 /** |
|
630 * Notify layout the editor's keymapping |
|
631 * |
|
632 * @since 3.2 |
|
633 * @Return None |
|
634 */ |
|
635 void NotifyLayoutKeymappingL(); |
|
636 |
|
637 /** |
|
638 * Test data query show status |
|
639 * @since 3.2 |
|
640 * |
|
641 * @return ETrue if data query is showing now, EFalse otherwise |
|
642 */ |
|
643 TBool IsDisplayDataQuery(); |
|
644 |
|
645 /** |
|
646 * Show pen input setting of general setting view |
|
647 * |
|
648 * @since 3.2 |
|
649 * @param aForce ETrue means adjusting data query no matter current showing status, |
|
650 EFalse means adjusting data query window only first time |
|
651 * @return None |
|
652 */ |
|
653 void RepositionDataQuery(TBool aForce); |
|
654 |
|
655 /** |
|
656 * Timer procedure for adjust data query position |
|
657 * |
|
658 * @param aPtr The pointer of CAknFepManager itself |
|
659 * @since 3.2 |
|
660 * @return 0.(meaningless) |
|
661 */ |
|
662 static TInt AdjustDataQueryCallBackL(TAny *aPtr); |
|
663 |
|
664 |
|
665 static void FepObserverHandleCompletionOfTransactionL(MCoeFepObserver& aFepObserver); |
|
666 |
|
667 void CreateFingerItutChineseUiL(); |
|
668 |
|
669 /** |
|
670 * Launch Hwr Training UI |
|
671 * |
|
672 * @since 3.2 |
|
673 * @return None |
|
674 */ |
|
675 void LaunchHwrTrainUiL(); |
|
676 |
|
677 TBool GetIndicatorImgID(const TInt IndicatorUID,TInt &aImage, TInt &aMask); |
|
678 TBool GetIndicatorImgIDL(const TInt IndicatorUID,TInt &aImage, TInt &aMask); |
|
679 |
|
680 void SetPromptText( TBool aCleanContent = ETrue ); |
|
681 |
|
682 void SetIcfAlignment(); |
|
683 |
|
684 void ConvertDigitToDigittype(TDigitType& digittype,TDes& aConvertedNumeral); |
|
685 |
|
686 void GetAllPredictiveCandidate(); |
|
687 void GetAllPredictiveCandidateL(); |
|
688 |
|
689 void AddCurrentWinToOpenListL(); |
|
690 |
|
691 void AddWinToOpenListL( RDrawableWindow* aWin); |
|
692 |
|
693 void RemoveCurrentWinFromOpenList(); |
|
694 |
|
695 void RemoveLastFocusedWinFromOpenList(); |
|
696 |
|
697 TBool IsCurrentWindInOpenList(); |
|
698 |
|
699 TBool ExistInlineText(); |
|
700 |
|
701 TBool SetSyncCurSelIcfDataL( TFepInputContextFieldData& aIcfData ); |
|
702 |
|
703 TBool SetSyncIcfDataL( TFepInputContextFieldData& aIcfData, |
|
704 const TDesC& aLastEditorContent, |
|
705 const TDesC& aCurrentEditorContent ); |
|
706 |
|
707 TBool TextInlined( const TDesC& aLastEditorContent, const TDesC& aCurrentEditorContent); |
|
708 |
|
709 TBool TextInserted( const TDesC& aLastEditorContent, const TDesC& aCurrentEditorContent); |
|
710 |
|
711 TBool TextDeleted( const TDesC& aLastEditorContent, const TDesC& aCurrentEditorContent); |
|
712 |
|
713 TBool TextMultiTapped( const TDesC& aLastEditorContent, const TDesC& aCurrentEditorContent); |
|
714 |
|
715 void AdjustDataCase( TDes& aData ); |
|
716 |
|
717 TBool IsDimArrowKeys(); |
|
718 |
|
719 void LaunchHelpL(); |
|
720 void DimAllModeAndCase(CAknFepUiInterfaceMenuPane* aMenuPane); |
|
721 |
|
722 TInt RepeatStringFromLeft(const TDesC& aSubmitData, TDes& aEditorData); |
|
723 |
|
724 void InformMfneUiStatusL( TBool aOpened ); |
|
725 |
|
726 void UpdatePredicState(); |
|
727 |
|
728 TBool NotifyInGlobalNoteEditorL(); |
|
729 |
|
730 TBool IsChineseIndicator( TAknEditingState aOldState ); |
|
731 |
|
732 TBool IsEditorCursorDisabled(); |
|
733 |
|
734 /** |
|
735 * Check if the cusror in editor is visible. |
|
736 * |
|
737 * @return ETrue: the cursos in editor is visible. |
|
738 * EFalse: the cursos in editor is invisible. |
|
739 */ |
|
740 TBool IsEditorCursorVisible(); |
|
741 |
|
742 |
|
743 /** |
|
744 * Check if curor selection in editor is visible. |
|
745 * |
|
746 * @return ETrue: the cursos in editor is visible. |
|
747 * EFalse: the cursos in editor is invisible. |
|
748 */ |
|
749 TBool IsEditorCursorSelVisible(); |
|
750 |
|
751 /** |
|
752 * Get scan code from hw keymapping. |
|
753 * |
|
754 * @param aKeyCode unicode of each virutal key text. |
|
755 */ |
|
756 TInt GetScanCodeFromHwKeymapping( TUint aKeyCode ); |
|
757 |
|
758 /** |
|
759 * Check if those keys are IIT-supported keys |
|
760 * |
|
761 * @param aKeyEvent The keys to be checked. |
|
762 */ |
|
763 TBool IsITISupportedKey( const TKeyEvent& aKeyEvent ); |
|
764 |
|
765 TPtiTextCase CaseForMappedCharacter(TChar aCharacter); |
|
766 |
|
767 TBool IsNeedToChangeTextCase( const TPtiTextCase& aTextCase ); |
|
768 |
|
769 /** |
|
770 * Do some configuration to make FSQ support ITI features |
|
771 * |
|
772 */ |
|
773 void SetItiStateL(); |
|
774 |
|
775 /** |
|
776 * Config keyboard layout for ITI |
|
777 * |
|
778 */ |
|
779 void SetItiKeyboardLayoutL(); |
|
780 |
|
781 /** |
|
782 * Restore keyboard layout after closing FSQ. |
|
783 */ |
|
784 void ResetItiKeyboardLayoutL(); |
|
785 |
|
786 /** |
|
787 * Restore predict state. |
|
788 */ |
|
789 void RestorePredictStateL(); |
|
790 |
|
791 /** |
|
792 * Check if the keycode belongs to dead keys. |
|
793 * |
|
794 * @param aKeyCode: key code to be checked |
|
795 * @return ETrue: belongs to ETrue |
|
796 * EFalse: doesn't belong to EFalse; |
|
797 */ |
|
798 TBool IsDeadKeyCode( TUint aKeyCode ); |
|
799 |
|
800 /** |
|
801 * Notify app touch window state. |
|
802 * |
|
803 * @param aParam |
|
804 * @return None |
|
805 */ |
|
806 void NotifyAppUiImeTouchWndState( const TBool aTouchState ); |
|
807 |
|
808 /** |
|
809 * Check if current editor support partial screen IMEs |
|
810 * |
|
811 * @return ETrue if support |
|
812 */ |
|
813 TBool IsEditorSupportSplitIme(); |
|
814 |
|
815 private: // Data |
|
816 |
|
817 /** |
|
818 * The reference of fep manager |
|
819 */ |
|
820 CAknFepManager& iFepMan; |
|
821 |
|
822 /** |
|
823 * The reference of language manager |
|
824 */ |
|
825 CAknFepLanguageManager& iLangMan; |
|
826 |
|
827 /** |
|
828 * The reference of case manager |
|
829 */ |
|
830 CAknFepCaseManager& iCaseMan; |
|
831 |
|
832 /** |
|
833 * The reference of shared data manager |
|
834 */ |
|
835 CAknFepSharedDataInterface& iSharedData; |
|
836 |
|
837 |
|
838 /** |
|
839 * Current plugin UI interface |
|
840 */ |
|
841 MAknFepManagerInterface* iCurrentPluginInputFepUI; |
|
842 |
|
843 /** |
|
844 * Current plugin input mode |
|
845 */ |
|
846 TPluginInputMode iPluginInputMode; |
|
847 |
|
848 /** |
|
849 * Current plugin primary range |
|
850 */ |
|
851 TInt iPluginPrimaryRange; |
|
852 |
|
853 /** |
|
854 * Update editor cursor timer |
|
855 */ |
|
856 CPeriodic* iAdjustDataQueryTimer; |
|
857 |
|
858 /** |
|
859 * HKB predictive state before starting plugin IME |
|
860 */ |
|
861 TBool iT9UsedBeforePluginInput; |
|
862 |
|
863 /** |
|
864 * Indicating connection state to pen input server |
|
865 */ |
|
866 TBool iAutoCompBeforePluginInput; |
|
867 /** |
|
868 * Indicating connection state to pen input server |
|
869 */ |
|
870 TBool iPenInputSvrConnected; |
|
871 |
|
872 /** |
|
873 * flags of layout UI submit status |
|
874 */ |
|
875 TInt iLastSubmitCount; |
|
876 |
|
877 /** |
|
878 * Data query showing status |
|
879 */ |
|
880 TBool iDataQueryAlreadyShow; |
|
881 |
|
882 /** |
|
883 * Plugin menu manager object |
|
884 */ |
|
885 CAknFepPluginMenuManager* iPenInputMenu; |
|
886 |
|
887 /** |
|
888 * Pen input server handle |
|
889 */ |
|
890 RPeninputServer iPenInputServer; |
|
891 |
|
892 /** |
|
893 * flags of language has been changed by setting |
|
894 */ |
|
895 TInt iCurLanguage; |
|
896 |
|
897 /** |
|
898 * flags of fast swap by menu |
|
899 */ |
|
900 TBool iFastSwapByMenu; |
|
901 |
|
902 MAknFepManagerInterface* iFingerItutChineseUI; |
|
903 |
|
904 TCursorSelection iCurSelPre; |
|
905 |
|
906 TCursorSelection iCurSelCur; |
|
907 |
|
908 TPluginSync iSyncType; |
|
909 |
|
910 HBufC* iIcfDataBuf; |
|
911 |
|
912 RPointerArray<HBufC> iCandidateList; |
|
913 TInt iCandidateIndex; |
|
914 |
|
915 TFepInputCandidateList iSendList; |
|
916 TFepInputAllCandidates iSendAllList; |
|
917 |
|
918 TBool iMatchState; |
|
919 |
|
920 TInt iIndicatorImgID; |
|
921 CAknFepUiSpellContainer* iSpell; |
|
922 |
|
923 TBool iSpellOn; |
|
924 |
|
925 TCursorSelection iCursorSel; |
|
926 |
|
927 TInt iIndicatorTextID; |
|
928 |
|
929 TBool iCaseUpdatesSupressed; |
|
930 |
|
931 TBool iBeforeSpell; |
|
932 |
|
933 HBufC* iSpellText; |
|
934 |
|
935 TSpellCBA iSpellCba; |
|
936 TBool iPenUiDimmed; |
|
937 TBool iIsForeground; |
|
938 |
|
939 TInt iPreDocumentLengthForFep; |
|
940 TInt iOpenPenUiFlag; |
|
941 |
|
942 TBool iPluginNativeRange; |
|
943 |
|
944 TBool iSyncWithPluginRange; |
|
945 |
|
946 RArray<TInt> iOpenWindowList; |
|
947 TInt iLastFocusedWin; |
|
948 |
|
949 HBufC* iLastEditorContentBuf; |
|
950 |
|
951 TBool iModeChanged; |
|
952 |
|
953 TInt iPreviousCoseMode; |
|
954 |
|
955 TBool iLaunchMenu; |
|
956 TBool iInMenu; // need to check whether it can be replaced by iLaunchMenu |
|
957 MCoeFepAwareTextEditor* iCurEditor; |
|
958 MCoeFepAwareTextEditor* iOldFepAwareEditor; |
|
959 |
|
960 RDrawableWindow * iLastDataQueryWin; |
|
961 |
|
962 TInt iDefaultOrientation; |
|
963 RBuf iEventData; |
|
964 TBool iDisableSyncText; |
|
965 TBool iPendingSyncReq; |
|
966 TBool iHasSWEventCap; |
|
967 TInt iCurPermitModes; |
|
968 TBool isLanuchSCT; |
|
969 TBool iInGlobleNoteEditor; |
|
970 TBool iOrientationChanged; |
|
971 TBool iInlineStateOn; |
|
972 TInt iCharStartPostion; |
|
973 /** |
|
974 * Cursor Visibility |
|
975 */ |
|
976 TInt iEditorPriority; |
|
977 TBool iDimGainForeground; |
|
978 TBool iEnableIndicatorBtn; |
|
979 TBool iEnableSettingBtn; |
|
980 TBool iEnableArrowBtn; |
|
981 TBool iCursorVisibility; |
|
982 TBool iForegroundChange; |
|
983 TBool iResourceChange; |
|
984 |
|
985 TBool iLaunchHelp; |
|
986 TInt iCurPermittedModes; |
|
987 MCoeFepAwareTextEditor* iMfne; |
|
988 TBool iMfneChanged; |
|
989 TBool iIsInEditWordQueryDlg; |
|
990 |
|
991 TBool iPreferredUiMode; |
|
992 |
|
993 CRepository* iAvkonRepository; |
|
994 |
|
995 TBool iClosePluginInputMode; |
|
996 |
|
997 TBool iOrientationChangedfromUI; |
|
998 |
|
999 CPenInputGSInterface* iGsInterface; |
|
1000 RBuf iPreCaption; |
|
1001 TBool iIsPassWord; |
|
1002 |
|
1003 /** |
|
1004 * Store the last keyboard layout. |
|
1005 */ |
|
1006 TInt iLastKeyboardLayout; |
|
1007 |
|
1008 |
|
1009 /** |
|
1010 * Indicate if predictive setting dialog opened. |
|
1011 */ |
|
1012 TBool iITISettingDialogOpen; |
|
1013 |
|
1014 /** |
|
1015 * Indicate if current input mode is qwerty mode. |
|
1016 */ |
|
1017 TBool iIsITIConfigured; |
|
1018 |
|
1019 /** |
|
1020 * Indicate if tooltip on FSQ is opened |
|
1021 */ |
|
1022 TBool iTooltipOpenOnFSQ; |
|
1023 |
|
1024 // Modify for bug ELZG-7WZC35 begin |
|
1025 TInt iAlignment; |
|
1026 // Modify for bug ELZG-7WZC35 end |
|
1027 |
|
1028 CConnectAo* iConnectAo; |
|
1029 }; |
|
1030 |
|
1031 class CConnectAo : public CActive |
|
1032 { |
|
1033 public: |
|
1034 |
|
1035 CConnectAo(CAknFepPluginManager* aClient); |
|
1036 |
|
1037 /** |
|
1038 * From CActive |
|
1039 * will be called when stroke timer ends |
|
1040 * |
|
1041 * @since S60 v4.0 |
|
1042 */ |
|
1043 void RunL(); |
|
1044 |
|
1045 /** |
|
1046 * From CActive |
|
1047 * will be called if RunL leaves |
|
1048 * |
|
1049 * @since S60 v4.0 |
|
1050 */ |
|
1051 TInt RunError(TInt aError); |
|
1052 |
|
1053 /** |
|
1054 * From CActive |
|
1055 * will be called when stroke timer has been cancelled |
|
1056 * |
|
1057 * @since S60 v4.0 |
|
1058 */ |
|
1059 void DoCancel(); |
|
1060 void RequestConnect(); |
|
1061 TRequestStatus& RequestStatus(); |
|
1062 |
|
1063 CAknFepPluginManager* iClient; |
|
1064 }; |
|
1065 |
|
1066 |
|
1067 // --------------------------------------------------------------------------- |
|
1068 // CAknFepPluginManager::CurrentPluginInputFepUI |
|
1069 // (other items were commented in a header) |
|
1070 // --------------------------------------------------------------------------- |
|
1071 // |
|
1072 inline MAknFepManagerInterface* CAknFepPluginManager::CurrentPluginInputFepUI() |
|
1073 { |
|
1074 return iCurrentPluginInputFepUI; |
|
1075 } |
|
1076 |
|
1077 inline TBool CAknFepPluginManager::PluginNativeRange() |
|
1078 { |
|
1079 return iPluginNativeRange; |
|
1080 } |
|
1081 |
|
1082 inline TBool CAknFepPluginManager::SyncWithPluginRange() |
|
1083 { |
|
1084 return iSyncWithPluginRange; |
|
1085 } |
|
1086 |
|
1087 inline void CAknFepPluginManager::SetPluginNativeRange( TBool aPluginNativeRange ) |
|
1088 { |
|
1089 iPluginNativeRange = aPluginNativeRange; |
|
1090 } |
|
1091 |
|
1092 inline RPointerArray<HBufC>& CAknFepPluginManager::MatchCandidateList() |
|
1093 { |
|
1094 return iCandidateList; |
|
1095 } |
|
1096 |
|
1097 inline TBool CAknFepPluginManager::IsMatchState() |
|
1098 { |
|
1099 return iMatchState; |
|
1100 } |
|
1101 |
|
1102 inline TBool CAknFepPluginManager::IsSpellVisible() |
|
1103 { |
|
1104 return iSpellOn; |
|
1105 } |
|
1106 |
|
1107 inline void CAknFepPluginManager::SetCursorSelection(TCursorSelection& aCursorSel) |
|
1108 { |
|
1109 iCursorSel = aCursorSel; |
|
1110 } |
|
1111 |
|
1112 inline TCursorSelection CAknFepPluginManager::CursorSelection() |
|
1113 { |
|
1114 return iCursorSel; |
|
1115 } |
|
1116 |
|
1117 inline void CAknFepPluginManager::SetCaseUpdatesSupressed(TBool aCaseUpdatesSupressed) |
|
1118 { |
|
1119 iCaseUpdatesSupressed = aCaseUpdatesSupressed; |
|
1120 } |
|
1121 |
|
1122 inline TBool CAknFepPluginManager::CaseUpdatesSupressed() |
|
1123 { |
|
1124 return iCaseUpdatesSupressed; |
|
1125 } |
|
1126 |
|
1127 inline void CAknFepPluginManager::SetBeforeSpell(TBool aBeforeSpell) |
|
1128 { |
|
1129 iBeforeSpell = aBeforeSpell; |
|
1130 } |
|
1131 |
|
1132 inline TBool CAknFepPluginManager::BeforeSpell() |
|
1133 { |
|
1134 return iBeforeSpell; |
|
1135 } |
|
1136 |
|
1137 inline HBufC* CAknFepPluginManager::GetSpellText() |
|
1138 { |
|
1139 return iSpellText; |
|
1140 } |
|
1141 |
|
1142 inline void CAknFepPluginManager::SpellText(HBufC* aSpellText) |
|
1143 { |
|
1144 if (aSpellText) |
|
1145 { |
|
1146 delete iSpellText; |
|
1147 iSpellText = aSpellText->Alloc(); |
|
1148 } |
|
1149 else |
|
1150 { |
|
1151 delete iSpellText; |
|
1152 iSpellText = NULL; |
|
1153 } |
|
1154 } |
|
1155 |
|
1156 inline TBool CAknFepPluginManager::IsNonLatinLanguage(TLanguage aLang) |
|
1157 { |
|
1158 return (aLang == ELangRussian) || (aLang == ELangBulgarian ) || |
|
1159 (aLang == ELangUkrainian) || (aLang == ELangUrdu ) || |
|
1160 (aLang == ELangVietnamese) || (aLang == ELangThai ) || |
|
1161 (aLang == ELangArabic) || (aLang == ELangFarsi ) || |
|
1162 (aLang == ELangHebrew) ; |
|
1163 } |
|
1164 |
|
1165 inline TInt CAknFepPluginManager::PreviousPermitMode() |
|
1166 { |
|
1167 return iCurPermitModes; |
|
1168 } |
|
1169 inline void CAknFepPluginManager::SetInEditWordQueryFlag(TBool aIsEditWordQueryDlg ) |
|
1170 { |
|
1171 iIsInEditWordQueryDlg = aIsEditWordQueryDlg; |
|
1172 } |
|
1173 |
|
1174 inline TBool CAknFepPluginManager::IsInGlobleNoteEditor() |
|
1175 { |
|
1176 return iInGlobleNoteEditor; |
|
1177 } |
|
1178 |
|
1179 inline void CAknFepPluginManager::ITISettingDialogOpen( TBool aOpen ) |
|
1180 { |
|
1181 iITISettingDialogOpen = aOpen; |
|
1182 } |
|
1183 |
|
1184 inline TBool CAknFepPluginManager::IsTooltipOpenOnFSQ() |
|
1185 { |
|
1186 return iTooltipOpenOnFSQ; |
|
1187 } |
|
1188 #endif //RD_SCALABLE_UI_V2 |
|
1189 |
|
1190 #endif // __AKN_FEP_PLUGIN_MANAGER__ |
|
1191 |
|
1192 // End of file |