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