|
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 CAknFepUICtrlPinyinPopup class definitions. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef AKN_FEP_UI_EDIT_ENTRY_POPUP_H |
|
30 #define AKN_FEP_UI_EDIT_ENTRY_POPUP_H |
|
31 |
|
32 #include <e32std.h> |
|
33 |
|
34 class MAknFepUICtrlEditEntryPopup |
|
35 { |
|
36 public: |
|
37 enum |
|
38 { |
|
39 ESpellingChanged = 0x0001, |
|
40 ESpellingNavigation = 0x0002, |
|
41 EDispPageChanged = 0x0004 |
|
42 }; |
|
43 /** |
|
44 * The cursor move orientation. |
|
45 */ |
|
46 enum TMoveDirect |
|
47 { |
|
48 ELeft = 0, |
|
49 ERight = 1 |
|
50 }; |
|
51 /** |
|
52 * The number of selections that can be displayed in the popup. |
|
53 */ |
|
54 enum |
|
55 { |
|
56 EMaxToneMarkLength = 1, |
|
57 EMaxCandidates = 6, |
|
58 EMaxCandidateCharsNotIncludingToneMark = 6, |
|
59 EMaxCandidateChars = EMaxCandidateCharsNotIncludingToneMark + EMaxToneMarkLength, |
|
60 EMaxPhraseCandidate = 10 |
|
61 }; |
|
62 |
|
63 typedef TBufC<EMaxToneMarkLength> TToneMark; |
|
64 |
|
65 public: |
|
66 |
|
67 /** |
|
68 * This function move the cursor in the EEP. |
|
69 * |
|
70 * @param aMoveDirect if ELeft, the cursor move left |
|
71 * if ERight, the cursor move right |
|
72 * |
|
73 * @return EFalse if the cursor can't move again other ETrue. |
|
74 */ |
|
75 virtual TBool Move( TInt aMoveDirect ) const = 0; |
|
76 |
|
77 /** |
|
78 * This function move the cursor in the EEP. |
|
79 * |
|
80 * @param aCount the number of the verifide Key sequence. |
|
81 * |
|
82 * @return None |
|
83 */ |
|
84 virtual void SetVerifiedKeySequenceCount( TInt aCount ) const = 0; |
|
85 |
|
86 /** |
|
87 * This function move the cursor in the EEP. |
|
88 * |
|
89 * @param aFlag if ETrue, the key sequence is verified |
|
90 * if EFalse, the key sequence is not verified. |
|
91 * |
|
92 * @return EFalse if the cursor can't move again other ETrue. |
|
93 */ |
|
94 virtual TBool SetVerifiedKeySequenceFlag( TBool aFlag) const = 0; |
|
95 |
|
96 /** |
|
97 * This function returns the index of the selected phrase item . |
|
98 * |
|
99 * @return aIndex index of entry in window, zero based |
|
100 */ |
|
101 virtual TInt CurrentSelection() const = 0; |
|
102 |
|
103 /** |
|
104 * This function returns the visible index of the selected item. |
|
105 * |
|
106 * @return aIndex index of entry in window, zero based |
|
107 */ |
|
108 virtual TInt CurrentVisibleSelection() const = 0; |
|
109 |
|
110 /** |
|
111 * Enables the display of the control. Sets the control's |
|
112 * window postion and visibility, but only if the value has |
|
113 * changed (so it's ok to call it excessively). |
|
114 * |
|
115 * @param aEnable if ETrue, makes visible |
|
116 * if EFalse, makes non-visible |
|
117 * |
|
118 */ |
|
119 virtual void Enable(TBool aEnable) = 0; |
|
120 /** |
|
121 * set the number of selections that are visible |
|
122 * |
|
123 * @param aCount the number of visible selections, must be |
|
124 * 0 < aCount <= KMaxNumberOfSelections |
|
125 */ |
|
126 virtual void SetVisibleCount(TInt aCount) = 0; |
|
127 |
|
128 /** |
|
129 * get the current visible selection count |
|
130 * |
|
131 * @return visible selection count |
|
132 */ |
|
133 virtual TInt VisibleSelectionCount() const = 0; |
|
134 |
|
135 |
|
136 /** |
|
137 * This sets the string of the internal buffer for the item index aIndex to aText, |
|
138 * even if the index falls outside the current visible candidates. |
|
139 * |
|
140 * @param aText new contents of text item |
|
141 * @return ETrue if successful |
|
142 * EFalse if index outside visible candidates (but value is still set) |
|
143 * |
|
144 */ |
|
145 virtual TBool SetItemText(TInt aIndex, const TDesC& aText) = 0; |
|
146 |
|
147 /** |
|
148 * Sets the string of the internal buffer for visible item |
|
149 */ |
|
150 virtual TBool SetPhraseItemTexts() = 0; |
|
151 |
|
152 /** |
|
153 * This function gets the text at the index aIndex. |
|
154 * |
|
155 * @param aIndex index of entry in window, zero based |
|
156 * @output aText contains contents of text item |
|
157 * @return ETrue always |
|
158 * |
|
159 */ |
|
160 virtual TBool GetItemText(TInt aIndex, TDes& aText) const = 0; |
|
161 |
|
162 /** |
|
163 * This function sets the Tone Mark for a specific entry |
|
164 * |
|
165 * @param aIndex index of entry |
|
166 * @param aToneMark the tone mark |
|
167 * |
|
168 */ |
|
169 virtual void SetToneMark(TInt aIndex, const TDesC& aToneMark) = 0; |
|
170 |
|
171 /** |
|
172 * This function sets the validity of the tonemark |
|
173 * |
|
174 * @param aIndex index of the entry to be affected |
|
175 * @param aValid if ETrue, tonemark will be displayed as valid |
|
176 * if EFalse, tonemark will be displayed as not valid |
|
177 */ |
|
178 virtual void SetItemToneMarkValidity(TInt aIndex, TBool aValid) = 0; |
|
179 /** |
|
180 * Is the control enabled for display? |
|
181 * |
|
182 * @return if not enabled, return EFalse |
|
183 */ |
|
184 virtual TBool IsEnabled() const = 0; |
|
185 |
|
186 /** |
|
187 * Select the next visible item. If already on the last one, loop to the |
|
188 * first one. |
|
189 * |
|
190 * @return ETrue if success, |
|
191 * EFalse if no items visible, or if selection is outside visible items |
|
192 */ |
|
193 virtual TBool SelectNextPhrase() = 0; |
|
194 |
|
195 /** |
|
196 * Select the previous visible item. If already on the first one, loop to the |
|
197 * last one. |
|
198 * |
|
199 * @return ETrue if success, |
|
200 * EFalse if no items visible, or if selection is outside visible items |
|
201 */ |
|
202 virtual TBool SelectPrevPhrase() = 0; |
|
203 |
|
204 /** |
|
205 * Return Pinyin spelling candidate array |
|
206 */ |
|
207 virtual CDesCArrayFlat* PhoneticSpellingArray(void) = 0; |
|
208 |
|
209 /** |
|
210 * Split phrase pinyin spelling candidates into pages |
|
211 */ |
|
212 virtual void SplitPhraseSpellingIntoPages(void) = 0; |
|
213 |
|
214 /** |
|
215 * Split pinyin spelling candidates into pages |
|
216 */ |
|
217 virtual void SplitSpellingIntoPages(TInt aCount) = 0; |
|
218 |
|
219 /** |
|
220 * Set display page for deliberate selection |
|
221 */ |
|
222 virtual void SetDisplayPage(TInt aSelection) = 0; |
|
223 |
|
224 /** |
|
225 * Return keystroke array |
|
226 */ |
|
227 virtual CDesCArrayFlat* KeystrokeArray(void) = 0; |
|
228 |
|
229 /** |
|
230 * return in effect keystroke array |
|
231 */ |
|
232 virtual CDesCArrayFlat* InEffectKeystrokeArray(void) = 0; |
|
233 |
|
234 /** |
|
235 * Return show keystroke array |
|
236 */ |
|
237 virtual CDesCArrayFlat* ShowKeystrokeArray(void) = 0; |
|
238 |
|
239 /** |
|
240 * Return current page start spelling index |
|
241 */ |
|
242 virtual TInt CurrentPageStartIndex(void) = 0; |
|
243 virtual void SetFlag(TInt aFlag) = 0; |
|
244 virtual void ClearFlag(TInt aFlag) = 0; |
|
245 virtual TBool IsFlagSet(TInt aFlag) const = 0; |
|
246 virtual void PopupSizeChanged() = 0; |
|
247 }; |
|
248 |
|
249 #endif // AKN_FEP_UI_EDIT_ENTRY_POPUP_H |
|
250 |
|
251 // End of file |