|
1 /* |
|
2 * Copyright (c) 2002-2007 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_PENINPUTVKBDATAMGR_H |
|
20 #define C_PENINPUTVKBDATAMGR_H |
|
21 |
|
22 // System includes |
|
23 #include <peninputdatamgr.h> |
|
24 |
|
25 // User includes |
|
26 |
|
27 // Forward decalaration |
|
28 class MPeninputLayoutContext; |
|
29 class CPtiEngine; |
|
30 |
|
31 // class declarations |
|
32 /** |
|
33 * Data manager class |
|
34 * |
|
35 * @lib peninputvkbjp.lib |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class CPeninputVkbDataMgr: public CPeninputDataMgr |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Create one CPeninputVkbDataMgr object |
|
43 * |
|
44 * @since S60 v3.2 |
|
45 * @param aContext The layout context |
|
46 * @return CPeninputVkbDataMgr object. |
|
47 */ |
|
48 static CPeninputVkbDataMgr* NewL(MPeninputLayoutContext* aContext); |
|
49 |
|
50 /** |
|
51 * Create one CPeninputVkbDataMgr object |
|
52 * |
|
53 * @since S60 v3.2 |
|
54 * @param aContext The layout context |
|
55 * @return The CPeninputVkbDataMgr object. |
|
56 */ |
|
57 static CPeninputVkbDataMgr* NewLC(MPeninputLayoutContext* aContext); |
|
58 |
|
59 /** |
|
60 * Destructor |
|
61 * |
|
62 * @since S60 v3.2 |
|
63 * @return None. |
|
64 */ |
|
65 virtual ~CPeninputVkbDataMgr(); |
|
66 |
|
67 /** |
|
68 * From CPeninputDataMgr |
|
69 * instesd of "void InitMore();" |
|
70 * |
|
71 * @since S60 v3.2 |
|
72 * @return None |
|
73 */ |
|
74 void InitMoreJpL(); |
|
75 |
|
76 |
|
77 /** |
|
78 * Get PtiEngine |
|
79 * |
|
80 * @since S60 v3.2 |
|
81 * @return ptiengine. |
|
82 */ |
|
83 CPtiEngine* PtiEngine(); |
|
84 |
|
85 /** |
|
86 * Get Predictive flag |
|
87 * |
|
88 * @since S60 v3.2 |
|
89 * @return The predictive flag. |
|
90 */ |
|
91 TBool Predictive() const; |
|
92 |
|
93 /** |
|
94 * Get full or half flag |
|
95 * |
|
96 * @since S60 v3.2 |
|
97 * @return The full or half flag. |
|
98 */ |
|
99 TInt FullHalf() const; |
|
100 |
|
101 /** |
|
102 * Get japanese flags |
|
103 * |
|
104 * @since S60 v3.2 |
|
105 * @return japanese flags. |
|
106 */ |
|
107 TInt JapaneseFlags() const; |
|
108 |
|
109 /** |
|
110 * Set permitted range |
|
111 * |
|
112 * @since S60 v3.2 |
|
113 * @param aRange The new value |
|
114 * @return None. |
|
115 */ |
|
116 void SetPermittedRange(TInt aRange); |
|
117 |
|
118 /** |
|
119 * Set ptiEngine InputMode by new range |
|
120 * |
|
121 * @since S60 v3.2 |
|
122 * @param aRange The new Range |
|
123 * @return None. |
|
124 */ |
|
125 void SetEngineInputMode(TInt aRange); |
|
126 |
|
127 /** |
|
128 * Set predictive |
|
129 * |
|
130 * @since S60 v3.2 |
|
131 * @param aPredictive ETrue:show prediction pane EFalse:not show |
|
132 * @return None. |
|
133 */ |
|
134 void SetPredictive(TBool aPredictive); |
|
135 |
|
136 /** |
|
137 * Set full or half |
|
138 * |
|
139 * @since S60 v3.2 |
|
140 * @param aFullHalf 0:half 1:full |
|
141 * @return None. |
|
142 */ |
|
143 void SetFullHalf(TInt aFullHalf); |
|
144 |
|
145 /** |
|
146 * Set backspace or delete |
|
147 * |
|
148 * @since S60 v3.2 |
|
149 * @param aClear 0:backspace 1:delete |
|
150 * @return None. |
|
151 */ |
|
152 void SetClear(TInt aClear); |
|
153 |
|
154 /** |
|
155 * Set JapaneseFlags |
|
156 * |
|
157 * @since S60 v3.2 |
|
158 * @param aJapaneseFlags |
|
159 * @return None. |
|
160 */ |
|
161 void SetJapaneseFlags(TInt aJapaneseFlags); |
|
162 |
|
163 /** |
|
164 * kana : handle dakuten hanndakuten little |
|
165 * |
|
166 * @since S60 v3.2 |
|
167 * @param aEventData The event data |
|
168 * @param aPreChar The previous character |
|
169 * @param aStatus ETrue:handled EFalse:not handled |
|
170 * @param aSendText 1:Send Text |
|
171 */ |
|
172 void HandleFunctionalVkbEventL(const TDesC& aEventData, TUint aPreChar, TBool& aStatus, TInt& aSendText); |
|
173 |
|
174 /** |
|
175 * half katakana : handle dakuten hanndakuten |
|
176 * |
|
177 * @since S60 v3.2 |
|
178 * @param aEventData The event data(dakuten or hanndakuten) |
|
179 * @param aPreChar The previous character |
|
180 * @param aPrePreChar The previous previous character |
|
181 * @param aStatus ETrue:handled EFalse:not handled |
|
182 * @param aSendText 1:Send Text |
|
183 */ |
|
184 void HandleFunctionalVkbEventWithPrePreCharL(const TDesC& aEventData, TUint aPreChar, TUint aPrePreChar, TBool& aStatus, TInt& aSendText); |
|
185 |
|
186 /** |
|
187 * kana : handle touten,kuten |
|
188 * |
|
189 * @since S60 v3.2 |
|
190 * @param anewChar initial/converted character |
|
191 * @return ETrue:converted EFalse:not converted |
|
192 */ |
|
193 TBool ConvertCommaFullStop(TUint& aNewChar) const; |
|
194 |
|
195 /** |
|
196 * Clear direction |
|
197 * |
|
198 * @since S60 v3.2 |
|
199 * @return TInt 1:delete 0:backspace |
|
200 */ |
|
201 TInt ClearDirection() const; |
|
202 |
|
203 protected: |
|
204 |
|
205 /** |
|
206 * Constructor |
|
207 * |
|
208 * @since S60 v3.2 |
|
209 * @param aContext The layout context |
|
210 * @return None. |
|
211 */ |
|
212 CPeninputVkbDataMgr(MPeninputLayoutContext* aContext); |
|
213 |
|
214 /** |
|
215 * 2nd constructor function |
|
216 * |
|
217 * @since S60 v3.2 |
|
218 * @return None. |
|
219 */ |
|
220 void ConstructL(); |
|
221 |
|
222 private: // Data |
|
223 |
|
224 /** |
|
225 * The pti engine |
|
226 * Own |
|
227 */ |
|
228 CPtiEngine* iPtiEngine; |
|
229 |
|
230 /** |
|
231 * prediction pane on/off |
|
232 */ |
|
233 TBool iPredictive; |
|
234 |
|
235 /** |
|
236 * 0:half 1:full |
|
237 */ |
|
238 TInt iFullHalf; |
|
239 |
|
240 /** |
|
241 * backspace or delete |
|
242 * 1:delete 0:Backspace |
|
243 */ |
|
244 TInt iClear; |
|
245 |
|
246 /** |
|
247 * Japanese Qwerty Comma ON(Japanese)/OFF(Western) |
|
248 * EPenInputJapaneseSettingQwertyComma = 0x00000010, |
|
249 * Japanese Qwerty Period ON(Japanese)/OFF(Western) |
|
250 * EPenInputJapaneseSettingQwertyPeriod = 0x00000020, |
|
251 * Japanese Qwerty Width Of Space ON(Full)/OFF(Half) |
|
252 * EPenInputJapaneseSettingQwertyWidthOfSpace = 0x00000040, |
|
253 */ |
|
254 TInt iJapaneseFlags; |
|
255 }; |
|
256 |
|
257 |
|
258 #endif // C_PENINPUTVKBDATAMGR_H |
|
259 |
|
260 // End Of File |