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();
|
|
312 |
|
|
313 |
private:
|
|
314 |
/**
|
|
315 |
* data manager.
|
|
316 |
* own
|
|
317 |
*/
|
|
318 |
CSplitItutDataMgr* iDataMgr;
|
|
319 |
|
|
320 |
/**
|
|
321 |
* Chinese UI manager.
|
|
322 |
* own
|
|
323 |
*/
|
|
324 |
CSplitItutUiMgrBase* iChnUiMgr;
|
|
325 |
|
|
326 |
/**
|
|
327 |
* Western UI manager.
|
|
328 |
* own
|
|
329 |
*/
|
|
330 |
CSplitItutUiMgrBase* iWesternUiMgr;
|
|
331 |
|
|
332 |
/**
|
|
333 |
* Current UI manager.
|
|
334 |
* own
|
|
335 |
*/
|
|
336 |
CSplitItutUiMgrBase* iCurrentUiMgr;
|
|
337 |
|
|
338 |
/**
|
|
339 |
* is secret flag.
|
|
340 |
*/
|
|
341 |
TBool iIsSecret;
|
|
342 |
|
|
343 |
/**
|
|
344 |
* window manager.
|
|
345 |
* own
|
|
346 |
*/
|
|
347 |
CSplitItutWindowManager* iWindowMgr;
|
|
348 |
};
|
|
349 |
|
|
350 |
// ---------------------------------------------------------------------------
|
|
351 |
// CSplitItutUiLayout::DataMgr
|
|
352 |
// ---------------------------------------------------------------------------
|
|
353 |
//
|
|
354 |
inline CSplitItutDataMgr* CSplitItutUiLayout::DataMgr()
|
|
355 |
{
|
|
356 |
return iDataMgr;
|
|
357 |
}
|
|
358 |
|
|
359 |
// ---------------------------------------------------------------------------
|
|
360 |
// CSplitItutUiLayout::IsSecretEdtior
|
|
361 |
// ---------------------------------------------------------------------------
|
|
362 |
//
|
|
363 |
inline TBool CSplitItutUiLayout::IsSecretEdtior()
|
|
364 |
{
|
|
365 |
return iIsSecret;
|
|
366 |
}
|
|
367 |
|
|
368 |
#endif //C_SPLITITUTUILAYOUT_H
|