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: Interface of vkb ui state
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef C_CAKNFEPVKBWINDOW_H
|
|
20 |
#define C_CAKNFEPVKBWINDOW_H
|
|
21 |
|
|
22 |
// system includes
|
|
23 |
#include <peninputbasewindowext.h>
|
|
24 |
|
|
25 |
/** class forward decalaration */
|
|
26 |
class CFepUiLayout;
|
|
27 |
class CPeninputCommonChoiceList;
|
|
28 |
class CAknFepVkbClientArea;
|
|
29 |
class MAknFepVkbDataProvider;
|
|
30 |
class CAknFepVkbUiStateMgr;
|
|
31 |
class CAknFepCtrlEventButton;
|
|
32 |
class CFepLayoutMultiLineIcf;
|
|
33 |
class CPeninputLayoutInputmodelChoice;
|
|
34 |
class CPeninputVkbCtrlExt;
|
|
35 |
class CAknFepCtrlVkbLayout;
|
|
36 |
class CPeninputCnGenericVkbLafMgr;
|
|
37 |
class CAknFepCtrlRepeatButton;
|
|
38 |
class CFepLayoutScrollableList;
|
|
39 |
|
|
40 |
// class declarations
|
|
41 |
/**
|
|
42 |
* vkb window class
|
|
43 |
*
|
|
44 |
* @lib peninputvkbcn.lib
|
|
45 |
* @since S60 v3.2
|
|
46 |
*/
|
|
47 |
class CAknFepVkbWindow : public CAknFepCtrlBaseWindowExt
|
|
48 |
{
|
|
49 |
public:
|
|
50 |
|
|
51 |
/**
|
|
52 |
* Create one CAknFepVkbWindow object
|
|
53 |
*
|
|
54 |
* @since S60 v3.2
|
|
55 |
* @param aUiLayout The layout plugin
|
|
56 |
* @param aControlId This control ID
|
|
57 |
* @param aDataProvider The interface of data provider
|
|
58 |
* @return The CFepCtrlDropdownList object.
|
|
59 |
*/
|
|
60 |
static CAknFepVkbWindow* NewL(CFepUiLayout* aUiLayout,
|
|
61 |
TInt aControlId,
|
|
62 |
MAknFepVkbDataProvider* aDataProvider,
|
|
63 |
CAknFepVkbUiStateMgr* aUiStateMgr);
|
|
64 |
|
|
65 |
/**
|
|
66 |
* Create one CAknFepVkbWindow object
|
|
67 |
*
|
|
68 |
* @since S60 v3.2
|
|
69 |
* @param aUiLayout The layout plugin
|
|
70 |
* @param aControlId This control ID
|
|
71 |
* @param aDataProvider The interface of data provider
|
|
72 |
* @return The CFepCtrlDropdownList object.
|
|
73 |
*/
|
|
74 |
static CAknFepVkbWindow* NewLC(CFepUiLayout* aUiLayout,
|
|
75 |
TInt aControlId,
|
|
76 |
MAknFepVkbDataProvider* aDataProvider,
|
|
77 |
CAknFepVkbUiStateMgr* aUiStateMgr);
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Destructor
|
|
81 |
*
|
|
82 |
* @since S60 v3.2
|
|
83 |
* @return None.
|
|
84 |
*/
|
|
85 |
virtual ~CAknFepVkbWindow();
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Size change function
|
|
89 |
*
|
|
90 |
* @since S60 v3.2
|
|
91 |
* @param aLandscapeStyle Landscape or portrait
|
|
92 |
* @return None.
|
|
93 |
*/
|
|
94 |
void SizeChanged(TBool aLandscapeStyle);
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Handle event
|
|
98 |
* @since Series 60 3.2
|
|
99 |
* @param aEventType The event type
|
|
100 |
* @param aCtrl The control who sends the event
|
|
101 |
* @param aEventData The event data
|
|
102 |
* @return None
|
|
103 |
*/
|
|
104 |
void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, const TDesC& aEventData);
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Get client area control
|
|
108 |
*
|
|
109 |
* @since S60 v3.2
|
|
110 |
* @return The client area control.
|
|
111 |
*/
|
|
112 |
CAknFepVkbClientArea* ClientArea();
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Get input context field
|
|
116 |
*
|
|
117 |
* @since S60 v3.2
|
|
118 |
* @return The input context field
|
|
119 |
*/
|
|
120 |
CFepLayoutMultiLineIcf* InputContextField();
|
|
121 |
|
|
122 |
/**
|
|
123 |
* Change input method layout
|
|
124 |
*
|
|
125 |
* @since S60 v3.2
|
|
126 |
* @param aRange The range defined in TAknFepVkbIMLayout
|
|
127 |
* @param aChangeVkb The flag of changing vkb or not
|
|
128 |
* @return None.
|
|
129 |
*/
|
|
130 |
void ChangeImLayout(TInt aRange, TBool aChangeVkb = ETrue);
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Loop vkb layout
|
|
134 |
*
|
|
135 |
* @since S60 v3.2
|
|
136 |
* @param aType The flag showing shift down or capslock down
|
|
137 |
* @return None.
|
|
138 |
*/
|
|
139 |
void LoopVkbLayout(TVkbShiftType aType, TBool aNotify = EFalse);
|
|
140 |
|
|
141 |
/**
|
|
142 |
* Change vkb layout
|
|
143 |
*
|
|
144 |
* @since S60 v3.2
|
|
145 |
* @param aVkbLayout The destination layout
|
|
146 |
* @return None.
|
|
147 |
*/
|
|
148 |
void ChangeVkbLayout(TInt aVkbLayoutId);
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Get the string length in composition field
|
|
152 |
*
|
|
153 |
* @since S60 v3.2
|
|
154 |
* @return The string length in composition field.
|
|
155 |
*/
|
|
156 |
TInt CompositionFieldStringLength();
|
|
157 |
|
|
158 |
/**
|
|
159 |
* Popup accent window
|
|
160 |
*
|
|
161 |
* @since S60 v3.2
|
|
162 |
* @return None.
|
|
163 |
*/
|
|
164 |
void PopupAccentWindow();
|
|
165 |
|
|
166 |
|
|
167 |
void PopupSwitchWindow();
|
|
168 |
|
|
169 |
/**
|
|
170 |
* Reset the status accent button
|
|
171 |
*
|
|
172 |
* @since S60 v3.2
|
|
173 |
* @return None.
|
|
174 |
*/
|
|
175 |
void ResetAccentButton();
|
|
176 |
|
|
177 |
/**
|
|
178 |
* Set the input context field text
|
|
179 |
*
|
|
180 |
* @since S60 v3.2
|
|
181 |
* @param aTotalTextLen The total text length in editor
|
|
182 |
* @param aStartPos The position of aText in whole editor
|
|
183 |
* @param aCursorSel Current cursor selection
|
|
184 |
* @param aText The text to be set
|
|
185 |
* @return None
|
|
186 |
*/
|
|
187 |
void SetEditorTextL(const TFepInputContextFieldData& aData);
|
|
188 |
|
|
189 |
/**
|
|
190 |
* Set if the input context field text is secret
|
|
191 |
*
|
|
192 |
* @since S60 v3.2
|
|
193 |
* @param aIsSecret The flag
|
|
194 |
* @return None
|
|
195 |
*/
|
|
196 |
void SetTextIsSecret( TBool aIsSecret );
|
|
197 |
|
|
198 |
/**
|
|
199 |
* Dim arrow keys when the editor type is
|
|
200 |
* find pane or secret editor
|
|
201 |
*
|
|
202 |
* @since S60 v3.2
|
|
203 |
* @param aIsSecret The flag
|
|
204 |
* @return None
|
|
205 |
*/
|
|
206 |
void DimArrowKeys( TBool aDimArrow );
|
|
207 |
|
|
208 |
void DimEnterKey( TBool aDimmed );
|
|
209 |
|
|
210 |
/**
|
|
211 |
* Get current control who has focus
|
|
212 |
*
|
|
213 |
* @since S60 v3.2
|
|
214 |
* @return None.
|
|
215 |
*/
|
|
216 |
TInt FocusedControlID();
|
|
217 |
|
|
218 |
/**
|
|
219 |
* Draw window and shadow
|
|
220 |
*
|
|
221 |
* @since S60 v3.2
|
|
222 |
* @return None
|
|
223 |
*/
|
|
224 |
void Draw();
|
|
225 |
|
|
226 |
/**
|
|
227 |
|
|
228 |
/**
|
|
229 |
* Set layout's rectangle
|
|
230 |
*
|
|
231 |
* @since S60 V3.2
|
|
232 |
* @param aRect The new control area
|
|
233 |
* @return None
|
|
234 |
*/
|
|
235 |
void SetRect(const TRect& aRect);
|
|
236 |
|
|
237 |
/**
|
|
238 |
* Is there need to create new word
|
|
239 |
*
|
|
240 |
* @since S60 v3.2
|
|
241 |
* @return ETrue if need to create new word, otherwise EFalse
|
|
242 |
*/
|
|
243 |
TBool NeedCreateWord();
|
|
244 |
|
|
245 |
/**
|
|
246 |
* Close Accent window
|
|
247 |
*
|
|
248 |
* @since S60 V3.2
|
|
249 |
* @return None
|
|
250 |
*/
|
|
251 |
void CloseAccentWindow();
|
|
252 |
|
|
253 |
static TInt BackgroundTaskL(TAny* aPtr);
|
|
254 |
|
|
255 |
/**
|
|
256 |
* Set if enable option button and language switch button
|
|
257 |
*
|
|
258 |
* @since S60 v3.2
|
|
259 |
* @param aEnable The enable flag
|
|
260 |
* @return None
|
|
261 |
*/
|
|
262 |
void SetEnableSettingBtn(TBool aEnable);
|
|
263 |
|
|
264 |
/**
|
|
265 |
* Return the spell for new created words.
|
|
266 |
*
|
|
267 |
* @since S60 v3.2
|
|
268 |
* @return The buffer for the gernated spell.
|
|
269 |
*/
|
|
270 |
TPtrC GetCreatedWordSpell();
|
|
271 |
|
|
272 |
void SetSwitchlistLanguage(TInt aLang);
|
|
273 |
|
|
274 |
void SetSwitchlistSecretFlag(TBool aSecret);
|
|
275 |
|
|
276 |
/**
|
|
277 |
* Set prompt text in FSQ mode.
|
|
278 |
*
|
|
279 |
* @since S60 v3.2
|
|
280 |
* @param Prompt text data
|
|
281 |
* @return None.
|
|
282 |
*/
|
|
283 |
void SetPromptTextL(TUint8* aData);
|
|
284 |
|
|
285 |
void ChangeMergedButtonStatus( const TInt aIsShiftCase,
|
|
286 |
const TInt aIsCapslockCase );
|
|
287 |
|
|
288 |
void ShowBubble(TInt aShow);
|
|
289 |
|
|
290 |
void SetTextAlignmentL( TInt aAlignment );
|
|
291 |
void UpdateICFTextL();
|
|
292 |
|
|
293 |
/**
|
|
294 |
* Show tooltip of ICF
|
|
295 |
*
|
|
296 |
* @since S60 v5.0
|
|
297 |
* @param aText The text to be displayed in ICF
|
|
298 |
* @return None
|
|
299 |
*/
|
|
300 |
void ShowTooltipOnFSQL( const TDesC& aText );
|
|
301 |
|
|
302 |
/**
|
|
303 |
* Hide tooltip of ICF
|
|
304 |
*
|
|
305 |
* @since S60 v5.0
|
|
306 |
* @return None
|
|
307 |
*/
|
|
308 |
void HideTooltipOnFSQ();
|
|
309 |
|
|
310 |
/**
|
|
311 |
* Hide candidate list
|
|
312 |
*
|
|
313 |
* @since S60 v5.0
|
|
314 |
* @return None
|
|
315 |
*/
|
|
316 |
void HideCandidateListOnFSQ();
|
|
317 |
|
|
318 |
/**
|
|
319 |
* Show candidate list
|
|
320 |
*
|
|
321 |
* @param aItemArray, the contents to be shown
|
|
322 |
* @param aActiveIndex, the default index
|
|
323 |
* @return None
|
|
324 |
*/
|
|
325 |
void ShowCandidateListOnFSQL( TInt aAlign, const CDesCArray* aItemArray,
|
|
326 |
TInt aActiveIndex );
|
|
327 |
|
|
328 |
/**
|
|
329 |
* Handle candidate list selected events
|
|
330 |
*
|
|
331 |
* @param aCtrl, pointer of the candidate list on which events occur.
|
|
332 |
* @param aEventData event data
|
|
333 |
* @return None
|
|
334 |
*/
|
|
335 |
void HandleCandidateListSelectedOnFSQL( CFepUiBaseCtrl* aCtrl,
|
|
336 |
const TDesC& aEventData );
|
|
337 |
|
|
338 |
protected:
|
|
339 |
|
|
340 |
/**
|
|
341 |
* Construct function
|
|
342 |
*
|
|
343 |
* @since S60 v3.2
|
|
344 |
* @param aUiLayout The layout plugin
|
|
345 |
* @param aControlId This control ID
|
|
346 |
* @param aDataProvider The interface of data provider
|
|
347 |
* @return None.
|
|
348 |
*/
|
|
349 |
CAknFepVkbWindow(CFepUiLayout* aUiLayout,
|
|
350 |
TInt aControlId,
|
|
351 |
MAknFepVkbDataProvider* aDataProvider,
|
|
352 |
CAknFepVkbUiStateMgr* aUiStateMgr);
|
|
353 |
|
|
354 |
/**
|
|
355 |
* 2nd construct function
|
|
356 |
*
|
|
357 |
* @since Series 60 3.2
|
|
358 |
* @return None
|
|
359 |
*/
|
|
360 |
void ConstructL();
|
|
361 |
|
|
362 |
/**
|
|
363 |
* Close window
|
|
364 |
*
|
|
365 |
* @since Series 60 3.2
|
|
366 |
* @return None
|
|
367 |
*/
|
|
368 |
TBool DoClose();
|
|
369 |
|
|
370 |
/**
|
|
371 |
* read from resource function
|
|
372 |
*
|
|
373 |
* @since Series 60 3.2
|
|
374 |
* @return None
|
|
375 |
*/
|
|
376 |
void ConstructFromResourceL();
|
|
377 |
|
|
378 |
virtual void AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl);
|
|
379 |
|
|
380 |
virtual TBool CreateCustomControlL( TInt16 aControlId, TInt32 aImageId );
|
|
381 |
|
|
382 |
private:
|
|
383 |
|
|
384 |
/**
|
|
385 |
* Add context field into the vkb window
|
|
386 |
*
|
|
387 |
* @since Series 60 3.2
|
|
388 |
* @return None
|
|
389 |
*/
|
|
390 |
void AddContextFieldL();
|
|
391 |
|
|
392 |
/**
|
|
393 |
* Add popup window into the vkb window
|
|
394 |
*
|
|
395 |
* @since Series 60 3.2
|
|
396 |
* @return None
|
|
397 |
*/
|
|
398 |
void AddPopupWindowL();
|
|
399 |
|
|
400 |
/**
|
|
401 |
* Add touch input into the vkb window
|
|
402 |
*
|
|
403 |
* @since Series 60 3.2
|
|
404 |
* @return None
|
|
405 |
*/
|
|
406 |
void AddTouchInputButtonL();
|
|
407 |
|
|
408 |
/**
|
|
409 |
* get resource info of accented chars popup window
|
|
410 |
*
|
|
411 |
* @since S60 v3.2
|
|
412 |
* @param aReader Resource reader
|
|
413 |
* @return None
|
|
414 |
*/
|
|
415 |
void GetPopupWndInfoFromRes( TResourceReader aReader);
|
|
416 |
|
|
417 |
/**
|
|
418 |
* Construct popup window
|
|
419 |
*
|
|
420 |
* @since S60 v3.2
|
|
421 |
* @return None
|
|
422 |
*/
|
|
423 |
void DoIdleConstructL();
|
|
424 |
|
|
425 |
/**
|
|
426 |
* Set item rect, position, font, text color etc to
|
|
427 |
* popup window
|
|
428 |
*
|
|
429 |
* @since S60 v3.2
|
|
430 |
* @return None
|
|
431 |
*/
|
|
432 |
void SetPopupProperty();
|
|
433 |
|
|
434 |
TInt GetWindowResId();
|
|
435 |
|
|
436 |
void SimulateRawEvent(TInt aScanCode, TRawEvent::TType aType);
|
|
437 |
|
|
438 |
void SizeChangedForTitle();
|
|
439 |
|
|
440 |
/*
|
|
441 |
* Create a candidate list control
|
|
442 |
*
|
|
443 |
* @since S60 v5.0
|
|
444 |
* @return None
|
|
445 |
*/
|
|
446 |
void CreateCandidateListOnFSQL();
|
|
447 |
|
|
448 |
/*
|
|
449 |
* Retrieve text color from skin for candidiate list
|
|
450 |
*
|
|
451 |
* @since S60 v5.0
|
|
452 |
* @return None
|
|
453 |
*/
|
|
454 |
const TRgb CandidateListTextColorOnFSQ();
|
|
455 |
|
|
456 |
/*
|
|
457 |
* Retrieve text color from skin for autocompletion part
|
|
458 |
*
|
|
459 |
* @since S60 v5.0
|
|
460 |
* @return None
|
|
461 |
*/
|
|
462 |
const TRgb AutoCompletionPartColorOnFSQ();
|
|
463 |
|
|
464 |
/*
|
|
465 |
* Set item rect, position, font, text color etc to tooltip
|
|
466 |
* and candidate list
|
|
467 |
*
|
|
468 |
* @since S60 v5.0
|
|
469 |
* @return None
|
|
470 |
*/
|
|
471 |
void SetITILayoutOnFSQ();
|
|
472 |
|
|
473 |
public:
|
|
474 |
CPeninputCnGenericVkbLafMgr* iLafMgr;
|
|
475 |
|
|
476 |
private: // data
|
|
477 |
|
|
478 |
/**
|
|
479 |
* The client area control
|
|
480 |
* Own
|
|
481 |
*/
|
|
482 |
CAknFepVkbClientArea* iClientArea;
|
|
483 |
|
|
484 |
/**
|
|
485 |
* The input context field
|
|
486 |
* Own
|
|
487 |
*/
|
|
488 |
CFepLayoutMultiLineIcf* iInputContextField;
|
|
489 |
|
|
490 |
|
|
491 |
/**
|
|
492 |
* The popup window
|
|
493 |
* Own
|
|
494 |
*/
|
|
495 |
CPeninputCommonChoiceList* iPopupWnd;
|
|
496 |
|
|
497 |
/**
|
|
498 |
* The data provider
|
|
499 |
* Not own
|
|
500 |
*/
|
|
501 |
MAknFepVkbDataProvider* iDataProvider;
|
|
502 |
public:
|
|
503 |
/**
|
|
504 |
* The UI state manager
|
|
505 |
* Not own
|
|
506 |
*/
|
|
507 |
CAknFepVkbUiStateMgr* iUiStateMgr;
|
|
508 |
private:
|
|
509 |
/**
|
|
510 |
* The background bitmap of popup window
|
|
511 |
* Not own
|
|
512 |
*/
|
|
513 |
CFbsBitmap* iPopupWndBgImg;
|
|
514 |
|
|
515 |
/**
|
|
516 |
* The background mask bitmap of popup window
|
|
517 |
* Not own
|
|
518 |
*/
|
|
519 |
CFbsBitmap* iPopupWndBgMaskImg;
|
|
520 |
|
|
521 |
|
|
522 |
/**
|
|
523 |
* The focus bitmap of popup window
|
|
524 |
* Not own
|
|
525 |
*/
|
|
526 |
CFbsBitmap* iPopupWndFocusImg;
|
|
527 |
|
|
528 |
/**
|
|
529 |
* The focus mask bitmap of popup window
|
|
530 |
* Not own
|
|
531 |
*/
|
|
532 |
CFbsBitmap* iPopupWndFocusMaskImg;
|
|
533 |
|
|
534 |
/**
|
|
535 |
* The rect of whole vkb window
|
|
536 |
*/
|
|
537 |
TRect iWndRect;
|
|
538 |
|
|
539 |
/**
|
|
540 |
* Accent popuo window open state
|
|
541 |
*/
|
|
542 |
TBool iAccentPopup;
|
|
543 |
|
|
544 |
/**
|
|
545 |
* First time construct flag
|
|
546 |
*/
|
|
547 |
TBool iFirstTimeConstruct;
|
|
548 |
|
|
549 |
CIdle* iIdle;
|
|
550 |
TBool iPopupInited;
|
|
551 |
|
|
552 |
/**
|
|
553 |
* Flag to indicate whether popup window's property
|
|
554 |
* have been set
|
|
555 |
*/
|
|
556 |
TBool iPopupSet;
|
|
557 |
|
|
558 |
/**
|
|
559 |
* Popup window item size
|
|
560 |
*/
|
|
561 |
TSize iPopupItemSize;
|
|
562 |
|
|
563 |
CPeninputLayoutInputmodelChoice* iInputModeSwitch;
|
|
564 |
CAknFepCtrlRepeatButton* iArrowLeftButton;
|
|
565 |
|
|
566 |
CAknFepCtrlRepeatButton* iArrowRightButton;
|
|
567 |
|
|
568 |
CAknFepCtrlDragButton* iMoveButton;
|
|
569 |
|
|
570 |
/**
|
|
571 |
* Vkb layout
|
|
572 |
* Own
|
|
573 |
*/
|
|
574 |
CAknFepCtrlVkbLayout* iVkbLayout;
|
|
575 |
TAknWindowLineLayout iBubbleSize;
|
|
576 |
TAknTextLineLayout iBubbleTextLayout;
|
|
577 |
|
|
578 |
CFepLayoutScrollableList* iCandidateList;
|
|
579 |
|
|
580 |
};
|
|
581 |
|
|
582 |
#endif // C_CAKNFEPVKBWINDOW_H
|
|
583 |
|
|
584 |
// End Of File
|