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