|
1 /* |
|
2 * Copyright (c) 2002-2005 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: drop-down list control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_SPLITITUTWINDOWMANAGER_H |
|
20 #define C_SPLITITUTWINDOWMANAGER_H |
|
21 |
|
22 #include <peninputlayout.h> |
|
23 #include <peninputpluginutils.h> |
|
24 #include <peninputinputcontextfield.h> |
|
25 |
|
26 #include <peninputlayoutvkb.h> |
|
27 #include "peninputsplititutlayout.h" |
|
28 #include "peninputsplititutpropertysubscriber.h" |
|
29 #include "peninputsplititutlayoutcontext.h" |
|
30 |
|
31 class CSplitItutWindow; |
|
32 |
|
33 |
|
34 /** |
|
35 * class CSplitItutWindowManager. |
|
36 * |
|
37 * Split itu-t window manager class. |
|
38 * |
|
39 * @lib peninputsplititut.lib |
|
40 * @since S60 v5.0 |
|
41 */ |
|
42 class CSplitItutWindowManager : public CBase, |
|
43 public MItutPropertySubscriber |
|
44 { |
|
45 public: |
|
46 /** |
|
47 * Symbian constructor. |
|
48 * |
|
49 * @since S60 5.0 |
|
50 * |
|
51 * @param aLayoutOwner The MLayoutOwner |
|
52 * @param iDataMgr The data mgr |
|
53 * @return Pointer to created CSplitItutWindowManager object |
|
54 */ |
|
55 static CSplitItutWindowManager* NewL( CSplitItutUiLayout* aLayoutOwner, |
|
56 CSplitItutDataMgr* iDataMgr); |
|
57 |
|
58 /** |
|
59 * standard c++ destructor. |
|
60 * |
|
61 * @since S60 5.0 |
|
62 * @return none |
|
63 */ |
|
64 ~CSplitItutWindowManager(); |
|
65 |
|
66 /** |
|
67 * Process text update |
|
68 * |
|
69 * @since S60 v5.0 |
|
70 * @param aData context data |
|
71 * @return TInt |
|
72 */ |
|
73 TInt OnAppEditorTextComing(const TFepInputContextFieldData& aData); |
|
74 |
|
75 /** |
|
76 * Handle control event |
|
77 * |
|
78 * @since Series 60 5.0 |
|
79 * @param aEventType |
|
80 * @param aCtrl |
|
81 * @param aEventData |
|
82 * @return None |
|
83 */ |
|
84 void HandleCtrlEventL( TInt aEventType, |
|
85 CFepUiBaseCtrl* aCtrl, |
|
86 const TDesC& aEventData); |
|
87 |
|
88 /** |
|
89 * Handle command event |
|
90 * |
|
91 * @since Series 60 5.0 |
|
92 * @param aCmd |
|
93 * @param aData |
|
94 * @return TBool |
|
95 */ |
|
96 TBool HandleCommandL(TInt aCmd, TUint8* aData); |
|
97 |
|
98 /** |
|
99 * From MItutPropertySubscriber |
|
100 * Set property |
|
101 * |
|
102 * @since Series 60 5.0 |
|
103 * @param aPropertyName |
|
104 * @param aPropertyValue |
|
105 * @return None |
|
106 */ |
|
107 void SetPropertyL( MItutPropertySubscriber::TItutProperty aPropertyName, |
|
108 const TDesC& aPropertyValue); |
|
109 |
|
110 /** |
|
111 * handle size change |
|
112 * |
|
113 * @since Series 60 5.0 |
|
114 * @return None |
|
115 */ |
|
116 TInt SizeChanged(); |
|
117 |
|
118 /** |
|
119 * Get ui layout pointer |
|
120 * |
|
121 * @since Series 60 5.0 |
|
122 * @return ui layout pointer |
|
123 */ |
|
124 CFepUiLayout* UiLayout(); |
|
125 |
|
126 /** |
|
127 * submit text |
|
128 * |
|
129 * @since Series 60 5.0 |
|
130 * @param aEventData |
|
131 * @return None |
|
132 */ |
|
133 void SubmitText(const TDesC& aEventData); |
|
134 |
|
135 /** |
|
136 * show/hide arrow keys |
|
137 * |
|
138 * @since Series 60 5.0 |
|
139 * @param aShowFlag |
|
140 * @return None |
|
141 */ |
|
142 void ShowArrowBtn(TInt aShowFlag); |
|
143 |
|
144 /** |
|
145 * Handle application change info |
|
146 * |
|
147 * @since Series 60 5.0 |
|
148 * @param aInfo |
|
149 * @return None |
|
150 */ |
|
151 void HandleAppInfoChangeL(const TDesC& aInfo); |
|
152 |
|
153 /** |
|
154 * simulate raw event |
|
155 * |
|
156 * @since Series 60 5.0 |
|
157 * @param aScanCode |
|
158 * @param aType |
|
159 * @return None |
|
160 */ |
|
161 void SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType); |
|
162 |
|
163 /** |
|
164 * handle skin change |
|
165 * |
|
166 * @since Series 60 5.0 |
|
167 * @return None |
|
168 */ |
|
169 TInt OnSkinChange(); |
|
170 |
|
171 /** |
|
172 * set last raw key down |
|
173 * |
|
174 * @since Series 60 5.0 |
|
175 * @param aScanCode |
|
176 * @param aKeyDown |
|
177 * @param aCtrl |
|
178 * @return None |
|
179 */ |
|
180 void SetLastRawKeyDown(TInt aScanCode, TBool aKeyDown, CFepUiBaseCtrl* aCtrl); |
|
181 |
|
182 /** |
|
183 * create chinese specific controls |
|
184 * |
|
185 * @since Series 60 5.0 |
|
186 * @return None |
|
187 */ |
|
188 void CreateChineseSpecificCtrlsIfNeededL(); |
|
189 |
|
190 /** |
|
191 * apply variant laf data |
|
192 * |
|
193 * @since Series 60 5.0 |
|
194 * @param aResolutionChange |
|
195 * @return None |
|
196 */ |
|
197 void ApplyVariantLafDataL(TBool aResolutionChange); |
|
198 |
|
199 /** |
|
200 * apply spell variant laf data |
|
201 * |
|
202 * @since S60 5.0 |
|
203 * @return None |
|
204 */ |
|
205 void ApplyVariantLafDataForSpellL(); |
|
206 |
|
207 /** |
|
208 * apply variant laf data |
|
209 * |
|
210 * @since Series 60 5.0 |
|
211 * @param aResolutionChange |
|
212 * @return None |
|
213 */ |
|
214 CFepUiBaseCtrl* Control(TInt aCtrlId); |
|
215 |
|
216 /** |
|
217 * apply variant laf data |
|
218 * |
|
219 * @since Series 60 5.0 |
|
220 * @param aResolutionChange |
|
221 * @return None |
|
222 */ |
|
223 void DimArrowKeys( TBool aDimArrow ); |
|
224 |
|
225 /** |
|
226 * show/hide candidate preview bubble |
|
227 * |
|
228 * @since Series 60 5.0 |
|
229 * @param aResolutionChange |
|
230 * @return None |
|
231 */ |
|
232 void ShowBubble(TInt aShow); |
|
233 |
|
234 /** |
|
235 * handle activate |
|
236 * |
|
237 * @since Series 60 5.0 |
|
238 * @return None |
|
239 */ |
|
240 void OnActivate(); |
|
241 |
|
242 /** |
|
243 * get split itut window |
|
244 * |
|
245 * @since Series 60 5.0 |
|
246 * @return split itut window pointer |
|
247 */ |
|
248 inline CSplitItutWindow* Window(); |
|
249 |
|
250 void SetLanguage( TInt aLanguage ); |
|
251 |
|
252 private: |
|
253 /** |
|
254 * C++ constructor |
|
255 * |
|
256 * @since S60 5.0 |
|
257 * @param aLayoutOwner The MLayoutOwner pointer. |
|
258 * @param iDataMgr The data mgr pointer |
|
259 * @return none |
|
260 */ |
|
261 CSplitItutWindowManager( CSplitItutUiLayout* aLayoutOwner, |
|
262 CSplitItutDataMgr* iDataMgr); |
|
263 |
|
264 /** |
|
265 * Symbian second-phase constructor |
|
266 * |
|
267 * @since S60 5.0 |
|
268 * @return none |
|
269 */ |
|
270 void ConstructL(); |
|
271 |
|
272 /** |
|
273 * Set prompt text |
|
274 * |
|
275 * @since S60 5.0 |
|
276 * paran aData |
|
277 * @return none |
|
278 */ |
|
279 void SetPromptTextL( TUint8* aData ); |
|
280 |
|
281 private: |
|
282 /** |
|
283 * The layout owner |
|
284 * Not own |
|
285 */ |
|
286 CSplitItutUiLayout* iLayoutOwner; |
|
287 |
|
288 /** |
|
289 * The layout owner |
|
290 * Own |
|
291 */ |
|
292 CSplitItutWindow* iWindow; |
|
293 |
|
294 /** |
|
295 * The data manager |
|
296 * Not own |
|
297 */ |
|
298 CSplitItutDataMgr* iDataMgr; |
|
299 |
|
300 /** |
|
301 * The candidate preview bubble size |
|
302 */ |
|
303 TAknWindowLineLayout iBubbleSize; |
|
304 |
|
305 /** |
|
306 * The candidate preview bubble text layout |
|
307 */ |
|
308 TAknTextLineLayout iBubbleTextLayout; |
|
309 |
|
310 /** |
|
311 * The rawkey down flag |
|
312 */ |
|
313 TBool iRawKeyDown; |
|
314 |
|
315 /** |
|
316 * The rawkey control |
|
317 * Not own |
|
318 */ |
|
319 CFepUiBaseCtrl* iRawKeyCtrl; |
|
320 |
|
321 /** |
|
322 * The last rawkey down |
|
323 */ |
|
324 TInt iLastRawKeyDown; |
|
325 |
|
326 /** |
|
327 * The in editword query dialog flag |
|
328 */ |
|
329 TBool iInEditWordQueryDlg; |
|
330 |
|
331 /** |
|
332 * The dim operation button flag |
|
333 */ |
|
334 TBool iDimOperationBtn; |
|
335 }; |
|
336 |
|
337 // --------------------------------------------------------------------------- |
|
338 // CSplitItutWindowManager::Window |
|
339 // --------------------------------------------------------------------------- |
|
340 // |
|
341 inline CSplitItutWindow* CSplitItutWindowManager::Window() |
|
342 { |
|
343 return iWindow; |
|
344 } |
|
345 #endif // C_SPLITITUTWINDOWMANAGER_H |