|
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: Declaration of core part of CAknFepLanguageManager class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef __AKN_FEP_LANGUAGE_MANAGER__H__ |
|
30 #define __AKN_FEP_LANGUAGE_MANAGER__H__ |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32base.h> |
|
34 #include <coemain.h> |
|
35 #include <badesca.h> |
|
36 |
|
37 #include "AknFepGlobalEnums.h" // TWidthChar |
|
38 |
|
39 // CONSTANTS |
|
40 |
|
41 // MACROS |
|
42 |
|
43 // DATA TYPES |
|
44 |
|
45 // FUNCTION PROTOTYPES |
|
46 |
|
47 // FORWARD DECLARATION |
|
48 class CAknFepPenInputImePlugin; |
|
49 class MInputMethodInterface; |
|
50 |
|
51 // CLASS DECLARATION |
|
52 class MAknFepManagerInterface; |
|
53 class MAknFepManagerUIInterface; |
|
54 class CAknFepCaseManager; |
|
55 class RPeninputServer; |
|
56 class TImePlguinImplDetail; |
|
57 class CAknFepPluginManager; |
|
58 |
|
59 /** |
|
60 * CAknFepLanguageManager is a part of Japanese FEP. |
|
61 * |
|
62 * @lib AknFep.lib |
|
63 * @since 2.6 |
|
64 * @see CAknFepManager, other application |
|
65 */ |
|
66 class CAknFepLanguageManager : public CBase |
|
67 { |
|
68 private: // enum |
|
69 enum |
|
70 { |
|
71 EUiManWestern, |
|
72 EUiManChinese, |
|
73 EUiManJapanese, |
|
74 EUiManKorean, |
|
75 EUiManMax |
|
76 }; |
|
77 |
|
78 public: // Constructer and Destructor |
|
79 /** |
|
80 * first phase construction |
|
81 * |
|
82 * @since 2.6 |
|
83 * @param aFepMan |
|
84 * @param aCaseMan |
|
85 * @param aLanguage |
|
86 */ |
|
87 static CAknFepLanguageManager* NewL(MAknFepManagerUIInterface* aFepMan, |
|
88 CAknFepCaseManager* aCaseMan); |
|
89 |
|
90 /** |
|
91 * Destructor. |
|
92 * |
|
93 * @since 2.6 |
|
94 */ |
|
95 virtual ~CAknFepLanguageManager(); |
|
96 |
|
97 public: // New Functions |
|
98 /** |
|
99 * get ui manager object. |
|
100 * |
|
101 * @since 2.6 |
|
102 * @param aMode |
|
103 * @param aCharacterWidth |
|
104 * @param aPredictive |
|
105 * @return |
|
106 */ |
|
107 MAknFepManagerInterface* GetFepUI(TInt aMode, TWidthChar aCharacterWidth, TBool aPredictive); |
|
108 |
|
109 /** |
|
110 * set language id to ui manager. |
|
111 * |
|
112 * @since 2.6 |
|
113 * @param aMode |
|
114 * @param aCharacterWidth |
|
115 * @param aPredictive |
|
116 * @return |
|
117 */ |
|
118 void SetInputLanguageL(TInt aInputLanguage); |
|
119 |
|
120 TLanguage InputLanguage() |
|
121 { |
|
122 return (TLanguage)iInputLanguage; |
|
123 } |
|
124 |
|
125 /** |
|
126 * Get plugin UI manager object. |
|
127 * |
|
128 * @since S60 v3.2 |
|
129 * |
|
130 * @param aPreferedMode The prefered plugin input mode. If prefered mode is not available |
|
131 * a substitute choice (according UI sepc) is returned. |
|
132 * @param aPenInputLan Current pen input language. |
|
133 * @param aDisplayLang Current phone display language |
|
134 * @param aPenServer The pen input server object. |
|
135 * @return Plugin UI manager. |
|
136 */ |
|
137 MAknFepManagerInterface* GetPluginInputFepUiL(TPluginInputMode aPreferedMode, |
|
138 TInt aPenInputLang, |
|
139 TInt aDisplayLang, |
|
140 RPeninputServer* aPenServer); |
|
141 |
|
142 /** |
|
143 * Test specified plugin UI mode is support or not |
|
144 * |
|
145 * @since S60 v3.2 |
|
146 * |
|
147 * @param aMode The plugin input mode to test. |
|
148 * @param aPenInputLan Current pen input language. |
|
149 * @param aPenServer The pen input server object. |
|
150 * @return ETrue if support, EFalse otherwise. |
|
151 */ |
|
152 TBool IsPluginInputAvaiable(TPluginInputMode aMode, |
|
153 TInt aPenInputLang, |
|
154 RPeninputServer* aPenServer); |
|
155 |
|
156 /** |
|
157 * Set split view flag |
|
158 * |
|
159 * @since S60 v3.2 |
|
160 * |
|
161 * @param aIsSplitView |
|
162 * @return None |
|
163 */ |
|
164 void SetSplitView(TBool aIsSplitView); |
|
165 |
|
166 /** |
|
167 * Get current IME plugin object. |
|
168 * |
|
169 * @since S60 v3.2 |
|
170 * |
|
171 * @return IME Plugin object. |
|
172 */ |
|
173 inline CAknFepPenInputImePlugin* CurrentImePlugin(); |
|
174 |
|
175 /** |
|
176 * Get split view flag |
|
177 * |
|
178 * |
|
179 * @since S60 v3.2 |
|
180 * @return ETrue if split view flag is set |
|
181 */ |
|
182 inline TBool IsSplitView(); |
|
183 |
|
184 private: // New Functions |
|
185 /** |
|
186 * private c++ constructor. |
|
187 * |
|
188 * @since 2.6 |
|
189 */ |
|
190 CAknFepLanguageManager(MAknFepManagerUIInterface* aFepManager, |
|
191 CAknFepCaseManager* aCaseManager); |
|
192 |
|
193 /** |
|
194 * Second phase construction |
|
195 * |
|
196 * @since 2.6 |
|
197 */ |
|
198 void ConstructL(); |
|
199 |
|
200 void ConstructUiManagerL(); |
|
201 |
|
202 TInt UiManagerId(); |
|
203 |
|
204 |
|
205 |
|
206 /** |
|
207 * Activate IME plugin by implemenation. |
|
208 * If current IME plugin's impl id is equal to aImeImplId, then current |
|
209 * IME plugin object is returned. |
|
210 * |
|
211 * @since S60 v3.2 |
|
212 * |
|
213 * @param aImeImplId The IME implementation ID. |
|
214 * @param aPenServer The pen input server object. |
|
215 * @return IME Plugin imeplementation ID. |
|
216 */ |
|
217 CAknFepPenInputImePlugin* ActivateImePlugin(TInt aImeImplId, RPeninputServer* aPenServer); |
|
218 |
|
219 /** |
|
220 * Activate IME plugin's UI by mode. |
|
221 * |
|
222 * @since S60 v3.2 |
|
223 * |
|
224 * @param aImePlugin The IME plugin object. |
|
225 * @param aMode The mode of layout UI. |
|
226 * @return The Plugin UI interface. |
|
227 */ |
|
228 MAknFepManagerInterface* ActivateLayoutUiPluginL(CAknFepPenInputImePlugin* aImePlugin, |
|
229 TInt aPenInputLang, |
|
230 TPluginInputMode aMode); |
|
231 |
|
232 TBool IsPluginInputAvaiableL(TPluginInputMode aMode, |
|
233 TInt aPenInputLang, |
|
234 RPeninputServer* aPenServer); |
|
235 |
|
236 |
|
237 private: // Data |
|
238 CArrayPtr<MAknFepManagerInterface>* iUiManArray; |
|
239 TInt iInputLanguage; |
|
240 MAknFepManagerUIInterface* iFepManager; |
|
241 CAknFepCaseManager* iCaseManager; |
|
242 CAknFepPluginManager* iPluginManager; |
|
243 |
|
244 /** |
|
245 * Current IME plugin object. Own. |
|
246 * @since S60 v3.2 |
|
247 */ |
|
248 CAknFepPenInputImePlugin* iCurImePlugin; |
|
249 |
|
250 /** |
|
251 * Current layout UI object. Not own. |
|
252 * @since S60 v3.2 |
|
253 */ |
|
254 MAknFepManagerInterface* iCurUiPlugIn; |
|
255 |
|
256 /** |
|
257 * Is split view flag |
|
258 * @since S60 v3.2 |
|
259 */ |
|
260 TBool iIsSplitView; |
|
261 }; |
|
262 |
|
263 inline CAknFepPenInputImePlugin* CAknFepLanguageManager::CurrentImePlugin() |
|
264 { |
|
265 return iCurImePlugin; |
|
266 } |
|
267 |
|
268 inline TBool CAknFepLanguageManager::IsSplitView() |
|
269 { |
|
270 return iIsSplitView; |
|
271 } |
|
272 |
|
273 #endif // __AKN_FEP_LANGUAGE_MANAGER__H__ |
|
274 // End of file |