|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * Provides the CAknFepUICtrlPinyinEEP definition |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 #ifndef C_AKNFEPUICTRLPINYINEEP_H |
|
31 #define C_AKNFEPUICTRLPINYINEEP_H |
|
32 |
|
33 #include <e32std.h> |
|
34 #include <e32base.h> |
|
35 #include <coecntrl.h> |
|
36 #include <AknUtils.h> |
|
37 #include <AknsFrameBackgroundControlContext.h> |
|
38 |
|
39 #include "aknfepuictrleditpane.h" |
|
40 #include "aknfepuictrleepcontrol.h" |
|
41 |
|
42 /** |
|
43 * The parent control of CAknFepUICtrlEEPControl. |
|
44 * |
|
45 * @lib aknfepuiavkonplugin.dll |
|
46 * @since S60 v5.0 |
|
47 */ |
|
48 const TInt KMaxBufLen = 100; |
|
49 class CAknFepUICtrlPinyinEEP : public CCoeControl, public MAknFepUICtrlEditPane |
|
50 { |
|
51 public: |
|
52 enum |
|
53 { |
|
54 EEditableEntryPane |
|
55 }; |
|
56 enum |
|
57 { |
|
58 EZhuyinNULL, |
|
59 EZhuyinInsert, |
|
60 EZhuyinDelete, |
|
61 EZhuyinReplace, |
|
62 EZhuyinMoveCursor |
|
63 }; |
|
64 /** |
|
65 * NewL function. |
|
66 * |
|
67 * @since S60 v5.0 |
|
68 * @param aParent. the RWindow object. |
|
69 * @return self object. |
|
70 */ |
|
71 static CAknFepUICtrlPinyinEEP* NewL( RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr ); |
|
72 |
|
73 /** |
|
74 * NewLC function. |
|
75 * |
|
76 * @since S60 v5.0 |
|
77 * @param aParent. the RWindow object. |
|
78 * @return self object. |
|
79 */ |
|
80 static CAknFepUICtrlPinyinEEP* NewLC( RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr ); |
|
81 |
|
82 /** |
|
83 * Destructor. |
|
84 * |
|
85 * @return none. |
|
86 */ |
|
87 virtual ~CAknFepUICtrlPinyinEEP(); |
|
88 |
|
89 /** |
|
90 * From CCoeControl. |
|
91 * |
|
92 * @return. count of controls. |
|
93 */ |
|
94 virtual TInt CountComponentControls() const; |
|
95 |
|
96 /** |
|
97 * From CCoeControl. |
|
98 * |
|
99 * @param aIndex. |
|
100 * @return. the pointer of sub-control |
|
101 */ |
|
102 virtual CCoeControl* ComponentControl( TInt aIndex ) const; |
|
103 |
|
104 /** |
|
105 * From CCoeControl. |
|
106 * |
|
107 * @param aRect. |
|
108 * @return None. |
|
109 */ |
|
110 virtual void Draw( const TRect& aRect ) const; |
|
111 |
|
112 /** |
|
113 * From CCoeControl. |
|
114 * |
|
115 * @param None. |
|
116 * @return None. |
|
117 */ |
|
118 virtual void SizeChanged(); |
|
119 |
|
120 /** |
|
121 * From MAknFepUICtrlEditPane. |
|
122 * Set the text buffer and maintain the current cursor position. |
|
123 * |
|
124 * @since S60 v5.0 |
|
125 * @param aDes. the content you set. |
|
126 * @return None. |
|
127 */ |
|
128 void SetText( const TDesC& aDes ); |
|
129 |
|
130 /** |
|
131 * From MAknFepUICtrlEditPane. |
|
132 * Set the text buffer and posit the cursor index. |
|
133 * |
|
134 * @since S60 v5.0 |
|
135 * @param aDes. the content you set. |
|
136 * @param aCursorPos. the position of cursor. |
|
137 * @param aMiniQwertyZhuyin |
|
138 * @return None. |
|
139 */ |
|
140 void SetText( const TDesC& aDes, TInt aCursorIndex, TBool aMiniQwertyZhuyin = EFalse ); |
|
141 |
|
142 /** |
|
143 * From MAknFepUICtrlEditPane. |
|
144 * Set the text buffer and posit the cursor index for zhuyin. |
|
145 * |
|
146 * @since S60 v5.0 |
|
147 * @param aDes. the content you set. |
|
148 * @param aCursorPos. the position for cursor. |
|
149 * @param aChineseCount. the count for chinese characters. |
|
150 * @param aJudgeSeed. current zhuyin symbols' descriptor. |
|
151 * @param aKeystroke. current key stroke position. |
|
152 * @param aInvalid. whether aDes is invalid. ETrue for invalid, EFalse for valid. |
|
153 * @return None. |
|
154 */ |
|
155 void SetTextForZhuyin( const TDesC& aDes, TInt aCursorIndex, TInt aChineseCount, |
|
156 const TDesC& aJudgeSeed, TInt aKeystroke, TBool aInvalid = EFalse, TBool aMiniQwertyZhuyin = EFalse ); |
|
157 |
|
158 /** |
|
159 * From MAknFepUICtrlEditPane |
|
160 * Set the cursor position. |
|
161 * |
|
162 * @since S60 v5.0 |
|
163 * @param aIndex. the cursor position you set. |
|
164 * @return None. |
|
165 */ |
|
166 void SetCursor( const TInt aIndex ); |
|
167 |
|
168 /** |
|
169 * From MAknFepUICtrlEditPane |
|
170 * get the position index of cursor.The max cursor index must be larger |
|
171 * than the length of text buffer by 1. |
|
172 * |
|
173 * @since S60 v5.0 |
|
174 * @param None. |
|
175 * @return. the position index. |
|
176 */ |
|
177 TInt GetCursor(); |
|
178 |
|
179 /** |
|
180 * From MAknFepUICtrlEditPane |
|
181 * move cursor to the left by a 1 stride. |
|
182 * |
|
183 * @since S60 v5.0 |
|
184 * @param aStride. the stride for motion |
|
185 * @return. succeed or not. |
|
186 */ |
|
187 TBool MoveCursorLeft( TInt aStride = 1 ); |
|
188 |
|
189 /** |
|
190 * From MAknFepUICtrlEditPane |
|
191 * move cursor to the right by a 1 stride. |
|
192 * |
|
193 * @since S60 v5.0 |
|
194 * @param aStride. the stride for motion |
|
195 * @return. succeed or not. |
|
196 */ |
|
197 TBool MoveCursorRight( TInt aStride = 1); |
|
198 |
|
199 /** |
|
200 * From MAknFepUICtrlEditPane. |
|
201 * active the cursor,the cursor will be black and with a wink.this cursor |
|
202 * state represent this control is focused. |
|
203 * |
|
204 * @since S60 v5.0 |
|
205 * @param None. |
|
206 * @return None. |
|
207 */ |
|
208 void ActiveCursor(); |
|
209 |
|
210 /** |
|
211 * From MAknFepUICtrlEditPane. |
|
212 * deactive the cursor, the cursor will be gray and no wink this cursor |
|
213 * state represent this control with no focus. |
|
214 * |
|
215 * @since S60 v5.0 |
|
216 * @param None. |
|
217 * @return None. |
|
218 */ |
|
219 void DeactiveCursor(); |
|
220 |
|
221 /** |
|
222 * From MAknFepUICtrlEditPane. |
|
223 * enable the cursor,the cursor will be drawn. |
|
224 * |
|
225 * @since S60 v5.0 |
|
226 * @param None. |
|
227 * @return None. |
|
228 */ |
|
229 void EnableCursor(); |
|
230 |
|
231 /** |
|
232 * From MAknFepUICtrlEditPane. |
|
233 * deactive the cursor, the cursor will not be drawn. |
|
234 * @since S60 v5.0 |
|
235 * @param None. |
|
236 * @return None. |
|
237 */ |
|
238 void DisableCursor(); |
|
239 |
|
240 /** |
|
241 * From MAknFepUICtrlEditPane. |
|
242 * set the beginning and ending index for the underline text. |
|
243 * |
|
244 * @since S60 v5.0 |
|
245 * @param aBeg. the beginning index for underlined text. |
|
246 * @param aEnd. the ending index for underlined text. |
|
247 * @return None. |
|
248 */ |
|
249 void SetUnderline( TInt aBeg, TInt aEnd ); |
|
250 |
|
251 /** |
|
252 * From MAknFepUICtrlEditPane. |
|
253 * get the indexes for text with underline. |
|
254 * |
|
255 * @since S60 v5.0 |
|
256 * @param aBeg. a output param for receiving beginning index for underlined text. |
|
257 * @param aEnd. a output param for receiving ending index for underlined text. |
|
258 * @return None. |
|
259 */ |
|
260 void GetUnderlineIndex( TInt& aBeg, TInt& aEnd ); |
|
261 |
|
262 /** |
|
263 * From MAknFepUICtrlEditPane. |
|
264 * set the indexes for the text with highlight |
|
265 * |
|
266 * @since S60 v5.0 |
|
267 * @Param aBeg. the beginning index for highlighted text. |
|
268 * @param aEnd. the ending index for highlighted text. |
|
269 * @return None. |
|
270 */ |
|
271 void SetHighlight( TInt aBeg, TInt aEnd ); |
|
272 |
|
273 /** |
|
274 * From MAknFepUICtrlEditPane. |
|
275 * get the indexes for the text with highlight |
|
276 * |
|
277 * @since S60 v5.0 |
|
278 * @param aBeg. a output parameter which will receive the beginning index. |
|
279 * @param aEnd. a output parameter which will receive the ending index. |
|
280 * @return None. |
|
281 */ |
|
282 void GetHighlightIndex( TInt& aBeg, TInt& aEnd ); |
|
283 |
|
284 /** |
|
285 * From MAknFepUICtrlEditPane. |
|
286 * set keystroke index. |
|
287 * |
|
288 * @since S60 v5.0 |
|
289 * @param aStartIndex. the keystroke index. |
|
290 * @return None. |
|
291 */ |
|
292 void SetCursorIndexOfKeystroke( const TInt aStartIndex ); |
|
293 |
|
294 /** |
|
295 * From MAknFepUICtrlEditPane. |
|
296 * get the keystroke index |
|
297 * |
|
298 * @since S60 v5.0 |
|
299 * @param None. |
|
300 * @return. the keystroke index. |
|
301 */ |
|
302 TInt GetCursorIndexOfKeystroke(); |
|
303 |
|
304 /** |
|
305 * From MAknFepUICtrlEditPane. |
|
306 * whether this control will be actived.ETrue represent enable otherwise |
|
307 * disable. |
|
308 * |
|
309 * @since S60 v5.0 |
|
310 * @param aEnable.ETrue represent enable this control,otherwise disable. |
|
311 * @return None. |
|
312 */ |
|
313 void Enable( TBool aEnable ); |
|
314 |
|
315 /** |
|
316 * From MAknFepUICtrlEditPane. |
|
317 * return whether this control is enabled. |
|
318 * |
|
319 * @since S60 v5.0 |
|
320 * @param None. |
|
321 * @return.ETrue represent this control is enabled, otherwise disabled. |
|
322 */ |
|
323 TBool IsEnabled() const; |
|
324 |
|
325 /** |
|
326 * Get the info before cursor. |
|
327 * |
|
328 * @since S60 v5.0 |
|
329 * @param aText the show info. |
|
330 * @return none. |
|
331 */ |
|
332 void GetText( TDes& aText ); |
|
333 |
|
334 /** |
|
335 * Get the info before cursor. |
|
336 * |
|
337 * @since S60 v5.0 |
|
338 * @param aOut the info before cursor. |
|
339 * @return ETrue if can get the info. |
|
340 */ |
|
341 TBool GetDesBeforeCursor( TDes& aOut ); |
|
342 |
|
343 /** |
|
344 * From MAknFepUICtrlEditPane. |
|
345 * Not used. |
|
346 */ |
|
347 void SetToneMark( const TDesC& aToneMark ); |
|
348 |
|
349 /** |
|
350 * From MAknFepUICtrlEditPane. |
|
351 * Not used. |
|
352 */ |
|
353 void SetToneMarkValidity( TBool aValid ); |
|
354 |
|
355 /** |
|
356 * From MAknFepUICtrlEditPane. |
|
357 * Not used. |
|
358 */ |
|
359 void SetOverrideFontId( TInt aFontId ); |
|
360 |
|
361 /** |
|
362 * From MAknFepUICtrlEditPane. |
|
363 * Not used. |
|
364 */ |
|
365 void SetFlag( TInt aFlag ); |
|
366 |
|
367 /** |
|
368 * From MAknFepUICtrlEditPane. |
|
369 * Not used. |
|
370 */ |
|
371 void ClearFlag( TInt aFlag ); |
|
372 |
|
373 /** |
|
374 * From MAknFepUICtrlEditPane. |
|
375 * Not used. |
|
376 */ |
|
377 TBool IsFlagSet( TInt aFlag ) const; |
|
378 |
|
379 /** |
|
380 * Set the cursor index for moving to the left. |
|
381 * |
|
382 * @since S60 v5.0 |
|
383 * @param aIndex. the cursor index for moving left. |
|
384 * @return None. |
|
385 */ |
|
386 void SetCursorForMoveLeft( const TInt aIndex ); |
|
387 |
|
388 /** |
|
389 * Set the cursor index for moving to the right. |
|
390 * |
|
391 * @since S60 v5.0 |
|
392 * @param aIndex. the cursor index for moving right. |
|
393 * @return None. |
|
394 */ |
|
395 void SetCursorForMoveRight( const TInt aIndex ); |
|
396 /** |
|
397 * Add some text at the end of buffer. |
|
398 * |
|
399 * @since S60 v5.0 |
|
400 * @param aDes. the content you want to append. |
|
401 * @return. ETrue represent success, otherwise failure. |
|
402 */ |
|
403 TBool Append( const TDesC& aDes ); |
|
404 |
|
405 /** |
|
406 * delete the content begin with aBeg index, and with an aLen length. |
|
407 * |
|
408 * @since S60 v5.0 |
|
409 * @param aBeg. the beginning index for delete. |
|
410 * @param aLen. the length you delete. |
|
411 * @return ETrue for success, and EFalse for failure. |
|
412 */ |
|
413 TBool Delete( TInt aBeg, TInt aLen = 1 ); |
|
414 |
|
415 /** |
|
416 * Insert some text after aIndex character. |
|
417 * |
|
418 * @since S60 v5.0 |
|
419 * @param aIndex. the index for insert. |
|
420 * @param aDes. the content you insert. |
|
421 * @return ETrue for success, and EFalse for failure. |
|
422 */ |
|
423 TBool Insert( TInt aIndex, const TDesC& aDes ); |
|
424 |
|
425 /** |
|
426 * Replace text from aBeg index to aBeg + aLen with aDes. |
|
427 * |
|
428 * @since S60 v5.0 |
|
429 * @param aBeg. the beginning index for replace. |
|
430 * @param aLen. the length for replace. |
|
431 * @param aDes. the new content after replacing. |
|
432 * @return ETrue for success, and EFalse for failure. |
|
433 */ |
|
434 TBool Replace( TInt aBeg, TInt aLen, const TDesC& aDes ); |
|
435 |
|
436 /** |
|
437 * Reset private member viariable. |
|
438 * |
|
439 * @since S60 v5.0 |
|
440 * @param None. |
|
441 * @return None. |
|
442 */ |
|
443 void Reset(); |
|
444 |
|
445 /** |
|
446 * Return kestroke array. |
|
447 * |
|
448 * @since S60 v3.2.3 |
|
449 * @param None. |
|
450 * @return pointer of array. |
|
451 */ |
|
452 CDesCArrayFlat* KeystrokeArray(); |
|
453 |
|
454 /** |
|
455 * Return keycode array. |
|
456 * |
|
457 * @since S60 v3.2.3 |
|
458 * @param None. |
|
459 * @return pointer of array. |
|
460 */ |
|
461 RArray<TInt>* KeycodeArray(); |
|
462 |
|
463 /** |
|
464 * Return show kestroke array. |
|
465 * |
|
466 * @since S60 v3.2.3 |
|
467 * @param None. |
|
468 * @return pointer of array. |
|
469 */ |
|
470 CDesCArrayFlat* ShowKeystrokeArray(); |
|
471 |
|
472 /** |
|
473 * Return choose chinese charater array. |
|
474 * |
|
475 * @since S60 v3.2.3 |
|
476 * @param None. |
|
477 * @return pointer of array. |
|
478 */ |
|
479 CDesCArrayFlat* PhraseArray(); |
|
480 |
|
481 /** |
|
482 * Return choose chinese charater show keystroke array. |
|
483 * |
|
484 * @since S60 v3.2.3 |
|
485 * @param None. |
|
486 * @return pointer of array. |
|
487 */ |
|
488 CDesCArrayFlat* PhraseShowKeyStrokeArray(); |
|
489 |
|
490 /** |
|
491 * Return phrase keycode array. |
|
492 * |
|
493 * @since S60 v3.2.3 |
|
494 * @param None. |
|
495 * @return pointer of array. |
|
496 */ |
|
497 RArray<TInt>* PhraseKeycodeArray(); |
|
498 |
|
499 /** |
|
500 * Return temp array. |
|
501 * |
|
502 * @since S60 v3.2.3 |
|
503 * @param None. |
|
504 * @return pointer of array. |
|
505 */ |
|
506 CDesCArrayFlat* TempArray(); |
|
507 |
|
508 /** |
|
509 * Reset private member viariable array. |
|
510 * |
|
511 * @since S60 v3.2.3 |
|
512 * @param None. |
|
513 * @return None. |
|
514 */ |
|
515 void ResetAllArray(); |
|
516 |
|
517 /** |
|
518 * change state flag. |
|
519 * |
|
520 * @since S60 v3.2.3 |
|
521 * @param aState, ETrue change state. |
|
522 * @return None. |
|
523 */ |
|
524 void SetChangeState( TBool aState = ETrue ); |
|
525 |
|
526 /** |
|
527 * check change state flag. |
|
528 * |
|
529 * @since S60 v3.2.3 |
|
530 * @param None. |
|
531 * @return ETrue if change state, EFalse others. |
|
532 */ |
|
533 TBool IsChangeState(); |
|
534 |
|
535 /** |
|
536 * Set auto change state flag. |
|
537 * |
|
538 * @since S60 v3.2.3 |
|
539 * @param aState, ETrue auto change state, EFalse manual change state. |
|
540 * @return None. |
|
541 */ |
|
542 void SetAutoChangeStateFlag( TBool aState = ETrue ); |
|
543 |
|
544 /** |
|
545 * Get the auto change state flag. |
|
546 * |
|
547 * @since S60 v3.2.3 |
|
548 * @param None. |
|
549 * @return ETrue atuo change state, EFalse others. |
|
550 */ |
|
551 TBool GetAutoChangeStateFlag(); |
|
552 |
|
553 /** |
|
554 * Set all the keystroke valid flag. |
|
555 * |
|
556 * @since S60 v3.2.3 |
|
557 * @param aState, ETrue all the keystroke is valid, EFalse others. |
|
558 * @return None. |
|
559 */ |
|
560 void SetAllValidFlag( TBool aState = ETrue ); |
|
561 |
|
562 /** |
|
563 * Get all the keystroke valid flag. |
|
564 * |
|
565 * @since S60 v3.2.3 |
|
566 * @param None. |
|
567 * @return ETrue all the keystroke is valid, EFalse others. |
|
568 */ |
|
569 TBool GetAllValidFlag(); |
|
570 |
|
571 /** |
|
572 * Set Phrase Creation flag. |
|
573 * |
|
574 * @since S60 v3.2.3 |
|
575 * @param aState, ETrue is phrase creation, EFalse others. |
|
576 * @return None. |
|
577 */ |
|
578 void SetPhraseCreationFlag( TBool aState ); |
|
579 |
|
580 /** |
|
581 * Get Phrase Creation flag. |
|
582 * |
|
583 * @since S60 v3.2.3 |
|
584 * @param None. |
|
585 * @return ETrue is phrase creation, EFalse others. |
|
586 */ |
|
587 TBool GetPhraseCreationFlag(); |
|
588 |
|
589 /** |
|
590 * Set the keystroke invalid index. |
|
591 * |
|
592 * @since S60 v3.2.3 |
|
593 * @param aIndex, the keystroke invalid index. |
|
594 * @return None. |
|
595 */ |
|
596 void SetInvalidIndex( TInt aIndex = 0 ); |
|
597 |
|
598 /** |
|
599 * Get all the invalid keystroke index. |
|
600 * |
|
601 * @since S60 v3.2.3 |
|
602 * @param None. |
|
603 * @return invalid keystroke index. |
|
604 */ |
|
605 TInt GetInvalidIndex(); |
|
606 |
|
607 /** |
|
608 * Set Phrase Candidate state need refresh UI flag. |
|
609 * |
|
610 * @since S60 v3.2.3 |
|
611 * @param aState, ETrue is that Candidate state need refresh UI,other don't need. |
|
612 * @return None. |
|
613 */ |
|
614 void SetCandidateRefreshFlag( TBool aState ); |
|
615 |
|
616 /** |
|
617 * Get Phrase Candidate state need refresh UI flag. |
|
618 * |
|
619 * @since S60 v3.2.3 |
|
620 * @param None. |
|
621 * @return ETrue is that Candidate state need refresh UI,EFalse don't need. |
|
622 */ |
|
623 TBool GetCandidateRefreshFlag(); |
|
624 |
|
625 /** |
|
626 * Set the delimiter count of keystroke. |
|
627 * |
|
628 * @since S60 v3.2.3 |
|
629 * @param aCount, the delimiter count of keystroke. |
|
630 * @return None. |
|
631 */ |
|
632 void SetDelimiterCount( TInt aCount ); |
|
633 |
|
634 /** |
|
635 * Get the delimiter count of keystroke. |
|
636 * |
|
637 * @since S60 v3.2.3 |
|
638 * @param None. |
|
639 * @return aCount, the delimiter count of keystroke. |
|
640 */ |
|
641 TInt GetDelimiterCount(); |
|
642 |
|
643 /** |
|
644 * Get current cba resource id. |
|
645 * |
|
646 * @since S60 v3.2.3 |
|
647 * @param None. |
|
648 * @return current cba resource id. |
|
649 */ |
|
650 TInt GetCurrentCBAResID(); |
|
651 |
|
652 /** |
|
653 * Set current cba resource id. |
|
654 * |
|
655 * @since S60 v3.2.3 |
|
656 * @param aResourceId, current cba resource id. |
|
657 * @return None. |
|
658 */ |
|
659 void SetCurrentCBAResID( TInt aResourceId ); |
|
660 |
|
661 void SetEffictiveLength( TInt aLength ); |
|
662 |
|
663 TInt GetEffictiveLength(); |
|
664 |
|
665 void DecEffictiveLength(); |
|
666 |
|
667 void AddEffictiveLength(); |
|
668 |
|
669 void SetNeedClearDeliberateSelection( TBool aNeedClearDeliberateSelection ); |
|
670 |
|
671 TBool NeedClearDeliberateSelection(); |
|
672 |
|
673 CDesCArrayFlat* PhraseZhuYinSpellingArray(); |
|
674 protected: |
|
675 |
|
676 /** |
|
677 * Layout contained controls. |
|
678 * |
|
679 * @since S60 v5.0 |
|
680 * @param None. |
|
681 * @return None. |
|
682 */ |
|
683 void LayoutContainedControls(); |
|
684 |
|
685 /** |
|
686 * layout the background frames. |
|
687 * |
|
688 * @since S60 v5.0 |
|
689 * @param None. |
|
690 * @return None. |
|
691 */ |
|
692 void LayoutFrames(); |
|
693 |
|
694 /** |
|
695 * layout its rectangles |
|
696 * |
|
697 * @since S60 v5.0 |
|
698 * @param None. |
|
699 * @return None. |
|
700 */ |
|
701 void LayoutRects(); |
|
702 |
|
703 private: |
|
704 /** |
|
705 * C++ constructor. |
|
706 */ |
|
707 CAknFepUICtrlPinyinEEP( CAknFepUiLayoutDataMgr* aLafDataMgr ); |
|
708 |
|
709 /** |
|
710 * Two-phrase constructor. |
|
711 */ |
|
712 void ConstructL( RWindow& aParent, CAknFepUiLayoutDataMgr* aLafDataMgr ); |
|
713 |
|
714 /** |
|
715 * Calculate visual text for appending. |
|
716 * |
|
717 * @since S60 v5.0 |
|
718 * @param aDes.the content you want to append. |
|
719 * @return None. |
|
720 */ |
|
721 void CalculateVisualTextForAppend( const TDesC& aDes ); |
|
722 |
|
723 /** |
|
724 * Calculate visual text for deleting. |
|
725 * |
|
726 * @since S60 v5.0 |
|
727 * @param aBeg. the beginning index you want to delete. |
|
728 * @param aLen. the length you want to delete, 1 by default. |
|
729 * @return None. |
|
730 */ |
|
731 void CalculateVisualTextForDelete( TInt aBeg, TInt aLen = 1 ); |
|
732 |
|
733 /** |
|
734 * Calculate visual text for inserting. |
|
735 * |
|
736 * @since S60 v5.0 |
|
737 * @param aBeg. the beginning index for your insert. |
|
738 * @param aDes. the content you want to insert. |
|
739 * @return None. |
|
740 */ |
|
741 void CalculateVisualTextForInsert( TInt aBeg, const TDesC& aDes ); |
|
742 |
|
743 /** |
|
744 * Calculate visual text for replacing. |
|
745 * |
|
746 * @since S60 v5.0 |
|
747 * @param aBeg. the beginning index for you replace. |
|
748 * @param aLen. the length for your replace. |
|
749 * @param aDes. the new content after your replace. |
|
750 * @return None. |
|
751 */ |
|
752 void CalculateVisualTextForReplace( TInt aBeg, TInt aLen, |
|
753 const TDesC& aDes ); |
|
754 |
|
755 /** |
|
756 * Calculate visual text for moving to left. |
|
757 * |
|
758 * @since S60 v5.0 |
|
759 * @param None. |
|
760 * @return None. |
|
761 */ |
|
762 void CalculateVisualTextForMoveLeft(); |
|
763 |
|
764 /** |
|
765 * Calculate visual text for moving to the right. |
|
766 * |
|
767 * @since S60 v5.0 |
|
768 * @param None. |
|
769 * @return None. |
|
770 */ |
|
771 void CalculateVisualTextForMoveRight(); |
|
772 |
|
773 /** |
|
774 * Calculate the underline indexes and highlight indexes according to the |
|
775 * absolute value. |
|
776 * |
|
777 * @since S60 v5.0 |
|
778 * @param None. |
|
779 * @return None. |
|
780 */ |
|
781 void CalculateVisualIndex(); |
|
782 |
|
783 /** |
|
784 * layout the background frames. |
|
785 * |
|
786 * @since S60 v5.0 |
|
787 * @param aOuterRect filled with outer rect coords |
|
788 * @param aInnerRect filled with inner rect coords |
|
789 * @return None. |
|
790 */ |
|
791 void CalculateFrameRects( TRect& aOuterRect, TRect& aInnerRect ) const; |
|
792 |
|
793 private: |
|
794 // Data. |
|
795 CAknFepUiLayoutDataMgr* iLafDataMgr; |
|
796 /** |
|
797 * the position of keystroke. |
|
798 */ |
|
799 TInt iIndex; |
|
800 /** |
|
801 * Whether EEP control is enabled ( visible ) . |
|
802 */ |
|
803 TBool iEnabled; |
|
804 /** |
|
805 * The background context for this control. |
|
806 */ |
|
807 CAknsFrameBackgroundControlContext* iBgContext; |
|
808 |
|
809 TAknLayoutRect iRectCoverMainPaneInput; |
|
810 TAknLayoutRect iRectFirstShadowInput; |
|
811 TAknLayoutRect iRectOutlineFrameInput; |
|
812 TAknLayoutRect iRectInsideAreaInput; |
|
813 /** |
|
814 * Its contained control only for display. |
|
815 * own |
|
816 */ |
|
817 CAknFepUICtrlEEPControl* iEditableEntryPane; |
|
818 /** |
|
819 * All the text its caller set. |
|
820 * own |
|
821 */ |
|
822 HBufC* iAbsoluteBuffer; |
|
823 /** |
|
824 * The text displayed on the contained control. |
|
825 * own |
|
826 */ |
|
827 HBufC* iVisualBuffer; |
|
828 /** |
|
829 * The cursor position relative to iAbsoluteBuffer which is set by its |
|
830 * caller. |
|
831 */ |
|
832 TInt iAbsoluteCursorPos; |
|
833 /** |
|
834 * The offset between the beginning position of iVisualBuffer and |
|
835 * iAbsoluteBuffer. |
|
836 */ |
|
837 TInt iOffset; |
|
838 /** |
|
839 * The beginning position of underlined text. |
|
840 */ |
|
841 TInt iAbsoluteUnderlineBeg; |
|
842 /** |
|
843 * The end position of underlined text. |
|
844 */ |
|
845 TInt iAbsoluteUnderlineEnd; |
|
846 /** |
|
847 * The beginning position of highlighted text. |
|
848 */ |
|
849 TInt iAbsoluteHighlightBeg; |
|
850 /** |
|
851 * The end position of highlighted text. |
|
852 */ |
|
853 TInt iAbsoluteHighlightEnd; |
|
854 /** |
|
855 * Store the highlight-setting&underline-setting sequence |
|
856 */ |
|
857 RPointerArray<CAknFepUICtrlEEPControl::TSegment> iArray; |
|
858 |
|
859 /** |
|
860 * Only for zhuyin use |
|
861 * the seed descriptor used in zhuyin input method. |
|
862 * used to store zhuyin symbols every time. |
|
863 */ |
|
864 TBuf<KMaxBufLen> iJudgeSeed; |
|
865 /** |
|
866 * used to store count for chinese character. |
|
867 */ |
|
868 TInt iChineseCount; |
|
869 |
|
870 /** |
|
871 * whether the last displayed text is valid. |
|
872 */ |
|
873 TBool iLastValid; |
|
874 |
|
875 /** |
|
876 * keystroke arrray. |
|
877 */ |
|
878 CDesCArrayFlat* iKeystrokeArray; |
|
879 |
|
880 /** |
|
881 * Keycode arrray. |
|
882 */ |
|
883 RArray<TInt> iKeycodeArray; |
|
884 |
|
885 /** |
|
886 * show Keystroke array. |
|
887 */ |
|
888 CDesCArrayFlat* iShowKeystrokeArray; |
|
889 |
|
890 /** |
|
891 * Chinese array. |
|
892 */ |
|
893 CDesCArrayFlat* iPhraseArray; |
|
894 |
|
895 /** |
|
896 * phrase Keycode arrray. |
|
897 */ |
|
898 RArray<TInt> iPhraseKeycodeArray; |
|
899 |
|
900 /** |
|
901 * KeyStroke array for the Chinese which have been selected. |
|
902 */ |
|
903 CDesCArrayFlat* iPhraseShowKeyStrokeArray; |
|
904 |
|
905 /** |
|
906 * The temp array. |
|
907 */ |
|
908 CDesCArrayFlat* iTempArray; |
|
909 |
|
910 /** |
|
911 * the change state flag. |
|
912 */ |
|
913 TInt iChangeFlag; |
|
914 |
|
915 /** |
|
916 * the auto change state flag. |
|
917 */ |
|
918 TInt iAutoChangeFlag; |
|
919 |
|
920 /** |
|
921 * The all kyestroke is valid. |
|
922 */ |
|
923 TInt iAllValidFlag; |
|
924 |
|
925 /** |
|
926 * The invalid keystroke index. |
|
927 */ |
|
928 TInt iInvalidKeystrokeIndex; |
|
929 |
|
930 /** |
|
931 * Is phrase creation. |
|
932 */ |
|
933 TInt iPhraseCreation; |
|
934 |
|
935 /** |
|
936 * The candidate refresh flag. |
|
937 */ |
|
938 TInt iCandidateRefreshFlag; |
|
939 |
|
940 /** |
|
941 * The delimiter count of keystroke. |
|
942 */ |
|
943 TInt iDelimiterCount; |
|
944 |
|
945 /** |
|
946 * Current CBA resource id. |
|
947 */ |
|
948 TInt iCurrentCBAResId; |
|
949 |
|
950 TInt iEffictiveLength; |
|
951 |
|
952 TBool iMiniQwertyZhuyin; |
|
953 |
|
954 TBool iNeedClearDeliberateSelection; |
|
955 |
|
956 /** |
|
957 * store ZhuYin Spelling |
|
958 */ |
|
959 CDesCArrayFlat* iPhraseZhuYinSpellingArray; |
|
960 }; |
|
961 |
|
962 #endif /* C_AKNFEPUICTRLPINYINEEP_H */ |
|
963 |
|
964 // End of File |
|
965 |