|
1 /* |
|
2 * Copyright (c) 2008-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 MAknFepUICtrlEditPane definition. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 #ifndef M_AKNFEPUICTRLEDITPANE_H |
|
32 #define M_AKNFEPUICTRLEDITPANE_H |
|
33 |
|
34 /** |
|
35 * pane in which the user's edit is shown |
|
36 */ |
|
37 class MAknFepUICtrlEditPane |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Set the show info |
|
43 * |
|
44 * @since S60 v5.0 |
|
45 * @param aDes the show info. |
|
46 * @return None. |
|
47 */ |
|
48 virtual void SetText( const TDesC& aDes ) = 0; |
|
49 |
|
50 /** |
|
51 * Set the show info and cursor position |
|
52 * |
|
53 * @since S60 v5.0 |
|
54 * @param aDes the show info. |
|
55 * @param aCursorIndex the cursor position. |
|
56 * @return None. |
|
57 */ |
|
58 virtual void SetText( const TDesC& aDes, TInt aCursorIndex, TBool aMiniQwertyZhuyin = EFalse ) = 0; |
|
59 |
|
60 /** |
|
61 * Set the show info |
|
62 * |
|
63 * @since S60 v5.0 |
|
64 * @param aDes the show info. |
|
65 * @param aCursorIndex the cursor position. |
|
66 * @param aChineseCount the chinese count. |
|
67 * @param aJudgeSeed the zhuyin symbols. |
|
68 * @param aKeystroke the index of symbols. |
|
69 * @param aRefreshOffset ETrue the show info only is zhuyin symbols. |
|
70 * @return None. |
|
71 */ |
|
72 virtual void SetTextForZhuyin( |
|
73 const TDesC& aDes, |
|
74 TInt aCursorIndex, |
|
75 TInt aChineseCount, |
|
76 const TDesC& aJudgeSeed, |
|
77 TInt aKeystroke, |
|
78 TBool aRefreshOffset = EFalse, |
|
79 TBool aMiniQwertyZhuyin = EFalse |
|
80 ) = 0; |
|
81 |
|
82 /** |
|
83 * Set the cousor the index. |
|
84 * |
|
85 * @since S60 v5.0 |
|
86 * @param aIndex the index of cousor. |
|
87 * @return None. |
|
88 */ |
|
89 virtual void SetCursor( const TInt aIndex ) = 0; |
|
90 |
|
91 /** |
|
92 * Get the index of the cursor. |
|
93 * |
|
94 * @since S60 v5.0 |
|
95 * @return the index of cousor. |
|
96 */ |
|
97 virtual TInt GetCursor() = 0; |
|
98 |
|
99 /** |
|
100 * Move cursor to the left. |
|
101 * |
|
102 * @since S60 v5.0 |
|
103 * @param aStride the cursor move offset. |
|
104 * @return ETrue if the cursor can be move,EFalse the others. |
|
105 */ |
|
106 virtual TBool MoveCursorLeft( TInt aStride = 1 ) = 0; |
|
107 |
|
108 /** |
|
109 * Move cursor to the right. |
|
110 * |
|
111 * @since S60 v5.0 |
|
112 * @param aStride the cursor move offset. |
|
113 * @return ETrue if the cursor can be move,EFalse the others. |
|
114 */ |
|
115 virtual TBool MoveCursorRight( TInt aStride = 1 ) = 0; |
|
116 |
|
117 /** |
|
118 * Active cursor. |
|
119 * |
|
120 * @since S60 v5.0 |
|
121 * @return None. |
|
122 */ |
|
123 virtual void ActiveCursor() = 0; |
|
124 |
|
125 /** |
|
126 * Deactive cursor. |
|
127 * |
|
128 * @since S60 v5.0 |
|
129 * @return None. |
|
130 */ |
|
131 virtual void DeactiveCursor() = 0; |
|
132 |
|
133 /** |
|
134 * Enable cursor, the cursor will be drawn. |
|
135 * |
|
136 * @since S60 v5.0 |
|
137 * @return None. |
|
138 */ |
|
139 virtual void EnableCursor() = 0; |
|
140 |
|
141 /** |
|
142 * Disable cursor, the cursor will be not drawn. |
|
143 * |
|
144 * @since S60 v5.0 |
|
145 * @return None. |
|
146 */ |
|
147 virtual void DisableCursor() = 0; |
|
148 |
|
149 /** |
|
150 * Set the show info underline. |
|
151 * |
|
152 * @since S60 v5.0 |
|
153 * @param aStartIndex the underline begine index. |
|
154 * @param aEndIndex the underline end index. |
|
155 * @return None. |
|
156 */ |
|
157 virtual void SetUnderline( TInt aStartIndex, TInt aEndIndex ) = 0; |
|
158 |
|
159 /** |
|
160 * Get the show info underline. |
|
161 * |
|
162 * @since S60 v5.0 |
|
163 * @param aStartIndex the underline begine index. |
|
164 * @param aEndIndex the underline end index. |
|
165 * @return None. |
|
166 */ |
|
167 virtual void GetUnderlineIndex(TInt& aStartIndex, TInt& aEndIndex) = 0; |
|
168 |
|
169 /** |
|
170 * Set the highlight text. |
|
171 * |
|
172 * @since S60 v5.0 |
|
173 * @param aStartIndex the high light begine index. |
|
174 * @param aEndIndex the high light end index. |
|
175 * @return None. |
|
176 */ |
|
177 virtual void SetHighlight(TInt aStartIndex, TInt aEndIndex) = 0; |
|
178 |
|
179 /** |
|
180 * Get the highlight text. |
|
181 * |
|
182 * @since S60 v5.0 |
|
183 * @param aStartIndex the high light begine index. |
|
184 * @param aEndIndex the high light end index. |
|
185 * @return None. |
|
186 */ |
|
187 virtual void GetHighlightIndex(TInt& aStartIndex, TInt& aEndIndex) = 0; |
|
188 |
|
189 /** |
|
190 * set index of keystroke array. |
|
191 * |
|
192 * @since S60 v5.0 |
|
193 * @param aStartIndex the index. |
|
194 * @return None. |
|
195 */ |
|
196 virtual void SetCursorIndexOfKeystroke( const TInt aStartIndex ) = 0; |
|
197 |
|
198 /** |
|
199 * Get index of keystroke array. |
|
200 * |
|
201 * @since S60 v5.0 |
|
202 * @return the index. |
|
203 */ |
|
204 virtual TInt GetCursorIndexOfKeystroke() = 0; |
|
205 |
|
206 /** |
|
207 * Enables the display of the control. Sets the control's |
|
208 * window postion and visibility, but only if the value has |
|
209 * changed (so it's ok to call it excessively). |
|
210 * |
|
211 * @since S60 v5.0 |
|
212 * @param aEnable if ETrue, makes visible |
|
213 * if EFalse, makes non-visible |
|
214 * @return none. |
|
215 */ |
|
216 virtual void Enable(TBool aEnable) = 0; |
|
217 |
|
218 /** |
|
219 * Is the control enabled for display? |
|
220 * |
|
221 * @since S60 v5.0 |
|
222 * @return if not enabled, return EFalse |
|
223 */ |
|
224 virtual TBool IsEnabled() const = 0; |
|
225 |
|
226 /** |
|
227 * Get the text buffer of the pane |
|
228 * |
|
229 * @since S60 v5.0 |
|
230 * @param aText the buffer is filled with the contents of the candidate |
|
231 * of the pane, up to the size of the buffer |
|
232 * @return if not enabled, return EFalse |
|
233 */ |
|
234 virtual void GetText(TDes& aText) = 0; |
|
235 |
|
236 /** |
|
237 * Get the show info before cursor. |
|
238 * |
|
239 * @since S60 v5.0 |
|
240 * @param aOut the show info of the before cursor. |
|
241 * |
|
242 * @return if not enabled, return EFalse |
|
243 */ |
|
244 virtual TBool GetDesBeforeCursor ( TDes& aOut ) = 0; |
|
245 |
|
246 /** |
|
247 * This function sets the Tone Mark for the Pane. |
|
248 * |
|
249 * @since S60 v5.0 |
|
250 * @param aToneMark descriptor containing the tone mark character |
|
251 * |
|
252 * @return none. |
|
253 */ |
|
254 virtual void SetToneMark(const TDesC& aToneMark) = 0; |
|
255 |
|
256 /** |
|
257 * This function sets the validity of the tonemark |
|
258 * |
|
259 * @since S60 v5.0 |
|
260 * @param aValid if ETrue, tonemark will be displayed as valid |
|
261 * if EFalse, tonemark will be displayed as not valid |
|
262 * |
|
263 * @return none. |
|
264 */ |
|
265 virtual void SetToneMarkValidity(TBool aValid) = 0; |
|
266 |
|
267 /** |
|
268 * Reset private member viariable. |
|
269 * |
|
270 * @since S60 v5.0 |
|
271 * @return None. |
|
272 */ |
|
273 virtual void Reset() = 0; |
|
274 |
|
275 /** |
|
276 * Sets the font to be used, which will override the font from LAF |
|
277 * |
|
278 * @since S60 v5.0 |
|
279 * @param aFontId the new font id, pass in 0 to use the one from LAF |
|
280 * @return None. |
|
281 */ |
|
282 virtual void SetOverrideFontId(TInt aFontId) = 0; |
|
283 |
|
284 /** |
|
285 * Sets flag |
|
286 * |
|
287 * @since S60 v5.0 |
|
288 * @param aFlag the flag |
|
289 * @return None. |
|
290 */ |
|
291 virtual void SetFlag(TInt aFlag) = 0; |
|
292 |
|
293 /** |
|
294 * Clear flag |
|
295 * |
|
296 * @since S60 v5.0 |
|
297 * @param aFlag the flag |
|
298 * @return None. |
|
299 */ |
|
300 virtual void ClearFlag(TInt aFlag) = 0; |
|
301 |
|
302 /** |
|
303 * check flag |
|
304 * |
|
305 * @since S60 v5.0 |
|
306 * @param aFlag the flag |
|
307 * @return if not enabled, return EFalse. |
|
308 */ |
|
309 virtual TBool IsFlagSet(TInt aFlag) const = 0; |
|
310 |
|
311 /** |
|
312 * Return kestroke array. |
|
313 * |
|
314 * @since S60 v3.2.3 |
|
315 * @param None. |
|
316 * @return pointer of array. |
|
317 */ |
|
318 virtual CDesCArrayFlat* KeystrokeArray() = 0; |
|
319 |
|
320 /** |
|
321 * Return show kestroke array. |
|
322 * save keystroke that after Analyse when pinyin. |
|
323 * save all valid keystroke when zhuyin. |
|
324 * |
|
325 * @since S60 v3.2.3 |
|
326 * @param None. |
|
327 * @return pointer of array. |
|
328 */ |
|
329 virtual CDesCArrayFlat* ShowKeystrokeArray() = 0; |
|
330 |
|
331 /** |
|
332 * Return choose chinese charater array. |
|
333 * |
|
334 * @since S60 v3.2.3 |
|
335 * @param None. |
|
336 * @return pointer of array. |
|
337 */ |
|
338 virtual CDesCArrayFlat* PhraseArray() = 0; |
|
339 |
|
340 /** |
|
341 * Return choose chinese charater show keystroke array. |
|
342 * |
|
343 * @since S60 v3.2.3 |
|
344 * @param None. |
|
345 * @return pointer of array. |
|
346 */ |
|
347 virtual CDesCArrayFlat* PhraseShowKeyStrokeArray() = 0; |
|
348 |
|
349 /** |
|
350 * Return temp array. |
|
351 * |
|
352 * @since S60 v3.2.3 |
|
353 * @param None. |
|
354 * @return pointer of array. |
|
355 */ |
|
356 virtual CDesCArrayFlat* TempArray() = 0; |
|
357 |
|
358 /** |
|
359 * Reset private member viariable array. |
|
360 * |
|
361 * @since S60 v3.2.3 |
|
362 * @param None. |
|
363 * @return None. |
|
364 */ |
|
365 virtual void ResetAllArray() = 0; |
|
366 |
|
367 /** |
|
368 * change state flag. |
|
369 * |
|
370 * @since S60 v3.2.3 |
|
371 * @param aState, ETrue change state. |
|
372 * @return None. |
|
373 */ |
|
374 virtual void SetChangeState( TBool aState = ETrue ) = 0; |
|
375 |
|
376 /** |
|
377 * check change state flag. |
|
378 * |
|
379 * @since S60 v3.2.3 |
|
380 * @param None. |
|
381 * @return ETrue if change state, EFalse others. |
|
382 */ |
|
383 virtual TBool IsChangeState() = 0; |
|
384 |
|
385 /** |
|
386 * Set auto change state flag. |
|
387 * |
|
388 * @since S60 v3.2.3 |
|
389 * @param aState, ETrue auto change state, EFalse manual change state. |
|
390 * @return None. |
|
391 */ |
|
392 virtual void SetAutoChangeStateFlag( TBool aState = ETrue ) = 0; |
|
393 |
|
394 /** |
|
395 * check change state flag. |
|
396 * |
|
397 * @since S60 v3.2.3 |
|
398 * @param None. |
|
399 * @return ETrue atuo change state, EFalse others. |
|
400 */ |
|
401 virtual TBool GetAutoChangeStateFlag() = 0; |
|
402 |
|
403 |
|
404 /** |
|
405 * Set all the keystroke valid flag. |
|
406 * |
|
407 * @since S60 v3.2.3 |
|
408 * @param aState, ETrue all the keystroke is valid, EFalse others. |
|
409 * @return None. |
|
410 */ |
|
411 virtual void SetAllValidFlag( TBool aState = ETrue ) = 0; |
|
412 |
|
413 /** |
|
414 * Get all the keystroke valid flag. |
|
415 * |
|
416 * @since S60 v3.2.3 |
|
417 * @param None. |
|
418 * @return ETrue all the keystroke is valid, EFalse others. |
|
419 */ |
|
420 virtual TBool GetAllValidFlag() = 0; |
|
421 |
|
422 /** |
|
423 * Set the keystroke invalid index. |
|
424 * |
|
425 * @since S60 v3.2.3 |
|
426 * @param aIndex, the keystroke invalid index. |
|
427 * @return None. |
|
428 */ |
|
429 virtual void SetInvalidIndex( TInt aIndex = 0 ) = 0; |
|
430 |
|
431 /** |
|
432 * Get all the invalid keystroke index. |
|
433 * |
|
434 * @since S60 v3.2.3 |
|
435 * @param None. |
|
436 * @return invalid keystroke index. |
|
437 */ |
|
438 virtual TInt GetInvalidIndex() = 0; |
|
439 |
|
440 /** |
|
441 * Set Phrase Creation flag. |
|
442 * |
|
443 * @since S60 v3.2.3 |
|
444 * @param aState, ETrue is phrase creation, EFalse others. |
|
445 * @return None. |
|
446 */ |
|
447 virtual void SetPhraseCreationFlag( TBool aState ) = 0; |
|
448 |
|
449 /** |
|
450 * Get Phrase Creation flag. |
|
451 * |
|
452 * @since S60 v3.2.3 |
|
453 * @param None. |
|
454 * @return ETrue is phrase creation, EFalse others. |
|
455 */ |
|
456 virtual TBool GetPhraseCreationFlag() = 0; |
|
457 |
|
458 /** |
|
459 * Set Phrase Candidate state need refresh UI flag. |
|
460 * |
|
461 * @since S60 v3.2.3 |
|
462 * @param aState, ETrue is that Candidate state need refresh UI,other don't need. |
|
463 * @return None. |
|
464 */ |
|
465 virtual void SetCandidateRefreshFlag( TBool aState ) = 0; |
|
466 |
|
467 /** |
|
468 * Get Phrase Candidate state need refresh UI flag. |
|
469 * |
|
470 * @since S60 v3.2.3 |
|
471 * @param None. |
|
472 * @return ETrue is that Candidate state need refresh UI,EFalse don't need. |
|
473 */ |
|
474 virtual TBool GetCandidateRefreshFlag() = 0; |
|
475 |
|
476 /** |
|
477 * Set the delimiter count of keystroke. |
|
478 * |
|
479 * @since S60 v3.2.3 |
|
480 * @param aCount, the delimiter count of keystroke. |
|
481 * @return None. |
|
482 */ |
|
483 virtual void SetDelimiterCount( TInt aCount ) = 0; |
|
484 |
|
485 /** |
|
486 * Get the delimiter count of keystroke. |
|
487 * |
|
488 * @since S60 v3.2.3 |
|
489 * @param None. |
|
490 * @return aCount, the delimiter count of keystroke. |
|
491 */ |
|
492 virtual TInt GetDelimiterCount() = 0; |
|
493 |
|
494 /** |
|
495 * Get current cba resource id. |
|
496 * |
|
497 * @since S60 v3.2.3 |
|
498 * @param None. |
|
499 * @return current cba resource id. |
|
500 */ |
|
501 virtual TInt GetCurrentCBAResID() = 0; |
|
502 |
|
503 /** |
|
504 * Set current cba resource id. |
|
505 * |
|
506 * @since S60 v3.2.3 |
|
507 * @param aResourceId, current cba resource id. |
|
508 * @return None. |
|
509 */ |
|
510 virtual void SetCurrentCBAResID( TInt aResourceId) = 0; |
|
511 |
|
512 virtual void SetEffictiveLength( TInt aLength ) = 0; |
|
513 |
|
514 virtual TInt GetEffictiveLength() = 0; |
|
515 |
|
516 virtual void DecEffictiveLength() = 0; |
|
517 |
|
518 virtual void AddEffictiveLength() = 0; |
|
519 |
|
520 virtual void SetNeedClearDeliberateSelection( TBool aNeedClearDeliberateSelection ) = 0; |
|
521 |
|
522 virtual TBool NeedClearDeliberateSelection() = 0; |
|
523 /** |
|
524 * Return keycode array. |
|
525 * |
|
526 * @since S60 v3.2.3 |
|
527 * @param None. |
|
528 * @return pointer of array. |
|
529 */ |
|
530 virtual RArray<TInt>* KeycodeArray() = 0; |
|
531 |
|
532 /** |
|
533 * Return phrase keycode array. |
|
534 * |
|
535 * @since S60 v3.2.3 |
|
536 * @param None. |
|
537 * @return pointer of array. |
|
538 */ |
|
539 virtual RArray<TInt>* PhraseKeycodeArray() = 0; |
|
540 }; |
|
541 |
|
542 #endif /*M_AKNFEPUICTRLEDITPANE_H*/ |
|
543 |
|
544 //End of File |
|
545 |