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