author | andy simpson <andrews@symbian.org> |
Fri, 22 Oct 2010 15:38:27 +0100 | |
branch | RCL_3 |
changeset 57 | 9eb76adaa71f |
parent 56 | 8152b1f1763a |
permissions | -rw-r--r-- |
44 | 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: split itu-t layout |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef C_SPLITITUTUILAYOUT_H |
|
20 |
#define C_SPLITITUTUILAYOUT_H |
|
21 |
||
22 |
#include <peninputlayout.h> |
|
23 |
#include <peninputpluginutils.h> |
|
24 |
//#include <peninputinputcontextfield.h> |
|
25 |
||
26 |
#include <peninputlayoutvkb.h> |
|
27 |
||
28 |
#include "peninputsplititutpropertysubscriber.h" |
|
29 |
#include "peninputsplititutlayoutcontext.h" |
|
30 |
||
31 |
class CAknFepCtrlButton; |
|
32 |
class CAknFepCtrlRepeatButton; |
|
33 |
class CAknFepCtrlRawKeyButton; |
|
34 |
class CSplitItutDataMgr; |
|
35 |
//class CFepCtrlDropdownList; |
|
36 |
class CSplitItutUiMgrBase; |
|
37 |
class CAknFepCtrlCommonButton; |
|
38 |
class CAknFepCtrlCommonBgCtrl; |
|
39 |
class CAknFepCtrlRepeatButtonEx; |
|
40 |
||
41 |
class CSplitItutWindowManager; |
|
42 |
class CSplitItutUiLayout : public CFepUiLayout, |
|
43 |
public MSplitItutLayoutContext |
|
44 |
{ |
|
45 |
public: |
|
46 |
/** |
|
47 |
* Symbian constructor. |
|
48 |
* |
|
49 |
* @since S60 v5.0 |
|
50 |
* @return Pointer to created object. |
|
51 |
*/ |
|
52 |
static CSplitItutUiLayout* NewL(MLayoutOwner* aLayoutOwner,const TAny* aInitData); |
|
53 |
||
54 |
/** |
|
55 |
* standard c++ destructor. |
|
56 |
* |
|
57 |
* @since S60 v5.0 |
|
58 |
* @return None |
|
59 |
*/ |
|
60 |
~CSplitItutUiLayout(); |
|
61 |
||
62 |
/** |
|
63 |
* Process text update |
|
64 |
* |
|
65 |
* @since S60 v5.0 |
|
66 |
* @param aData context data |
|
67 |
* @return TInt |
|
68 |
*/ |
|
69 |
TInt OnAppEditorTextComing(const TFepInputContextFieldData& aData); |
|
70 |
||
71 |
/** |
|
72 |
* handle control event |
|
73 |
* |
|
74 |
* @since S60 v5.0 |
|
75 |
* @param aEventType event type |
|
76 |
* @param aCtrl control pointer |
|
77 |
* @param aEventData event data |
|
78 |
* @return None |
|
79 |
*/ |
|
80 |
void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData); |
|
81 |
||
82 |
/** |
|
83 |
* handle command |
|
84 |
* |
|
85 |
* @since S60 v5.0 |
|
86 |
* @param aCmd command |
|
87 |
* @param aData |
|
88 |
* @return TInt |
|
89 |
*/ |
|
90 |
TInt HandleCommand(TInt aCmd, TUint8* aData) ; |
|
91 |
||
92 |
/** |
|
93 |
* get pen input type |
|
94 |
* |
|
95 |
* @since S60 v5.0 |
|
96 |
* @return pen input type |
|
97 |
*/ |
|
98 |
TInt PenInputType(); |
|
99 |
||
100 |
/** |
|
101 |
* handle size change |
|
102 |
* |
|
103 |
* @since S60 v5.0 |
|
104 |
* @param pData |
|
105 |
* @return TInt |
|
106 |
*/ |
|
107 |
TInt SizeChanged(const TAny* pData); |
|
108 |
||
109 |
/** |
|
110 |
* get control pointer |
|
111 |
* |
|
112 |
* @since S60 v5.0 |
|
113 |
* @param aCtrlId |
|
114 |
* @return control pointer |
|
115 |
*/ |
|
116 |
CFepUiBaseCtrl* Control(TInt aCtrlId); |
|
117 |
||
118 |
/** |
|
119 |
* get UI layout |
|
120 |
* |
|
121 |
* @since S60 v5.0 |
|
122 |
* @return UI layout |
|
123 |
*/ |
|
124 |
CFepUiLayout* UiLayout(); |
|
125 |
||
126 |
/** |
|
127 |
* get submit text |
|
128 |
* |
|
129 |
* @since S60 v5.0 |
|
130 |
* @param aEventData |
|
131 |
* @return None |
|
132 |
*/ |
|
133 |
void SubmitText(const TDesC& aEventData); |
|
134 |
||
135 |
/** |
|
136 |
* get UI layout |
|
137 |
* |
|
138 |
* @since S60 v5.0 |
|
139 |
* @return UI manager |
|
140 |
*/ |
|
141 |
CSplitItutUiMgrBase* UiMgr(); |
|
142 |
||
143 |
/** |
|
144 |
* handle deactivate |
|
145 |
* |
|
146 |
* @since S60 v5.0 |
|
147 |
* @return None |
|
148 |
*/ |
|
149 |
void OnDeActivate(); |
|
150 |
||
151 |
/** |
|
152 |
* handle activate |
|
153 |
* |
|
154 |
* @since S60 v5.0 |
|
155 |
* @return None |
|
156 |
*/ |
|
157 |
void OnActivate(); |
|
158 |
||
159 |
/** |
|
160 |
* get data manager |
|
161 |
* |
|
162 |
* @since S60 v5.0 |
|
163 |
* @return data mgr |
|
164 |
*/ |
|
165 |
inline CSplitItutDataMgr* DataMgr(); |
|
166 |
||
167 |
/** |
|
168 |
* get data manager |
|
169 |
* |
|
170 |
* @since S60 v5.0 |
|
171 |
* @return data mgr |
|
172 |
*/ |
|
173 |
inline TBool IsSecretEdtior(); |
|
174 |
||
175 |
/** |
|
176 |
* handle app info change |
|
177 |
* |
|
178 |
* @since S60 v5.0 |
|
179 |
* @return None |
|
180 |
*/ |
|
181 |
void HandleAppInfoChange(const TDesC& aInfo, TPeninputAppInfo aType); |
|
182 |
||
183 |
/** |
|
184 |
* show/hide arrow button |
|
185 |
* |
|
186 |
* @since S60 v5.0 |
|
187 |
* @param aShowFlag |
|
188 |
* @return None |
|
189 |
*/ |
|
190 |
void ShowArrowBtn(TInt aShowFlag); |
|
191 |
||
192 |
/** |
|
193 |
* apply laf data |
|
194 |
* |
|
195 |
* @since S60 v5.0 |
|
196 |
* @param aResolutionChange |
|
197 |
* @return None |
|
198 |
*/ |
|
199 |
void ApplyVariantLafDataL(TBool aResolutionChange = EFalse); |
|
200 |
/** |
|
201 |
* apply spell modelaf data |
|
202 |
* |
|
203 |
* @since S60 v5.0 |
|
204 |
* @return None |
|
205 |
*/ |
|
206 |
void ApplyVariantLafDataForSpellL(); |
|
207 |
||
208 |
||
209 |
/** |
|
210 |
* get ui manager |
|
211 |
* |
|
212 |
* @since S60 v5.0 |
|
213 |
* @return ui mgr |
|
214 |
*/ |
|
215 |
CSplitItutWindowManager* UiManager(); |
|
216 |
||
217 |
/** |
|
218 |
* apply laf data |
|
219 |
* |
|
220 |
* @since S60 v5.0 |
|
221 |
* @param aScanCode |
|
222 |
* @param aType |
|
223 |
* @return None |
|
224 |
*/ |
|
225 |
void SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType); |
|
226 |
||
227 |
/** |
|
228 |
* set input language |
|
229 |
* |
|
230 |
* @since S60 v5.0 |
|
231 |
* @param aLanguage |
|
232 |
* @return None |
|
233 |
*/ |
|
234 |
void SetInputLanguageL(TInt aLanguage); |
|
235 |
||
236 |
/** |
|
237 |
* set latin only flag |
|
238 |
* |
|
239 |
* @since S60 v5.0 |
|
240 |
* @param aLatinOnly |
|
241 |
* @return None |
|
242 |
*/ |
|
243 |
void SetLatinOnly( TBool aLatinOnly ); |
|
244 |
||
245 |
private: |
|
246 |
/** |
|
247 |
* C++ constructor |
|
248 |
* |
|
249 |
* @since S60 v5.0 |
|
250 |
* @return None |
|
251 |
*/ |
|
252 |
CSplitItutUiLayout(MLayoutOwner* aLayoutOwner); |
|
253 |
||
254 |
/** |
|
255 |
* Symbian second-phase constructor |
|
256 |
* |
|
257 |
* @since S60 v5.0 |
|
258 |
* @return None |
|
259 |
*/ |
|
260 |
void ConstructL(const TAny* aInitData); |
|
261 |
||
262 |
/** |
|
263 |
* create dropdownlist |
|
264 |
* |
|
265 |
* @since S60 v5.0 |
|
266 |
* @return None |
|
267 |
*/ |
|
268 |
// void CreateDropdownListL(); |
|
269 |
||
270 |
/** |
|
271 |
* create dropdownlist |
|
272 |
* |
|
273 |
* @since S60 v5.0 |
|
274 |
* @return None |
|
275 |
*/ |
|
276 |
TInt OnSkinChange(); |
|
277 |
||
278 |
/** |
|
279 |
* is press on control |
|
280 |
* |
|
281 |
* @since S60 v5.0 |
|
282 |
* @param aPt |
|
283 |
* @return TBool |
|
284 |
*/ |
|
285 |
TBool PressOnCtrls(TPoint aPt); |
|
286 |
||
287 |
/** |
|
288 |
* set input mode |
|
289 |
* |
|
290 |
* @since S60 v5.0 |
|
291 |
* @param aMode |
|
292 |
* @return None |
|
293 |
*/ |
|
294 |
void SetInputModeL(TInt aMode); |
|
295 |
||
296 |
/** |
|
297 |
* set input mode |
|
298 |
* |
|
299 |
* @since S60 v5.0 |
|
300 |
* @param aMode |
|
301 |
* @return None |
|
302 |
*/ |
|
303 |
void SetCtrlRect(CFepUiBaseCtrl* aCtrl, TInt aRectIdx); |
|
304 |
||
305 |
/** |
|
306 |
* get chinese ui mgr |
|
307 |
* |
|
308 |
* @since S60 v5.0 |
|
309 |
* @return chinese ui mgr |
|
310 |
*/ |
|
311 |
CSplitItutUiMgrBase* ChineseUiManager(); |
|
56
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
312 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
313 |
/** |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
314 |
* Handle show candidate list command |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
315 |
* |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
316 |
* |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
317 |
* @aData pointer is sent from FEP, point to a TPtrC |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
318 |
* @return None |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
319 |
*/ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
320 |
void HandleShowMatchListCmdL( TUint8* aData ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
321 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
322 |
/** |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
323 |
* Read text stored in a block of memory into HBufC |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
324 |
* |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
325 |
* |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
326 |
* @aData aStartPtr the starting address of a block of memory with a string in it |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
327 |
* @aLength The length of the string |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
328 |
* @return pointer of a HBufC storing the string in it |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
329 |
*/ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
330 |
HBufC* ReadTextInfoHBufCL( TUint16* aStartPtr, TInt aLength ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
331 |
|
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
332 |
/** |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
333 |
* Handle select candidate list item command |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
334 |
* |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
335 |
* |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
336 |
* @aData pointer is sent from FEP, point to a TPtrC |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
337 |
* @return None |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
338 |
*/ |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
339 |
void HandleSelectServerCandItemL( TUint8* aData ); |
8152b1f1763a
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
340 |
|
44 | 341 |
private: |
342 |
/** |
|
343 |
* data manager. |
|
344 |
* own |
|
345 |
*/ |
|
346 |
CSplitItutDataMgr* iDataMgr; |
|
347 |
||
348 |
/** |
|
349 |
* Chinese UI manager. |
|
350 |
* own |
|
351 |
*/ |
|
352 |
CSplitItutUiMgrBase* iChnUiMgr; |
|
353 |
||
354 |
/** |
|
355 |
* Western UI manager. |
|
356 |
* own |
|
357 |
*/ |
|
358 |
CSplitItutUiMgrBase* iWesternUiMgr; |
|
359 |
||
360 |
/** |
|
361 |
* Current UI manager. |
|
362 |
* own |
|
363 |
*/ |
|
364 |
CSplitItutUiMgrBase* iCurrentUiMgr; |
|
365 |
||
366 |
/** |
|
367 |
* is secret flag. |
|
368 |
*/ |
|
369 |
TBool iIsSecret; |
|
370 |
||
371 |
/** |
|
372 |
* window manager. |
|
373 |
* own |
|
374 |
*/ |
|
375 |
CSplitItutWindowManager* iWindowMgr; |
|
376 |
}; |
|
377 |
||
378 |
// --------------------------------------------------------------------------- |
|
379 |
// CSplitItutUiLayout::DataMgr |
|
380 |
// --------------------------------------------------------------------------- |
|
381 |
// |
|
382 |
inline CSplitItutDataMgr* CSplitItutUiLayout::DataMgr() |
|
383 |
{ |
|
384 |
return iDataMgr; |
|
385 |
} |
|
386 |
||
387 |
// --------------------------------------------------------------------------- |
|
388 |
// CSplitItutUiLayout::IsSecretEdtior |
|
389 |
// --------------------------------------------------------------------------- |
|
390 |
// |
|
391 |
inline TBool CSplitItutUiLayout::IsSecretEdtior() |
|
392 |
{ |
|
393 |
return iIsSecret; |
|
394 |
} |
|
395 |
||
396 |
#endif //C_SPLITITUTUILAYOUT_H |