|
1 /* |
|
2 * Copyright (c) 2004 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 TAknFepInputStateEntryPinyinPhrase definition. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 #ifndef __AKN_FEP_UI_INPUT_STATE_INPUT_PINYIN_PHRASE_H__ |
|
31 #define __AKN_FEP_UI_INPUT_STATE_INPUT_PINYIN_PHRASE_H__ |
|
32 |
|
33 #include "AknFepUiInputStateChineseBase.h" |
|
34 |
|
35 class TAknFepInputStateEntryPinyinPhrase : public TAknFepInputStateChineseBase |
|
36 { |
|
37 public: |
|
38 TAknFepInputStateEntryPinyinPhrase( |
|
39 MAknFepUIManagerStateInterface* aOwner, |
|
40 MAknFepUICtrlContainerChinese* aUIContainer); |
|
41 TBool HandleKeyL(TInt aKey, TKeyPressLength aLength); |
|
42 void InitializeStateL(); |
|
43 |
|
44 void HandleCommandL(TInt aCommandId); |
|
45 private: |
|
46 void ClearDeliberateSelection(); |
|
47 void DeliberatelyUpdateSelection(); |
|
48 void ImplicitlyUpdateSelection(); |
|
49 void RefreshUI(TInt aSelection); |
|
50 void UpdateIndicator(); |
|
51 |
|
52 //the follow 12 functions for phrase creation |
|
53 /** |
|
54 * Optimize spelling. |
|
55 * |
|
56 * @since S60 v5.0. |
|
57 * @param aOptimizeBefore the before spelling array be Optimized. |
|
58 * @param aOptimizeAfter the after spelling array be Optimized.. |
|
59 * @return None. |
|
60 */ |
|
61 void OptimizeSpellingL(CDesCArrayFlat& aOptimizeBefore, |
|
62 CDesCArrayFlat& aOptimizeAfter); |
|
63 |
|
64 /** |
|
65 * Delete current keystroke. |
|
66 * |
|
67 * @since S60 v5.0. |
|
68 * @return None. |
|
69 */ |
|
70 void DeleteCurrentKeystroke(); |
|
71 |
|
72 /** |
|
73 * Add current keystroke. |
|
74 * |
|
75 * @since S60 v5.0. |
|
76 * @param keystroke input keystroke. |
|
77 * @return None. |
|
78 */ |
|
79 void AddCurrentKeystrokeL(const TDesC& keystroke); |
|
80 |
|
81 /** |
|
82 * Get the keystroke. |
|
83 * |
|
84 * @since S60 v5.0. |
|
85 * @param aKey input key. |
|
86 * @param aKeystroke the aKey's keytroke. |
|
87 * @return None. |
|
88 */ |
|
89 void GetKeystrokeNum(TInt aKey, TDes& aKeystroke); |
|
90 |
|
91 /** |
|
92 * Get the keystroke buf. |
|
93 * |
|
94 * @since S60 v5.0. |
|
95 * @param aKeystrokeArray keytroke array. |
|
96 * @param aKeystrokeBuf the keytroke buf. |
|
97 * @return None. |
|
98 */ |
|
99 void GetKeystrokeBuf(const CDesCArrayFlat& aKeystrokeArray, |
|
100 TDes& aKeystrokeBuf); |
|
101 |
|
102 /** |
|
103 * clear keystroke. |
|
104 * |
|
105 * @since S60 v5.0. |
|
106 * @return None. |
|
107 */ |
|
108 void ClearKeystrokeBuf(); |
|
109 |
|
110 /** |
|
111 * Get tome mark. |
|
112 * |
|
113 * @since S60 v5.0. |
|
114 * @param aKeystrokeArray keytroke array. |
|
115 * @param aPinyinToneMark the tone mark. |
|
116 * @return None. |
|
117 */ |
|
118 void GetPinyinToneMark(const CDesCArrayFlat& aKeystrokeArray, |
|
119 TDes& aPinyinToneMark); |
|
120 |
|
121 /** |
|
122 * Check keystroke. |
|
123 * |
|
124 * @since S60 v5.0. |
|
125 * @param aKeystrokeArray keytroke array. |
|
126 * @param aPinyinToneMark the tone mark. |
|
127 * @return None. |
|
128 */ |
|
129 TBool CheckKeystroke(TInt aKey, const CDesCArrayFlat& aKeystrokeArray); |
|
130 |
|
131 /** |
|
132 * Check tome mark. |
|
133 * |
|
134 * @since S60 v5.0. |
|
135 * @return None. |
|
136 */ |
|
137 void CheckTonemarkL(); |
|
138 |
|
139 /** |
|
140 * Get change state. |
|
141 * |
|
142 * @since S60 v5.0. |
|
143 * @return ETrue change state, EFasle others. |
|
144 */ |
|
145 TBool GetChangeState(); |
|
146 |
|
147 /** |
|
148 * Append show keystroke. |
|
149 * |
|
150 * @since S60 v5.0. |
|
151 * @param aShowKeystrokeArray the show keytroke array. |
|
152 * @param aKeystrokeArray the keytroke array. |
|
153 * @param aPinyinToneMark the tome mark. |
|
154 * @return None. |
|
155 */ |
|
156 void ShowKeystrokeAppendL(CDesCArrayFlat& aShowKeystrokeArray, |
|
157 const CDesCArrayFlat& aKeystrokeArray, const TDesC& aPinyinToneMark); |
|
158 |
|
159 /** |
|
160 * change CBA. |
|
161 * |
|
162 * @since S60 v5.0. |
|
163 * @return None. |
|
164 */ |
|
165 void ChangeCbaL(); |
|
166 }; |
|
167 |
|
168 #endif //__AKN_FEP_UI_INPUT_STATE_INPUT_PINYIN_PHRASE_H__ |
|
169 |
|
170 // End of file |