1 /* |
|
2 * Copyright (c) 2007 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 * Avkon implementation of the FEP's UI component access |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef AKNFEPUIAVKONIMPL_H |
|
30 #define AKNFEPUIAVKONIMPL_H |
|
31 |
|
32 #include "aknfepuiinterface.h" |
|
33 #include "AknFepUiAvkonMenus.h" |
|
34 #include <eikmobs.h> |
|
35 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
36 #include <e32property.h> |
|
37 #endif |
|
38 |
|
39 class CEikButtonGroupContainer; |
|
40 class CAknCharMapDialog; |
|
41 class CEikDialog; |
|
42 class CAknFepPredictiveSettingDialog; |
|
43 class CAknListQueryDialog; |
|
44 class CAknFepTextQueryDialog; |
|
45 |
|
46 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
47 class CRepository; |
|
48 #endif |
|
49 |
|
50 class CAknFepUIAvkonImpl : public CAknFepUIInterface, public MEikMenuObserver |
|
51 { |
|
52 private: |
|
53 void ConstructL(); |
|
54 public: |
|
55 static CAknFepUIAvkonImpl* NewL(); |
|
56 ~CAknFepUIAvkonImpl(); |
|
57 CAknFepUIAvkonImpl(); |
|
58 public: // menu abstraction |
|
59 void SetFepMenuObserver(MAknFepUiInterfaceMenuObserver* aObserver); |
|
60 CAknFepUiInterfaceMenuBar* EditorStateMenuBar(CAknEdwinState* aEditorState); |
|
61 CAknFepUiInterfaceMenuBar* NewMenuBarL(MAknFepUiInterfaceMenuObserver* aObserver, TInt aHotKeyResourceId, TInt aMenuTitleResourceId); |
|
62 CAknFepUiInterfaceMenuBar* ObjectProviderMenuBar(MObjectProvider* aObjectProvider); |
|
63 |
|
64 public: // stylus pop-up menu abstraction |
|
65 CAknFepUiInterfaceStylusPopUpMenu* NewStylusPopUpMenuL(MAknFepUiInterfaceMenuObserver* aObserver, const TPoint& aPoint); |
|
66 |
|
67 public: // indicator abstraction |
|
68 virtual CAknFepIndicator* NewIndicatorL(); |
|
69 |
|
70 public: // use case abstraction |
|
71 void LaunchConfirmationNoteL(TInt aResourceId); |
|
72 void LaunchHelpTextQueryL(TInt aResourceId); |
|
73 TInt LaunchCangJieOptionDlgL(TInt aResourceId, TInt& aLevel, MDesC16Array* aItems); |
|
74 TInt LaunchListPopupL(TInt aResourceId, TInt& aIndex, TInt aInitialIndex, MDesC16Array* aItems, CArrayPtr<CGulIcon>* aIcons); |
|
75 void UpdateSoftkeysL(TInt aResourceId, CAknEdwinState* aEditorState, MEikCommandObserver* aObserver, TInt aInputMode); |
|
76 TBool SoftkeysExist(); |
|
77 TInt SoftkeyCommandId(TInt aPosition); |
|
78 void DeleteSoftkeys(); |
|
79 void DrawSoftkeysNow(); |
|
80 void CreateSoftkeys(TInt aResourceId, MEikCommandObserver* aObserver); |
|
81 TBool UpdateSoftkeyLabelL(TInt aPosition, TInt aCommandId, TInt aTextResId); |
|
82 TInt CharMapDialogL(TInt aCharCase, TDes& aSpecialChars, TInt aCharSetResourceId, TBool aLockNumericKeys, TBool aShowPictographsFirst, TBool aShowNoPictographs, TBool aShowAnotherTable, TInt aAfterSctChars, TInt aResId, TBool aDisableRecentItemRow ); |
|
83 TInt TextQueryDialogL(TDes& aDataText, CAknEdwinState& aEditorState, TInt aEditorFlag, TInt aResId); |
|
84 CPlainText* PlainText(CAknEdwinState* aEditorState); |
|
85 void UpdateEditorContext(MAknEditingStateIndicator& aIndicator, MAknFepManagerInterface& aManager); |
|
86 |
|
87 void TouchPaneSetFepPenSupportInterface(MAknFepPenSupportInterface* aFepPenSupportInterface); |
|
88 void TouchPaneAllowInputMethodActivation(TBool aValue); |
|
89 void TouchPaneRefreshL(); |
|
90 void TouchPaneSetInputMethodIconActivated(TBool aActivated); |
|
91 |
|
92 TBool IsDisplayDataQuery(TBool aIsFepAwareTextEditor); |
|
93 |
|
94 public: // APAC abstraction |
|
95 MAknFepUICtrlContainerChinese* NewAknFepUICtrlContainerChineseL(); |
|
96 MAknFepUICtrlContainerJapanese* NewAknFepUICtrlContainerJapaneseL(CAknFepUIManagerJapanese* aUiMng); |
|
97 void JapaneseKutenQueryDialogL(TInt aResId, TInt& aCharCode, TInt aTone); |
|
98 |
|
99 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
100 // Predictive QWERTY (XT9) changes ----> |
|
101 public: // candidate words pop-up abstraction |
|
102 MAknFepCandidatePopup* NewCandidatePopupL(MAknFepCandidatePopupCallback& aOwner); |
|
103 |
|
104 public: //bubble implmentation |
|
105 MAknFepUiWordPopupContent* CreateWordPopupContentL(); |
|
106 |
|
107 public: // for predictive setting dialog |
|
108 void LaunchPredictiveSettingDialogL(TInt aDialogResId, |
|
109 TInt aMenuResId, |
|
110 TInt aConfirmationQueryResId, |
|
111 TInt aTitlePaneResId ); |
|
112 #ifdef FF_DUAL_LANGUAGE_SUPPORT |
|
113 void LaunchWritingLanguageSettingDialogL(TInt aDialogResId, TInt aMenuResId, TInt aTitlePaneResId); |
|
114 #endif //FF_DUAL_LANGUAGE_SUPPORT |
|
115 |
|
116 #ifdef __USER_DICTIONARY_EDITING__ |
|
117 //for editing user dictionary |
|
118 void LaunchUserDictEditDialogL(); |
|
119 #endif //__USER_DICTIONARY_EDITING__ |
|
120 |
|
121 // Predictive QWERTY (XT9) changes <---- |
|
122 #endif //RD_INTELLIGENT_TEXT_INPUT |
|
123 void DeleteDialogs(); |
|
124 |
|
125 private: // from MEikMenuObserver |
|
126 void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); |
|
127 void DynInitMenuBarL(TInt aResourceId,CEikMenuBar* aMenuBar); |
|
128 void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis); |
|
129 |
|
130 private: // from MEikCommandObserver |
|
131 void ProcessCommandL(TInt aCommandId); |
|
132 |
|
133 private: |
|
134 /** |
|
135 * Show cba of aResourceId using owns cba object(iCba) |
|
136 * |
|
137 * @since 3.2 |
|
138 * @param aResourceId softkeys resource id. |
|
139 * @return None |
|
140 */ |
|
141 void ShowOwnsSoftkeysL(const TInt aResourceId, MEikCommandObserver* aObserver); |
|
142 |
|
143 /** |
|
144 * This method is that empty softkeys is shown in case aShown is ETrue. |
|
145 * If aShown is EFalse, empty softkeys is erased. |
|
146 * @param aShown If ETrue, empty softkeys is shown. |
|
147 */ |
|
148 void ShowEmptySoftkeysL(TBool aShown, MEikCommandObserver* aObserver, TInt aInputMode); |
|
149 |
|
150 #ifdef RD_INTELLIGENT_TEXT_INPUT |
|
151 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
152 class CSubscriber : public CActive |
|
153 { |
|
154 public: |
|
155 CSubscriber(TCallBack aCallBack, RProperty& aProperty); |
|
156 ~CSubscriber(); |
|
157 |
|
158 public: // New functions |
|
159 void SubscribeL(); |
|
160 void StopSubscribe(); |
|
161 |
|
162 private: // from CActive |
|
163 void RunL(); |
|
164 void DoCancel(); |
|
165 |
|
166 private: |
|
167 TCallBack iCallBack; |
|
168 RProperty& iProperty; |
|
169 }; |
|
170 /** |
|
171 * Call back function to handle a change in keyboard layout. |
|
172 */ |
|
173 static TInt HandleKeyboardLayoutChangeNotification(TAny* aObj); |
|
174 |
|
175 void HandleKeyboardLayoutChange(); |
|
176 |
|
177 CSubscriber* iKeyboardLayoutStatusSubscriber; |
|
178 RProperty iKeyboardLayoutStatusProperty; |
|
179 |
|
180 friend class CSubscriber; |
|
181 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
182 #endif |
|
183 |
|
184 private: |
|
185 CEikButtonGroupContainer* iCba; // own |
|
186 CAknFepUIAvkonMenuPaneImpl iTempMenuPane; |
|
187 CAknFepUIAvkonMenuBarImpl iTempMenuBar; |
|
188 CAknFepUIAvkonMenuBarImpl iEditorMenuBar; |
|
189 CAknFepUIAvkonMenuBarImpl iObjectProviderMenuBar; |
|
190 MAknFepUiInterfaceMenuObserver* iFepMenuObserver; |
|
191 CAknCharMapDialog* iCharMapDialog; |
|
192 CEikDialog* iDialog; |
|
193 CAknFepPredictiveSettingDialog* iPredictiveSettingDialog; |
|
194 CAknListQueryDialog* iListQueryDialog; |
|
195 CAknFepTextQueryDialog* iTextQueryDialog; |
|
196 }; |
|
197 |
|
198 |
|
199 #endif |
|