21
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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: Implementation for chinese peninput finger hwr
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
#include <peninputcmd.h>
|
|
18 |
|
|
19 |
#include "peninputfingerhwrlayout.h"
|
|
20 |
#include "peninputfingerhwrwnd.h"
|
|
21 |
#include "peninputfingerhwrstatemanager.h"
|
|
22 |
#include "peninputfingerhwrdatastore.h"
|
|
23 |
#include "peninputfingerhwrevent.h"
|
|
24 |
#include "peninputfingerhwrtriggerstr.h"
|
|
25 |
|
|
26 |
|
|
27 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
28 |
// CPeninputFingerHwrStateHandlerBase class
|
|
29 |
// -----------------------------------------------------------------------------
|
|
30 |
// CPeninputFingerHwrStateHandlerBase::CPeninputFingerHwrStateHandlerBase()
|
|
31 |
// .
|
|
32 |
// -----------------------------------------------------------------------------
|
|
33 |
//
|
|
34 |
CPeninputFingerHwrStateHandlerBase::CPeninputFingerHwrStateHandlerBase(
|
|
35 |
CPeninputFingerHwrStateManagerBase& aStateManager )
|
|
36 |
:iStateManager( aStateManager ),
|
|
37 |
iDataStore( aStateManager.HwrLayout().DataStore() )
|
|
38 |
{
|
|
39 |
|
|
40 |
}
|
|
41 |
|
|
42 |
// -----------------------------------------------------------------------------
|
|
43 |
// CPeninputFingerHwrStateHandlerBase::~CPeninputFingerHwrStateHandlerBase()
|
|
44 |
// .
|
|
45 |
// -----------------------------------------------------------------------------
|
|
46 |
//
|
|
47 |
CPeninputFingerHwrStateHandlerBase::~CPeninputFingerHwrStateHandlerBase()
|
|
48 |
{
|
|
49 |
|
|
50 |
}
|
|
51 |
|
|
52 |
|
|
53 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
54 |
// CPeninputFingerHwrStateManager class
|
|
55 |
// -----------------------------------------------------------------------------
|
|
56 |
// CPeninputFingerHwrStateManager::CPeninputFingerHwrStateManager()
|
|
57 |
// .
|
|
58 |
// -----------------------------------------------------------------------------
|
|
59 |
//
|
|
60 |
CPeninputFingerHwrStateManagerBase::CPeninputFingerHwrStateManagerBase(
|
|
61 |
CPeninputFingerHwrLayout* aLayout )
|
|
62 |
:iLayout(aLayout)
|
|
63 |
{
|
|
64 |
|
|
65 |
}
|
|
66 |
|
|
67 |
// -----------------------------------------------------------------------------
|
|
68 |
// CPeninputFingerHwrStateManager::~CPeninputFingerHwrStateManager()
|
|
69 |
// .
|
|
70 |
// -----------------------------------------------------------------------------
|
|
71 |
//
|
|
72 |
CPeninputFingerHwrStateManagerBase::~CPeninputFingerHwrStateManagerBase()
|
|
73 |
{
|
|
74 |
}
|
|
75 |
|
|
76 |
// -----------------------------------------------------------------------------
|
|
77 |
// CPeninputFingerHwrStateManager::CosntructL()
|
|
78 |
// .
|
|
79 |
// -----------------------------------------------------------------------------
|
|
80 |
//
|
|
81 |
void CPeninputFingerHwrStateManagerBase::BaseConstructL()
|
|
82 |
{
|
|
83 |
|
|
84 |
}
|
|
85 |
|
|
86 |
// -----------------------------------------------------------------------------
|
|
87 |
// CPeninputFingerHwrStateManagerBase::SetState()
|
|
88 |
// .
|
|
89 |
// -----------------------------------------------------------------------------
|
|
90 |
//
|
|
91 |
void CPeninputFingerHwrStateManagerBase::SetState( TInt /*aState*/ )
|
|
92 |
{
|
|
93 |
|
|
94 |
}
|
|
95 |
|
|
96 |
// -----------------------------------------------------------------------------
|
|
97 |
// CPeninputFingerHwrStateManagerBase::IsStandbyState()
|
|
98 |
// .
|
|
99 |
// -----------------------------------------------------------------------------
|
|
100 |
//
|
|
101 |
TBool CPeninputFingerHwrStateManagerBase::IsStandbyState()
|
|
102 |
{
|
|
103 |
if(iCurrentState == 0)
|
|
104 |
{
|
|
105 |
return ETrue;
|
|
106 |
}
|
|
107 |
|
|
108 |
return EFalse;
|
|
109 |
}
|
|
110 |
|
|
111 |
|
|
112 |
// -----------------------------------------------------------------------------
|
|
113 |
// CPeninputFingerHwrStateManagerBase::HandleEventL()
|
|
114 |
// .
|
|
115 |
// -----------------------------------------------------------------------------
|
|
116 |
//
|
|
117 |
void CPeninputFingerHwrStateManagerBase::HandleEventL( const TInt /*aEventType*/,
|
|
118 |
const TDesC& /*aEventData*/)
|
|
119 |
{
|
|
120 |
|
|
121 |
}
|
|
122 |
|
|
123 |
CPeninputFingerHwrLayout& CPeninputFingerHwrStateManagerBase::HwrLayout()
|
|
124 |
{
|
|
125 |
return *iLayout;
|
|
126 |
}
|
|
127 |
|
|
128 |
|
|
129 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
130 |
// CPeninputFingerHwrStateManager class
|
|
131 |
// -----------------------------------------------------------------------------
|
|
132 |
// CPeninputFingerHwrStateManagerCn::NewL()
|
|
133 |
// .
|
|
134 |
// -----------------------------------------------------------------------------
|
|
135 |
//
|
|
136 |
CPeninputFingerHwrStateManagerCn* CPeninputFingerHwrStateManagerCn::NewL(
|
|
137 |
CPeninputFingerHwrLayout* aLayout )
|
|
138 |
{
|
|
139 |
CPeninputFingerHwrStateManagerCn* self = new( ELeave )
|
|
140 |
CPeninputFingerHwrStateManagerCn( aLayout );
|
|
141 |
CleanupStack::PushL( self );
|
|
142 |
self->ConstructL();
|
|
143 |
CleanupStack::Pop();
|
|
144 |
return self;
|
|
145 |
}
|
|
146 |
|
|
147 |
// -----------------------------------------------------------------------------
|
|
148 |
// CPeninputFingerHwrStateManagerCn::CPeninputFingerHwrStateManager()
|
|
149 |
// .
|
|
150 |
// -----------------------------------------------------------------------------
|
|
151 |
//
|
|
152 |
CPeninputFingerHwrStateManagerCn::CPeninputFingerHwrStateManagerCn(
|
|
153 |
CPeninputFingerHwrLayout* aLayout )
|
|
154 |
:CPeninputFingerHwrStateManagerBase( aLayout )
|
|
155 |
{
|
|
156 |
|
|
157 |
}
|
|
158 |
|
|
159 |
// -----------------------------------------------------------------------------
|
|
160 |
// CPeninputFingerHwrStateManagerCn::~CPeninputFingerHwrStateManager()
|
|
161 |
// .
|
|
162 |
// -----------------------------------------------------------------------------
|
|
163 |
//
|
|
164 |
CPeninputFingerHwrStateManagerCn::~CPeninputFingerHwrStateManagerCn()
|
|
165 |
{
|
|
166 |
for( int i = 0; i < EPeninputFingerHwrStateCountCn; ++i )
|
|
167 |
{
|
|
168 |
delete iStateHandlers[i];
|
|
169 |
}
|
|
170 |
}
|
|
171 |
|
|
172 |
// -----------------------------------------------------------------------------
|
|
173 |
// CPeninputFingerHwrStateManagerCn::CosntructL()
|
|
174 |
// .
|
|
175 |
// -----------------------------------------------------------------------------
|
|
176 |
//
|
|
177 |
void CPeninputFingerHwrStateManagerCn::ConstructL()
|
|
178 |
{
|
|
179 |
BaseConstructL();
|
|
180 |
|
|
181 |
TInt i = 0;
|
|
182 |
|
|
183 |
iStates[i] = EPeninputFingerHwrStateStandbyCn;
|
|
184 |
iStateHandlers[i] = CPeninputFingerHwrChineseStateStandby::NewL( *this );
|
|
185 |
|
|
186 |
iStates[++i] = EPeninputFingerHwrStateWritingCn;
|
|
187 |
iStateHandlers[i] = CPeninputFingerHwrChineseStateWriting::NewL( *this );
|
|
188 |
|
|
189 |
iStates[++i] = EPeninputFingerHwrStateCandidateSelectingCn;
|
|
190 |
iStateHandlers[i] =
|
|
191 |
CPeninputFingerHwrChineseStateCandidateSelecting::NewL( *this );
|
|
192 |
|
|
193 |
iStates[++i] = EPeninputFingerHwrStatePredictSelectingCn;
|
|
194 |
iStateHandlers[i] =
|
|
195 |
CPeninputFingerHwrChineseStatePredictSelecting::NewL( *this );
|
|
196 |
|
|
197 |
iCurrentStateHandler = iStateHandlers[0];
|
|
198 |
iCurrentState = EPeninputFingerHwrStateStandbyCn;
|
|
199 |
}
|
|
200 |
|
|
201 |
// -----------------------------------------------------------------------------
|
|
202 |
// CPeninputFingerHwrStateManagerCn::SetState()
|
|
203 |
// .
|
|
204 |
// -----------------------------------------------------------------------------
|
|
205 |
//
|
|
206 |
void CPeninputFingerHwrStateManagerCn::SetState( TInt aState )
|
|
207 |
{
|
|
208 |
if( iCurrentState == aState )
|
|
209 |
{
|
|
210 |
return;
|
|
211 |
}
|
|
212 |
|
|
213 |
CPeninputFingerHwrStateHandlerBase* newStateHandler = Find( (TPeninputFingerHwrStateCn)aState );
|
|
214 |
if( newStateHandler )
|
|
215 |
{
|
|
216 |
iCurrentState = (TPeninputFingerHwrStateCn)aState;
|
|
217 |
iCurrentStateHandler->OnExit();
|
|
218 |
iCurrentStateHandler = newStateHandler;
|
|
219 |
iCurrentStateHandler->OnEntry();
|
|
220 |
}
|
|
221 |
}
|
|
222 |
|
|
223 |
// -----------------------------------------------------------------------------
|
|
224 |
// CPeninputFingerHwrStateManagerCn::Find()
|
|
225 |
// .
|
|
226 |
// -----------------------------------------------------------------------------
|
|
227 |
//
|
|
228 |
CPeninputFingerHwrStateHandlerBase* CPeninputFingerHwrStateManagerCn::Find(
|
|
229 |
TPeninputFingerHwrStateCn aState )
|
|
230 |
{
|
|
231 |
for( TInt i = 0; i < EPeninputFingerHwrStateCountCn; i++ )
|
|
232 |
{
|
|
233 |
if( iStates[i] == aState )
|
|
234 |
{
|
|
235 |
return iStateHandlers[i];
|
|
236 |
}
|
|
237 |
}
|
|
238 |
return NULL;
|
|
239 |
}
|
|
240 |
|
|
241 |
// -----------------------------------------------------------------------------
|
|
242 |
// CPeninputFingerHwrStateManagerCn::HandleEventL()
|
|
243 |
// .
|
|
244 |
// -----------------------------------------------------------------------------
|
|
245 |
//
|
|
246 |
void CPeninputFingerHwrStateManagerCn::HandleEventL( const TInt aEventType,
|
|
247 |
const TDesC& aEventData )
|
|
248 |
{
|
|
249 |
iCurrentStateHandler->HandleEventL( aEventType, aEventData );
|
|
250 |
}
|
|
251 |
|
|
252 |
|
|
253 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
254 |
// CPeninputFingerHwrStateManagerEn class
|
|
255 |
// -----------------------------------------------------------------------------
|
|
256 |
// CPeninputFingerHwrStateManagerEn::NewL()
|
|
257 |
// .
|
|
258 |
// -----------------------------------------------------------------------------
|
|
259 |
//
|
|
260 |
CPeninputFingerHwrStateManagerEn* CPeninputFingerHwrStateManagerEn::NewL(
|
|
261 |
CPeninputFingerHwrLayout* aLayout )
|
|
262 |
{
|
|
263 |
CPeninputFingerHwrStateManagerEn* self = new( ELeave )
|
|
264 |
CPeninputFingerHwrStateManagerEn( aLayout );
|
|
265 |
CleanupStack::PushL( self );
|
|
266 |
self->ConstructL();
|
|
267 |
CleanupStack::Pop();
|
|
268 |
return self;
|
|
269 |
}
|
|
270 |
|
|
271 |
// -----------------------------------------------------------------------------
|
|
272 |
// CPeninputFingerHwrStateManagerEn::CPeninputFingerHwrStateManager()
|
|
273 |
// .
|
|
274 |
// -----------------------------------------------------------------------------
|
|
275 |
//
|
|
276 |
CPeninputFingerHwrStateManagerEn::CPeninputFingerHwrStateManagerEn(
|
|
277 |
CPeninputFingerHwrLayout* aLayout )
|
|
278 |
:CPeninputFingerHwrStateManagerBase( aLayout )
|
|
279 |
{
|
|
280 |
|
|
281 |
}
|
|
282 |
|
|
283 |
// -----------------------------------------------------------------------------
|
|
284 |
// CPeninputFingerHwrStateManagerEn::~CPeninputFingerHwrStateManager()
|
|
285 |
// .
|
|
286 |
// -----------------------------------------------------------------------------
|
|
287 |
//
|
|
288 |
CPeninputFingerHwrStateManagerEn::~CPeninputFingerHwrStateManagerEn()
|
|
289 |
{
|
|
290 |
for( int i = 0; i < EPeninputFingerHwrStateCountEn; ++i )
|
|
291 |
{
|
|
292 |
delete iStateHandlers[i];
|
|
293 |
}
|
|
294 |
}
|
|
295 |
|
|
296 |
// -----------------------------------------------------------------------------
|
|
297 |
// CPeninputFingerHwrStateManagerEn::CosntructL()
|
|
298 |
// .
|
|
299 |
// -----------------------------------------------------------------------------
|
|
300 |
//
|
|
301 |
void CPeninputFingerHwrStateManagerEn::ConstructL()
|
|
302 |
{
|
|
303 |
BaseConstructL();
|
|
304 |
|
|
305 |
TInt i = 0;
|
|
306 |
|
|
307 |
iStates[i] = EPeninputFingerHwrStateStandbyEn;
|
|
308 |
iStateHandlers[i] = CPeninputFingerHwrEnglishStateStandby::NewL( *this );
|
|
309 |
|
|
310 |
iStates[++i] = EPeninputFingerHwrStateWritingEn;
|
|
311 |
iStateHandlers[i] = CPeninputFingerHwrEnglishStateWriting::NewL( *this );
|
|
312 |
|
|
313 |
iStates[++i] = EPeninputFingerHwrStateCandidateSelectingEn;
|
|
314 |
iStateHandlers[i] =
|
|
315 |
CPeninputFingerHwrEnglishStateCandidateSelecting::NewL( *this );
|
|
316 |
|
|
317 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
318 |
iStates[++i] = EPeninputFingerHwrStatePredictSelectingEn;
|
|
319 |
iStateHandlers[i] =
|
|
320 |
CPeninputFingerHwrEnglishStatePredictSelecting::NewL( *this );
|
|
321 |
#endif // RD_INTELLIGENT_TEXT_INPUT
|
|
322 |
|
|
323 |
iCurrentStateHandler = iStateHandlers[0];
|
|
324 |
iCurrentState = EPeninputFingerHwrStateStandbyEn;
|
|
325 |
}
|
|
326 |
|
|
327 |
// -----------------------------------------------------------------------------
|
|
328 |
// CPeninputFingerHwrStateManagerEn::SetState()
|
|
329 |
// .
|
|
330 |
// -----------------------------------------------------------------------------
|
|
331 |
//
|
|
332 |
void CPeninputFingerHwrStateManagerEn::SetState( TInt aState )
|
|
333 |
{
|
|
334 |
if( iCurrentState == aState )
|
|
335 |
{
|
|
336 |
return;
|
|
337 |
}
|
|
338 |
|
|
339 |
CPeninputFingerHwrStateHandlerBase* newStateHandler =
|
|
340 |
Find((TPeninputFingerHwrStateEn)aState);
|
|
341 |
if( newStateHandler )
|
|
342 |
{
|
|
343 |
iCurrentState = (TPeninputFingerHwrStateEn)aState;
|
|
344 |
iCurrentStateHandler->OnExit();
|
|
345 |
iCurrentStateHandler = newStateHandler;
|
|
346 |
iCurrentStateHandler->OnEntry();
|
|
347 |
}
|
|
348 |
}
|
|
349 |
|
|
350 |
// -----------------------------------------------------------------------------
|
|
351 |
// CPeninputFingerHwrStateManagerEn::Find()
|
|
352 |
// .
|
|
353 |
// -----------------------------------------------------------------------------
|
|
354 |
//
|
|
355 |
CPeninputFingerHwrStateHandlerBase* CPeninputFingerHwrStateManagerEn::Find(
|
|
356 |
TPeninputFingerHwrStateEn aState )
|
|
357 |
{
|
|
358 |
for( TInt i = 0; i < EPeninputFingerHwrStateCountEn; i++ )
|
|
359 |
{
|
|
360 |
if( iStates[i] == aState )
|
|
361 |
{
|
|
362 |
return iStateHandlers[i];
|
|
363 |
}
|
|
364 |
}
|
|
365 |
return NULL;
|
|
366 |
}
|
|
367 |
|
|
368 |
|
|
369 |
// -----------------------------------------------------------------------------
|
|
370 |
// CPeninputFingerHwrStateManagerEn::HandleEventL()
|
|
371 |
// .
|
|
372 |
// -----------------------------------------------------------------------------
|
|
373 |
//
|
|
374 |
void CPeninputFingerHwrStateManagerEn::HandleEventL( const TInt aEventType,
|
|
375 |
const TDesC& aEventData )
|
|
376 |
{
|
|
377 |
iCurrentStateHandler->HandleEventL( aEventType, aEventData );
|
|
378 |
}
|
|
379 |
|
|
380 |
|
|
381 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
382 |
// CPeninputFingerHwrStateManagerNum class
|
|
383 |
// -----------------------------------------------------------------------------
|
|
384 |
// CPeninputFingerHwrStateManagerNum::NewL()
|
|
385 |
// .
|
|
386 |
// -----------------------------------------------------------------------------
|
|
387 |
//
|
|
388 |
CPeninputFingerHwrStateManagerNum* CPeninputFingerHwrStateManagerNum::NewL(
|
|
389 |
CPeninputFingerHwrLayout* aLayout )
|
|
390 |
{
|
|
391 |
CPeninputFingerHwrStateManagerNum* self = new( ELeave )
|
|
392 |
CPeninputFingerHwrStateManagerNum( aLayout );
|
|
393 |
CleanupStack::PushL( self );
|
|
394 |
self->ConstructL();
|
|
395 |
CleanupStack::Pop();
|
|
396 |
return self;
|
|
397 |
}
|
|
398 |
|
|
399 |
// -----------------------------------------------------------------------------
|
|
400 |
// CPeninputFingerHwrStateManagerNum::CPeninputFingerHwrStateManagerNum()
|
|
401 |
// .
|
|
402 |
// -----------------------------------------------------------------------------
|
|
403 |
//
|
|
404 |
CPeninputFingerHwrStateManagerNum::CPeninputFingerHwrStateManagerNum(
|
|
405 |
CPeninputFingerHwrLayout* aLayout )
|
|
406 |
:CPeninputFingerHwrStateManagerBase( aLayout )
|
|
407 |
{
|
|
408 |
|
|
409 |
}
|
|
410 |
|
|
411 |
// -----------------------------------------------------------------------------
|
|
412 |
// CPeninputFingerHwrStateManagerNum::~CPeninputFingerHwrStateManagerNum()
|
|
413 |
// .
|
|
414 |
// -----------------------------------------------------------------------------
|
|
415 |
//
|
|
416 |
CPeninputFingerHwrStateManagerNum::~CPeninputFingerHwrStateManagerNum()
|
|
417 |
{
|
|
418 |
for( int i = 0; i < EPeninputFingerHwrStateCountNum; ++i )
|
|
419 |
{
|
|
420 |
delete iStateHandlers[i];
|
|
421 |
}
|
|
422 |
}
|
|
423 |
|
|
424 |
// -----------------------------------------------------------------------------
|
|
425 |
// CPeninputFingerHwrStateManagerNum::CosntructL()
|
|
426 |
// .
|
|
427 |
// -----------------------------------------------------------------------------
|
|
428 |
//
|
|
429 |
void CPeninputFingerHwrStateManagerNum::ConstructL()
|
|
430 |
{
|
|
431 |
BaseConstructL();
|
|
432 |
|
|
433 |
TInt i = 0;
|
|
434 |
|
|
435 |
iStates[i] = EPeninputFingerHwrStateStandbyNum;
|
|
436 |
iStateHandlers[i] = CPeninputFingerHwrNumericStateStandby::NewL( *this );
|
|
437 |
|
|
438 |
iCurrentStateHandler = iStateHandlers[0];
|
|
439 |
iCurrentState = EPeninputFingerHwrStateStandbyNum;
|
|
440 |
}
|
|
441 |
|
|
442 |
// -----------------------------------------------------------------------------
|
|
443 |
// CPeninputFingerHwrStateManagerNum::SetState()
|
|
444 |
// .
|
|
445 |
// -----------------------------------------------------------------------------
|
|
446 |
//
|
|
447 |
void CPeninputFingerHwrStateManagerNum::SetState( TInt aState )
|
|
448 |
{
|
|
449 |
if( iCurrentState == aState )
|
|
450 |
{
|
|
451 |
return;
|
|
452 |
}
|
|
453 |
|
|
454 |
CPeninputFingerHwrStateHandlerBase* newStateHandler =
|
|
455 |
Find((TPeninputFingerHwrStateNum)aState );
|
|
456 |
if( newStateHandler )
|
|
457 |
{
|
|
458 |
iCurrentState = (TPeninputFingerHwrStateNum)aState;
|
|
459 |
iCurrentStateHandler->OnExit();
|
|
460 |
iCurrentStateHandler = newStateHandler;
|
|
461 |
iCurrentStateHandler->OnEntry();
|
|
462 |
}
|
|
463 |
}
|
|
464 |
|
|
465 |
// -----------------------------------------------------------------------------
|
|
466 |
// CPeninputFingerHwrStateManagerNum::Find()
|
|
467 |
// .
|
|
468 |
// -----------------------------------------------------------------------------
|
|
469 |
//
|
|
470 |
CPeninputFingerHwrStateHandlerBase* CPeninputFingerHwrStateManagerNum::Find(
|
|
471 |
TPeninputFingerHwrStateNum aState )
|
|
472 |
{
|
|
473 |
for( TInt i = 0; i < EPeninputFingerHwrStateCountNum; i++ )
|
|
474 |
{
|
|
475 |
if( iStates[i] == aState )
|
|
476 |
{
|
|
477 |
return iStateHandlers[i];
|
|
478 |
}
|
|
479 |
}
|
|
480 |
return NULL;
|
|
481 |
}
|
|
482 |
|
|
483 |
// -----------------------------------------------------------------------------
|
|
484 |
// CPeninputFingerHwrStateManagerNum::HandleEventL()
|
|
485 |
// .
|
|
486 |
// -----------------------------------------------------------------------------
|
|
487 |
//
|
|
488 |
void CPeninputFingerHwrStateManagerNum::HandleEventL( const TInt aEventType,
|
|
489 |
const TDesC& aEventData )
|
|
490 |
{
|
|
491 |
iCurrentStateHandler->HandleEventL( aEventType, aEventData );
|
|
492 |
}
|
|
493 |
|
|
494 |
|
|
495 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
496 |
// CPeninputFingerHwrStateHandlerStandby class
|
|
497 |
// -----------------------------------------------------------------------------
|
|
498 |
// CPeninputFingerHwrStateHandlerStandby::CPeninputFingerHwrStateHandlerStandby()
|
|
499 |
// .
|
|
500 |
// -----------------------------------------------------------------------------
|
|
501 |
//
|
|
502 |
CPeninputFingerHwrChineseStateStandby::CPeninputFingerHwrChineseStateStandby(
|
|
503 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
504 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
505 |
{
|
|
506 |
|
|
507 |
}
|
|
508 |
|
|
509 |
// -----------------------------------------------------------------------------
|
|
510 |
// CPeninputFingerHwrStateHandlerStandby::NewL()
|
|
511 |
// .
|
|
512 |
// -----------------------------------------------------------------------------
|
|
513 |
//
|
|
514 |
CPeninputFingerHwrChineseStateStandby* CPeninputFingerHwrChineseStateStandby::NewL(
|
|
515 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
516 |
{
|
|
517 |
CPeninputFingerHwrChineseStateStandby* self = new( ELeave )
|
|
518 |
CPeninputFingerHwrChineseStateStandby( aStateManager );
|
|
519 |
|
|
520 |
return self;
|
|
521 |
|
|
522 |
}
|
|
523 |
|
|
524 |
|
|
525 |
// -----------------------------------------------------------------------------
|
|
526 |
// CPeninputFingerHwrStateHandlerStandby::HandleEventL()
|
|
527 |
// .
|
|
528 |
// -----------------------------------------------------------------------------
|
|
529 |
//
|
|
530 |
void CPeninputFingerHwrChineseStateStandby::HandleEventL( const TInt aEventType,
|
|
531 |
const TDesC& /*aEventData*/ )
|
|
532 |
{
|
|
533 |
switch( aEventType )
|
|
534 |
{
|
|
535 |
case EEventHwrStrokeStarted:
|
|
536 |
{
|
|
537 |
iStateManager.SetState(
|
|
538 |
CPeninputFingerHwrStateManagerCn::EPeninputFingerHwrStateWritingCn );
|
|
539 |
}
|
|
540 |
break;
|
|
541 |
default:
|
|
542 |
break;
|
|
543 |
}
|
|
544 |
}
|
|
545 |
|
|
546 |
// -----------------------------------------------------------------------------
|
|
547 |
// CPeninputFingerHwrStateHandlerStandby::OnEntry()
|
|
548 |
// .
|
|
549 |
// -----------------------------------------------------------------------------
|
|
550 |
//
|
|
551 |
void CPeninputFingerHwrChineseStateStandby::OnEntry()
|
|
552 |
{
|
|
553 |
iDataStore.TriggerStr()->DeleteAll();
|
|
554 |
|
|
555 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
556 |
// Set start position flag to false and disable part relace function
|
|
557 |
iStateManager.HwrLayout().SubmitStartPosToFep(EFalse);
|
|
558 |
#endif // RD_INTELLIGENT_TEXT_INPUT
|
|
559 |
}
|
|
560 |
|
|
561 |
// -----------------------------------------------------------------------------
|
|
562 |
// CPeninputFingerHwrStateHandlerStandby::OnExit()
|
|
563 |
// .
|
|
564 |
// -----------------------------------------------------------------------------
|
|
565 |
//
|
|
566 |
void CPeninputFingerHwrChineseStateStandby::OnExit()
|
|
567 |
{
|
|
568 |
|
|
569 |
}
|
|
570 |
|
|
571 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
572 |
// CPeninputFingerHwrStateHandlerWriting class
|
|
573 |
// -----------------------------------------------------------------------------
|
|
574 |
// CPeninputFingerHwrChineseStateWriting::CPeninputFingerHwrStateHandlerWriting()
|
|
575 |
// .
|
|
576 |
// -----------------------------------------------------------------------------
|
|
577 |
//
|
|
578 |
CPeninputFingerHwrChineseStateWriting::CPeninputFingerHwrChineseStateWriting(
|
|
579 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
580 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
581 |
{
|
|
582 |
|
|
583 |
}
|
|
584 |
|
|
585 |
// -----------------------------------------------------------------------------
|
|
586 |
// CPeninputFingerHwrChineseStateWriting::NewL()
|
|
587 |
// .
|
|
588 |
// -----------------------------------------------------------------------------
|
|
589 |
//
|
|
590 |
CPeninputFingerHwrChineseStateWriting* CPeninputFingerHwrChineseStateWriting::NewL(
|
|
591 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
592 |
{
|
|
593 |
CPeninputFingerHwrChineseStateWriting* self = new( ELeave )
|
|
594 |
CPeninputFingerHwrChineseStateWriting( aStateManager );
|
|
595 |
|
|
596 |
return self;
|
|
597 |
|
|
598 |
}
|
|
599 |
|
|
600 |
|
|
601 |
// -----------------------------------------------------------------------------
|
|
602 |
// CPeninputFingerHwrChineseStateWriting::HandleEventL()
|
|
603 |
// .
|
|
604 |
// -----------------------------------------------------------------------------
|
|
605 |
//
|
|
606 |
void CPeninputFingerHwrChineseStateWriting::HandleEventL( const TInt aEventType,
|
|
607 |
const TDesC& aEventData )
|
|
608 |
{
|
|
609 |
switch( aEventType )
|
|
610 |
{
|
|
611 |
case EEventHwrStrokeFinished:
|
|
612 |
{
|
|
613 |
OnEndStrokeL(aEventData);
|
|
614 |
}
|
|
615 |
break;
|
|
616 |
case EEventHwrCharacterTimerOut:
|
|
617 |
{
|
|
618 |
OnEndWritingL( aEventData );
|
|
619 |
}
|
|
620 |
break;
|
|
621 |
case EHwrEventCandidateSelected:
|
|
622 |
{
|
|
623 |
OnSelectedCandidatesL(aEventData);
|
|
624 |
}
|
|
625 |
break;
|
|
626 |
case EHwrEventPredictiveSelected:
|
|
627 |
{
|
|
628 |
OnSelectedPredictivesL(aEventData);
|
|
629 |
}
|
|
630 |
break;
|
|
631 |
case EHwrEventKeyBack:
|
|
632 |
{
|
|
633 |
OnClickBackSpaceL();
|
|
634 |
}
|
|
635 |
break;
|
|
636 |
default:
|
|
637 |
break;
|
|
638 |
}
|
|
639 |
}
|
|
640 |
|
|
641 |
// -----------------------------------------------------------------------------
|
|
642 |
// CPeninputFingerHwrChineseStateWriting::OnEndStrokeL()
|
|
643 |
// .
|
|
644 |
// -----------------------------------------------------------------------------
|
|
645 |
//
|
|
646 |
void CPeninputFingerHwrChineseStateWriting::OnEndStrokeL( const TDesC& aEventData )
|
|
647 |
{
|
|
648 |
const RArray<TPoint>* aTraceData = ( RArray<TPoint>* )aEventData.Ptr();
|
|
649 |
iDataStore.DoChineseRecognizeL( *aTraceData );
|
|
650 |
|
|
651 |
if(iDataStore.PredictiveCount() <= 0)
|
|
652 |
{
|
|
653 |
iDataStore.SetFixChinesePredictiveL();
|
|
654 |
}
|
|
655 |
}
|
|
656 |
|
|
657 |
|
|
658 |
// -----------------------------------------------------------------------------
|
|
659 |
// CPeninputFingerHwrChineseStateWriting::OnEndWriting()
|
|
660 |
// .
|
|
661 |
// -----------------------------------------------------------------------------
|
|
662 |
//
|
|
663 |
void CPeninputFingerHwrChineseStateWriting::OnEndWritingL( const TDesC& /*aEventData*/ )
|
|
664 |
{
|
|
665 |
// record the default cell highlight flag.
|
|
666 |
iDataStore.SetHighlight(ETrue);
|
|
667 |
|
|
668 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
669 |
if ( candidates.Count() > 0 )
|
|
670 |
{
|
|
671 |
HBufC* defaultCandiate = candidates[0];
|
|
672 |
|
|
673 |
if( iDataStore.IsSpecialDisplayChars( *defaultCandiate ) )
|
|
674 |
{
|
|
675 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( *defaultCandiate );
|
|
676 |
iStateManager.HwrLayout().SubmitStringToFep( *realCandidate );
|
|
677 |
delete realCandidate;
|
|
678 |
}
|
|
679 |
else
|
|
680 |
{
|
|
681 |
iStateManager.HwrLayout().SubmitStringToFep( *defaultCandiate );
|
|
682 |
}
|
|
683 |
|
|
684 |
//check if the default candidate is need to be sent directly
|
|
685 |
if( iDataStore.IsDirectlySentCandidate( *defaultCandiate ) )
|
|
686 |
{
|
|
687 |
iStateManager.SetState( CPeninputFingerHwrStateManagerCn::
|
|
688 |
EPeninputFingerHwrStateStandbyCn );
|
|
689 |
}
|
|
690 |
else
|
|
691 |
{
|
|
692 |
if(iDataStore.PredictiveCount() <= 0)
|
|
693 |
{
|
|
694 |
iDataStore.TriggerStr()->DeleteAll();
|
|
695 |
iDataStore.SetFixChinesePredictiveL();
|
|
696 |
}
|
|
697 |
|
|
698 |
iStateManager.SetState( CPeninputFingerHwrStateManagerCn::
|
|
699 |
EPeninputFingerHwrStateCandidateSelectingCn );
|
|
700 |
}
|
|
701 |
|
|
702 |
}
|
|
703 |
}
|
|
704 |
|
|
705 |
// -----------------------------------------------------------------------------
|
|
706 |
// CPeninputFingerHwrChineseStateWriting::OnClickBackSpaceL()
|
|
707 |
// .
|
|
708 |
// -----------------------------------------------------------------------------
|
|
709 |
//
|
|
710 |
void CPeninputFingerHwrChineseStateWriting::OnClickBackSpaceL()
|
|
711 |
{
|
|
712 |
iDataStore.SetHighlight(EFalse);
|
|
713 |
iDataStore.TriggerStr()->DeleteLast();
|
|
714 |
iDataStore.SetChineseSymbolL();
|
|
715 |
iDataStore.SetFixChinesePredictiveL();
|
|
716 |
iStateManager.SetState( CPeninputFingerHwrStateManagerCn::
|
|
717 |
EPeninputFingerHwrStatePredictSelectingCn );
|
|
718 |
}
|
|
719 |
|
|
720 |
|
|
721 |
// -----------------------------------------------------------------------------
|
|
722 |
// CPeninputFingerHwrChineseStateWriting::OnSelectedCandidatesL()
|
|
723 |
// .
|
|
724 |
// -----------------------------------------------------------------------------
|
|
725 |
//
|
|
726 |
void CPeninputFingerHwrChineseStateWriting::OnSelectedCandidatesL(
|
|
727 |
const TDesC& aEventData )
|
|
728 |
{
|
|
729 |
const TInt cellNo = aEventData[aEventData.Length() - 1];
|
|
730 |
if (!iDataStore.IsValidCandidate( cellNo ))
|
|
731 |
{
|
|
732 |
iStateManager.SetState(CPeninputFingerHwrStateManagerCn::
|
|
733 |
EPeninputFingerHwrStateStandbyCn );
|
|
734 |
return;
|
|
735 |
}
|
|
736 |
|
|
737 |
TPtrC ptr;
|
|
738 |
ptr.Set(( aEventData.Left( aEventData.Length() - 1 ) ) );
|
|
739 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
740 |
|
|
741 |
//handle special display char
|
|
742 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
743 |
{
|
|
744 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
745 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
746 |
delete realCandidate;
|
|
747 |
}
|
|
748 |
else
|
|
749 |
{
|
|
750 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
751 |
}
|
|
752 |
|
|
753 |
iDataStore.TriggerStr()->Set( ptr );
|
|
754 |
|
|
755 |
iDataStore.DoPredictiveL();
|
|
756 |
iDataStore.SetChineseSymbolL();
|
|
757 |
|
|
758 |
// record the default cell highlight flag
|
|
759 |
iDataStore.SetHighlight(EFalse);
|
|
760 |
|
|
761 |
if( iDataStore.PredictiveCount() <= 0 )
|
|
762 |
{
|
|
763 |
iDataStore.TriggerStr()->DeleteAll();
|
|
764 |
iDataStore.SetFixChinesePredictiveL();
|
|
765 |
}
|
|
766 |
|
|
767 |
iStateManager.SetState(
|
|
768 |
CPeninputFingerHwrStateManagerCn::
|
|
769 |
EPeninputFingerHwrStatePredictSelectingCn );
|
|
770 |
}
|
|
771 |
|
|
772 |
// -----------------------------------------------------------------------------
|
|
773 |
// CPeninputFingerHwrChineseStateWriting::OnSelectedPredictivesL()
|
|
774 |
// .
|
|
775 |
// -----------------------------------------------------------------------------
|
|
776 |
//
|
|
777 |
void CPeninputFingerHwrChineseStateWriting::OnSelectedPredictivesL(
|
|
778 |
const TDesC& aEventData )
|
|
779 |
{
|
|
780 |
// 1. submit the default candidate
|
|
781 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
782 |
HBufC* defaultCandidate = candidates[0];
|
|
783 |
|
|
784 |
if( iDataStore.IsSpecialDisplayChars( *defaultCandidate ) )
|
|
785 |
{
|
|
786 |
// convert special display chars
|
|
787 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( *defaultCandidate );
|
|
788 |
if( defaultCandidate->Compare( KDisplayBackspace ) != 0 )
|
|
789 |
{
|
|
790 |
iStateManager.HwrLayout().SubmitStringToFep( realCandidate->Des());
|
|
791 |
}
|
|
792 |
else
|
|
793 |
{
|
|
794 |
// to delete the last char in ICF
|
|
795 |
iStateManager.HwrLayout().Replace(*defaultCandidate, *realCandidate);
|
|
796 |
}
|
|
797 |
delete realCandidate;
|
|
798 |
}
|
|
799 |
else
|
|
800 |
{
|
|
801 |
iStateManager.HwrLayout().SubmitStringToFep( *defaultCandidate );
|
|
802 |
}
|
|
803 |
|
|
804 |
// 2. submit the selected prediction
|
|
805 |
TPtrC ptr;
|
|
806 |
ptr.Set( aEventData.Left( aEventData.Length() - 1 ) );
|
|
807 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
808 |
|
|
809 |
// 3. update trigger string
|
|
810 |
iDataStore.TriggerStr()->Append( ptr );
|
|
811 |
|
|
812 |
// 4. update predictive
|
|
813 |
iDataStore.DoPredictiveL();
|
|
814 |
iDataStore.SetChineseSymbolL();
|
|
815 |
iDataStore.SetHighlight(EFalse);
|
|
816 |
|
|
817 |
if( iDataStore.PredictiveCount() <= 0 )
|
|
818 |
{
|
|
819 |
iDataStore.TriggerStr()->DeleteAll();
|
|
820 |
iDataStore.SetFixChinesePredictiveL();
|
|
821 |
}
|
|
822 |
|
|
823 |
iStateManager.SetState(
|
|
824 |
CPeninputFingerHwrStateManagerCn::
|
|
825 |
EPeninputFingerHwrStatePredictSelectingCn );
|
|
826 |
}
|
|
827 |
|
|
828 |
|
|
829 |
// -----------------------------------------------------------------------------
|
|
830 |
// CPeninputFingerHwrChineseStateWriting::OnEntry()
|
|
831 |
// .
|
|
832 |
// -----------------------------------------------------------------------------
|
|
833 |
//
|
|
834 |
void CPeninputFingerHwrChineseStateWriting::OnEntry()
|
|
835 |
{
|
|
836 |
|
|
837 |
}
|
|
838 |
|
|
839 |
// -----------------------------------------------------------------------------
|
|
840 |
// CPeninputFingerHwrChineseStateWriting::OnExit()
|
|
841 |
// .
|
|
842 |
// -----------------------------------------------------------------------------
|
|
843 |
//
|
|
844 |
void CPeninputFingerHwrChineseStateWriting::OnExit()
|
|
845 |
{
|
|
846 |
|
|
847 |
}
|
|
848 |
|
|
849 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
850 |
// CPeninputFingerHwrStateHandlerCandidateSelecting class
|
|
851 |
// -----------------------------------------------------------------------------
|
|
852 |
// CPeninputFingerHwrChineseStateCandidateSelecting::
|
|
853 |
// CPeninputFingerHwrChineseStateCandidateSelecting()
|
|
854 |
// .
|
|
855 |
// -----------------------------------------------------------------------------
|
|
856 |
//
|
|
857 |
CPeninputFingerHwrChineseStateCandidateSelecting::
|
|
858 |
CPeninputFingerHwrChineseStateCandidateSelecting(
|
|
859 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
860 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
861 |
{
|
|
862 |
|
|
863 |
}
|
|
864 |
|
|
865 |
// -----------------------------------------------------------------------------
|
|
866 |
// CPeninputFingerHwrChineseStateCandidateSelecting::NewL()
|
|
867 |
// .
|
|
868 |
// -----------------------------------------------------------------------------
|
|
869 |
//
|
|
870 |
CPeninputFingerHwrChineseStateCandidateSelecting*
|
|
871 |
CPeninputFingerHwrChineseStateCandidateSelecting::NewL(
|
|
872 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
873 |
{
|
|
874 |
CPeninputFingerHwrChineseStateCandidateSelecting* self = new( ELeave )
|
|
875 |
CPeninputFingerHwrChineseStateCandidateSelecting( aStateManager );
|
|
876 |
|
|
877 |
return self;
|
|
878 |
}
|
|
879 |
|
|
880 |
|
|
881 |
// -----------------------------------------------------------------------------
|
|
882 |
// CPeninputFingerHwrChineseStateCandidateSelecting::HandleEventL()
|
|
883 |
// .
|
|
884 |
// -----------------------------------------------------------------------------
|
|
885 |
//
|
|
886 |
void CPeninputFingerHwrChineseStateCandidateSelecting::HandleEventL( const TInt aEventType,
|
|
887 |
const TDesC& aEventData )
|
|
888 |
{
|
|
889 |
switch( aEventType )
|
|
890 |
{
|
|
891 |
case EHwrEventCandidateSelected:
|
|
892 |
{
|
|
893 |
OnSelectedCandidatesL( aEventData );
|
|
894 |
}
|
|
895 |
break;
|
|
896 |
case EHwrEventPredictiveSelected:
|
|
897 |
{
|
|
898 |
OnSelectedPredictivesL( aEventData );
|
|
899 |
}
|
|
900 |
break;
|
|
901 |
case EHwrEventKeyBack:
|
|
902 |
{
|
|
903 |
OnClickBackSpaceL();
|
|
904 |
}
|
|
905 |
break;
|
|
906 |
case EEventHwrStrokeStarted:
|
|
907 |
{
|
|
908 |
iStateManager.SetState( CPeninputFingerHwrStateManagerCn::
|
|
909 |
EPeninputFingerHwrStateWritingCn );
|
|
910 |
}
|
|
911 |
break;
|
|
912 |
default:
|
|
913 |
break;
|
|
914 |
}
|
|
915 |
|
|
916 |
}
|
|
917 |
|
|
918 |
// -----------------------------------------------------------------------------
|
|
919 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnSelectedCandidatesL()
|
|
920 |
// .
|
|
921 |
// -----------------------------------------------------------------------------
|
|
922 |
//
|
|
923 |
void CPeninputFingerHwrChineseStateCandidateSelecting::OnSelectedCandidatesL(
|
|
924 |
const TDesC& aEventData )
|
|
925 |
{
|
|
926 |
//get the candidate index
|
|
927 |
const TInt cellNo = aEventData[aEventData.Length()-1];
|
|
928 |
if (!iDataStore.IsValidCandidate( cellNo ))
|
|
929 |
{
|
|
930 |
iStateManager.SetState( CPeninputFingerHwrStateManagerCn::
|
|
931 |
EPeninputFingerHwrStateStandbyCn );
|
|
932 |
return;
|
|
933 |
}
|
|
934 |
|
|
935 |
TPtrC ptr;
|
|
936 |
ptr.Set( ( aEventData.Left( aEventData.Length() - 1 ) ) );
|
|
937 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
938 |
//the selected char is not same as default
|
|
939 |
//replace the default candidate
|
|
940 |
HBufC* defaultCandidate = candidates[0];
|
|
941 |
if( *defaultCandidate != ptr )
|
|
942 |
{
|
|
943 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
944 |
{
|
|
945 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
946 |
iStateManager.HwrLayout().Replace( *defaultCandidate,
|
|
947 |
*realCandidate );
|
|
948 |
delete realCandidate;
|
|
949 |
}
|
|
950 |
else
|
|
951 |
{
|
|
952 |
iStateManager.HwrLayout().Replace( *defaultCandidate, ptr );
|
|
953 |
}
|
|
954 |
}
|
|
955 |
OnSelectedPredictivesL( aEventData, EFalse );
|
|
956 |
|
|
957 |
}
|
|
958 |
|
|
959 |
// -----------------------------------------------------------------------------
|
|
960 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnSelectedCandidatesL()
|
|
961 |
// .
|
|
962 |
// -----------------------------------------------------------------------------
|
|
963 |
//
|
|
964 |
void CPeninputFingerHwrChineseStateCandidateSelecting::OnSelectedPredictivesL(
|
|
965 |
const TDesC& aEventData,
|
|
966 |
TBool aAppend )
|
|
967 |
{
|
|
968 |
TPtrC ptr;
|
|
969 |
ptr.Set( aEventData.Left( aEventData.Length() - 1 ) );
|
|
970 |
// aAppend means we need append the prt to current trigger string and submit
|
|
971 |
// ptr to forground app
|
|
972 |
if( aAppend )
|
|
973 |
{
|
|
974 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
975 |
iDataStore.TriggerStr()->Append( ptr );
|
|
976 |
}
|
|
977 |
else
|
|
978 |
{
|
|
979 |
iDataStore.TriggerStr()->Set( ptr );
|
|
980 |
}
|
|
981 |
|
|
982 |
iDataStore.DoPredictiveL();
|
|
983 |
iDataStore.SetChineseSymbolL();
|
|
984 |
iDataStore.SetHighlight(EFalse);
|
|
985 |
|
|
986 |
if( iDataStore.PredictiveCount() <= 0 )
|
|
987 |
{
|
|
988 |
iDataStore.TriggerStr()->DeleteAll();
|
|
989 |
iDataStore.SetFixChinesePredictiveL();
|
|
990 |
}
|
|
991 |
|
|
992 |
iStateManager.SetState(
|
|
993 |
CPeninputFingerHwrStateManagerCn::
|
|
994 |
EPeninputFingerHwrStatePredictSelectingCn );
|
|
995 |
|
|
996 |
}
|
|
997 |
|
|
998 |
// -----------------------------------------------------------------------------
|
|
999 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnClickBackSpaceL()
|
|
1000 |
// .
|
|
1001 |
// -----------------------------------------------------------------------------
|
|
1002 |
//
|
|
1003 |
void CPeninputFingerHwrChineseStateCandidateSelecting::OnClickBackSpaceL()
|
|
1004 |
{
|
|
1005 |
iDataStore.SetHighlight(EFalse);
|
|
1006 |
iDataStore.TriggerStr()->DeleteLast();
|
|
1007 |
iDataStore.SetChineseSymbolL();
|
|
1008 |
iDataStore.SetFixChinesePredictiveL();
|
|
1009 |
iStateManager.SetState( CPeninputFingerHwrStateManagerCn::
|
|
1010 |
EPeninputFingerHwrStatePredictSelectingCn );
|
|
1011 |
}
|
|
1012 |
|
|
1013 |
|
|
1014 |
|
|
1015 |
// -----------------------------------------------------------------------------
|
|
1016 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnEntry()
|
|
1017 |
// .
|
|
1018 |
// -----------------------------------------------------------------------------
|
|
1019 |
//
|
|
1020 |
void CPeninputFingerHwrChineseStateCandidateSelecting::OnEntry()
|
|
1021 |
{
|
|
1022 |
}
|
|
1023 |
|
|
1024 |
// -----------------------------------------------------------------------------
|
|
1025 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnExit()
|
|
1026 |
// .
|
|
1027 |
// -----------------------------------------------------------------------------
|
|
1028 |
//
|
|
1029 |
void CPeninputFingerHwrChineseStateCandidateSelecting::OnExit()
|
|
1030 |
{
|
|
1031 |
|
|
1032 |
}
|
|
1033 |
|
|
1034 |
|
|
1035 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
1036 |
// CPeninputFingerHwrStateHandlerPredictSelecting class
|
|
1037 |
// -----------------------------------------------------------------------------
|
|
1038 |
// CPeninputFingerHwrChineseStatePredictSelecting::
|
|
1039 |
// CPeninputFingerHwrStateHandlerPredictSelecting()
|
|
1040 |
// .
|
|
1041 |
// -----------------------------------------------------------------------------
|
|
1042 |
//
|
|
1043 |
CPeninputFingerHwrChineseStatePredictSelecting::
|
|
1044 |
CPeninputFingerHwrChineseStatePredictSelecting(
|
|
1045 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
1046 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
1047 |
{
|
|
1048 |
|
|
1049 |
}
|
|
1050 |
|
|
1051 |
// -----------------------------------------------------------------------------
|
|
1052 |
// CPeninputFingerHwrChineseStatePredictSelecting::NewL()
|
|
1053 |
// .
|
|
1054 |
// -----------------------------------------------------------------------------
|
|
1055 |
//
|
|
1056 |
CPeninputFingerHwrChineseStatePredictSelecting*
|
|
1057 |
CPeninputFingerHwrChineseStatePredictSelecting::NewL(
|
|
1058 |
CPeninputFingerHwrStateManagerCn& aStateManager )
|
|
1059 |
{
|
|
1060 |
CPeninputFingerHwrChineseStatePredictSelecting* self = new( ELeave )
|
|
1061 |
CPeninputFingerHwrChineseStatePredictSelecting( aStateManager );
|
|
1062 |
|
|
1063 |
return self;
|
|
1064 |
|
|
1065 |
}
|
|
1066 |
|
|
1067 |
|
|
1068 |
// -----------------------------------------------------------------------------
|
|
1069 |
// CPeninputFingerHwrChineseStatePredictSelecting::HandleEventL()
|
|
1070 |
// .
|
|
1071 |
// -----------------------------------------------------------------------------
|
|
1072 |
//
|
|
1073 |
void CPeninputFingerHwrChineseStatePredictSelecting::HandleEventL( const TInt aEventType,
|
|
1074 |
const TDesC& aEventData )
|
|
1075 |
{
|
|
1076 |
switch( aEventType )
|
|
1077 |
{
|
|
1078 |
case EHwrEventCandidateSelected:
|
|
1079 |
{
|
|
1080 |
OnSelectedCandidatesL(aEventData);
|
|
1081 |
}
|
|
1082 |
break;
|
|
1083 |
case EHwrEventPredictiveSelected:
|
|
1084 |
{
|
|
1085 |
OnSelectedPredictivesL( aEventData );
|
|
1086 |
}
|
|
1087 |
break;
|
|
1088 |
case EHwrEventKeyBack:
|
|
1089 |
{
|
|
1090 |
OnClickBackSpaceL();
|
|
1091 |
}
|
|
1092 |
break;
|
|
1093 |
case EEventHwrStrokeStarted:
|
|
1094 |
{
|
|
1095 |
iStateManager.SetState( CPeninputFingerHwrStateManagerCn::
|
|
1096 |
EPeninputFingerHwrStateWritingCn );
|
|
1097 |
}
|
|
1098 |
break;
|
|
1099 |
default:
|
|
1100 |
break;
|
|
1101 |
}
|
|
1102 |
}
|
|
1103 |
|
|
1104 |
// -----------------------------------------------------------------------------
|
|
1105 |
// CPeninputFingerHwrChineseStatePredictSelecting::OnSelectedCandidatesL()
|
|
1106 |
// .
|
|
1107 |
// -----------------------------------------------------------------------------
|
|
1108 |
//
|
|
1109 |
void CPeninputFingerHwrChineseStatePredictSelecting::OnSelectedCandidatesL(
|
|
1110 |
const TDesC& aEventData )
|
|
1111 |
{
|
|
1112 |
TPtrC ptr;
|
|
1113 |
ptr.Set( aEventData.Left( aEventData.Length() - 1 ) );
|
|
1114 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
1115 |
|
|
1116 |
// When select offen-use symbol, clear trigger string
|
|
1117 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1118 |
}
|
|
1119 |
|
|
1120 |
// -----------------------------------------------------------------------------
|
|
1121 |
// CPeninputFingerHwrChineseStatePredictSelecting::OnSelectedCandidatesL()
|
|
1122 |
// .
|
|
1123 |
// -----------------------------------------------------------------------------
|
|
1124 |
//
|
|
1125 |
void CPeninputFingerHwrChineseStatePredictSelecting::OnSelectedPredictivesL(
|
|
1126 |
const TDesC& aEventData )
|
|
1127 |
{
|
|
1128 |
TPtrC ptr;
|
|
1129 |
ptr.Set( aEventData.Left( aEventData.Length() - 1 ) );
|
|
1130 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
1131 |
{
|
|
1132 |
HBufC* str = iDataStore.ConvertDisplayChars( ptr );
|
|
1133 |
iStateManager.HwrLayout().SubmitStringToFep( *str );
|
|
1134 |
delete str;
|
|
1135 |
}
|
|
1136 |
else
|
|
1137 |
{
|
|
1138 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
1139 |
}
|
|
1140 |
|
|
1141 |
iDataStore.TriggerStr()->Append( ptr );
|
|
1142 |
iDataStore.DoPredictiveL();
|
|
1143 |
if( iDataStore.PredictiveCount() <= 0 )
|
|
1144 |
{
|
|
1145 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1146 |
iDataStore.SetFixChinesePredictiveL();
|
|
1147 |
}
|
|
1148 |
}
|
|
1149 |
|
|
1150 |
// -----------------------------------------------------------------------------
|
|
1151 |
// CPeninputFingerHwrChineseStatePredictSelecting::OnClickBackSpaceL()
|
|
1152 |
// .
|
|
1153 |
// -----------------------------------------------------------------------------
|
|
1154 |
//
|
|
1155 |
void CPeninputFingerHwrChineseStatePredictSelecting::OnClickBackSpaceL()
|
|
1156 |
{
|
|
1157 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1158 |
iStateManager.SetState(CPeninputFingerHwrStateManagerCn::EPeninputFingerHwrStateStandbyCn);
|
|
1159 |
}
|
|
1160 |
|
|
1161 |
|
|
1162 |
// -----------------------------------------------------------------------------
|
|
1163 |
// CPeninputFingerHwrChineseStatePredictSelecting::OnEntry()
|
|
1164 |
// .
|
|
1165 |
// -----------------------------------------------------------------------------
|
|
1166 |
//
|
|
1167 |
void CPeninputFingerHwrChineseStatePredictSelecting::OnEntry()
|
|
1168 |
{
|
|
1169 |
|
|
1170 |
}
|
|
1171 |
|
|
1172 |
// -----------------------------------------------------------------------------
|
|
1173 |
// CPeninputFingerHwrChineseStatePredictSelecting::OnExit()
|
|
1174 |
// .
|
|
1175 |
// -----------------------------------------------------------------------------
|
|
1176 |
//
|
|
1177 |
void CPeninputFingerHwrChineseStatePredictSelecting::OnExit()
|
|
1178 |
{
|
|
1179 |
|
|
1180 |
}
|
|
1181 |
|
|
1182 |
|
|
1183 |
|
|
1184 |
|
|
1185 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
1186 |
// CPeninputFingerHwrEnglishStateStandby class
|
|
1187 |
// -----------------------------------------------------------------------------
|
|
1188 |
// CPeninputFingerHwrEnglishStateStandby::CPeninputFingerHwrEnglishStateStandby()
|
|
1189 |
// .
|
|
1190 |
// -----------------------------------------------------------------------------
|
|
1191 |
//
|
|
1192 |
CPeninputFingerHwrEnglishStateStandby::CPeninputFingerHwrEnglishStateStandby(
|
|
1193 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1194 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
1195 |
{
|
|
1196 |
|
|
1197 |
}
|
|
1198 |
|
|
1199 |
// -----------------------------------------------------------------------------
|
|
1200 |
// CPeninputFingerHwrEnglishStateStandby::NewL()
|
|
1201 |
// .
|
|
1202 |
// -----------------------------------------------------------------------------
|
|
1203 |
//
|
|
1204 |
CPeninputFingerHwrEnglishStateStandby* CPeninputFingerHwrEnglishStateStandby::NewL(
|
|
1205 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1206 |
{
|
|
1207 |
CPeninputFingerHwrEnglishStateStandby* self = new( ELeave )
|
|
1208 |
CPeninputFingerHwrEnglishStateStandby( aStateManager );
|
|
1209 |
|
|
1210 |
return self;
|
|
1211 |
}
|
|
1212 |
|
|
1213 |
|
|
1214 |
// -----------------------------------------------------------------------------
|
|
1215 |
// CPeninputFingerHwrEnglishStateStandby::HandleEventL()
|
|
1216 |
// .
|
|
1217 |
// -----------------------------------------------------------------------------
|
|
1218 |
//
|
|
1219 |
void CPeninputFingerHwrEnglishStateStandby::HandleEventL( const TInt aEventType,
|
|
1220 |
const TDesC& /*aEventData*/ )
|
|
1221 |
{
|
|
1222 |
switch( aEventType )
|
|
1223 |
{
|
|
1224 |
case EEventHwrStrokeStarted:
|
|
1225 |
{
|
|
1226 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1227 |
EPeninputFingerHwrStateWritingEn );
|
|
1228 |
}
|
|
1229 |
break;
|
|
1230 |
default:
|
|
1231 |
break;
|
|
1232 |
}
|
|
1233 |
}
|
|
1234 |
|
|
1235 |
// -----------------------------------------------------------------------------
|
|
1236 |
// CPeninputFingerHwrEnglishStateStandby::OnEntry()
|
|
1237 |
// .
|
|
1238 |
// -----------------------------------------------------------------------------
|
|
1239 |
//
|
|
1240 |
void CPeninputFingerHwrEnglishStateStandby::OnEntry()
|
|
1241 |
{
|
|
1242 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1243 |
}
|
|
1244 |
|
|
1245 |
// -----------------------------------------------------------------------------
|
|
1246 |
// CPeninputFingerHwrEnglishStateStandby::OnExit()
|
|
1247 |
// .
|
|
1248 |
// -----------------------------------------------------------------------------
|
|
1249 |
//
|
|
1250 |
void CPeninputFingerHwrEnglishStateStandby::OnExit()
|
|
1251 |
{
|
|
1252 |
}
|
|
1253 |
|
|
1254 |
|
|
1255 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
1256 |
// CPeninputFingerHwrEnglishStateWriting class
|
|
1257 |
// -----------------------------------------------------------------------------
|
|
1258 |
// CPeninputFingerHwrEnglishStateWriting::CPeninputFingerHwrEnglishStateWriting()
|
|
1259 |
// .
|
|
1260 |
// -----------------------------------------------------------------------------
|
|
1261 |
//
|
|
1262 |
CPeninputFingerHwrEnglishStateWriting::CPeninputFingerHwrEnglishStateWriting(
|
|
1263 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1264 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
1265 |
{
|
|
1266 |
|
|
1267 |
}
|
|
1268 |
|
|
1269 |
// -----------------------------------------------------------------------------
|
|
1270 |
// CPeninputFingerHwrEnglishStateWriting::NewL()
|
|
1271 |
// .
|
|
1272 |
// -----------------------------------------------------------------------------
|
|
1273 |
//
|
|
1274 |
CPeninputFingerHwrEnglishStateWriting* CPeninputFingerHwrEnglishStateWriting::NewL(
|
|
1275 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1276 |
{
|
|
1277 |
CPeninputFingerHwrEnglishStateWriting* self = new( ELeave )
|
|
1278 |
CPeninputFingerHwrEnglishStateWriting( aStateManager );
|
|
1279 |
|
|
1280 |
return self;
|
|
1281 |
}
|
|
1282 |
|
|
1283 |
|
|
1284 |
// -----------------------------------------------------------------------------
|
|
1285 |
// CPeninputFingerHwrStateHandlerWriting::HandleEventL()
|
|
1286 |
// .
|
|
1287 |
// -----------------------------------------------------------------------------
|
|
1288 |
//
|
|
1289 |
void CPeninputFingerHwrEnglishStateWriting::HandleEventL( const TInt aEventType,
|
|
1290 |
const TDesC& aEventData )
|
|
1291 |
{
|
|
1292 |
switch( aEventType )
|
|
1293 |
{
|
|
1294 |
case EEventHwrStrokeFinished:
|
|
1295 |
{
|
|
1296 |
OnEndStrokeL( aEventData );
|
|
1297 |
}
|
|
1298 |
break;
|
|
1299 |
case EEventHwrCharacterTimerOut:
|
|
1300 |
{
|
|
1301 |
OnEndWritingL( aEventData );
|
|
1302 |
}
|
|
1303 |
break;
|
|
1304 |
case EHwrEventCandidateSelected:
|
|
1305 |
{
|
|
1306 |
OnSelectedCandidatesL(aEventData);
|
|
1307 |
}
|
|
1308 |
break;
|
|
1309 |
case EHwrEventPredictiveSelected:
|
|
1310 |
{
|
|
1311 |
OnSelectedPredictivesL(aEventData);
|
|
1312 |
}
|
|
1313 |
break;
|
|
1314 |
case EHwrEventKeyBack:
|
|
1315 |
{
|
|
1316 |
OnClickBackSpaceL();
|
|
1317 |
}
|
|
1318 |
break;
|
|
1319 |
default:
|
|
1320 |
break;
|
|
1321 |
}
|
|
1322 |
}
|
|
1323 |
|
|
1324 |
// -----------------------------------------------------------------------------
|
|
1325 |
// CPeninputFingerHwrEnglishStateWriting::OnEndStrokeL()
|
|
1326 |
// .
|
|
1327 |
// -----------------------------------------------------------------------------
|
|
1328 |
//
|
|
1329 |
void CPeninputFingerHwrEnglishStateWriting::OnEndStrokeL( const TDesC& aEventData )
|
|
1330 |
{
|
|
1331 |
const RArray<TPoint>* aTraceData = ( RArray<TPoint>* )aEventData.Ptr();
|
|
1332 |
iDataStore.DoEngRecognizeL( *aTraceData );
|
|
1333 |
}
|
|
1334 |
|
|
1335 |
// -----------------------------------------------------------------------------
|
|
1336 |
// CPeninputFingerHwrEnglishStateWriting::OnEndWriting()
|
|
1337 |
// .
|
|
1338 |
// -----------------------------------------------------------------------------
|
|
1339 |
//
|
|
1340 |
void CPeninputFingerHwrEnglishStateWriting::OnEndWritingL( const TDesC& aEventData )
|
|
1341 |
{
|
|
1342 |
const RArray<TPoint>* aTraceData = ( RArray<TPoint>* )aEventData.Ptr();
|
|
1343 |
|
|
1344 |
// set the default cell highlight flag
|
|
1345 |
iDataStore.SetHighlight(ETrue);
|
|
1346 |
|
|
1347 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1348 |
// the first dropdown list will show writing candidate
|
|
1349 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
1350 |
#else
|
|
1351 |
// the second dropdown list will show writing canidate
|
|
1352 |
RPointerArray<HBufC> candidates = iDataStore.Predictive();
|
|
1353 |
#endif //RD_INTELLIGENT_TEXT_INPUT
|
|
1354 |
|
|
1355 |
if ( candidates.Count() > 0 )
|
|
1356 |
{
|
|
1357 |
HBufC* defaultCandiate = candidates[0];
|
|
1358 |
|
|
1359 |
if( iDataStore.IsSpecialDisplayChars( *defaultCandiate ) )
|
|
1360 |
{
|
|
1361 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( *defaultCandiate );
|
|
1362 |
iStateManager.HwrLayout().SubmitStringToFep( *realCandidate );
|
|
1363 |
delete realCandidate;
|
|
1364 |
}
|
|
1365 |
else
|
|
1366 |
{
|
|
1367 |
iStateManager.HwrLayout().SubmitStringToFep( *defaultCandiate );
|
|
1368 |
}
|
|
1369 |
//check if the default candidate is need to be sent directly
|
|
1370 |
if( iDataStore.IsDirectlySentCandidate( *defaultCandiate ) )
|
|
1371 |
{
|
|
1372 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1373 |
EPeninputFingerHwrStateStandbyEn );
|
|
1374 |
}
|
|
1375 |
else
|
|
1376 |
{
|
|
1377 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1378 |
EPeninputFingerHwrStateCandidateSelectingEn );
|
|
1379 |
}
|
|
1380 |
|
|
1381 |
}
|
|
1382 |
}
|
|
1383 |
|
|
1384 |
// -----------------------------------------------------------------------------
|
|
1385 |
// CPeninputFingerHwrEnglishStateWriting::OnClickBackSpaceL()
|
|
1386 |
// .
|
|
1387 |
// -----------------------------------------------------------------------------
|
|
1388 |
//
|
|
1389 |
void CPeninputFingerHwrEnglishStateWriting::OnClickBackSpaceL()
|
|
1390 |
{
|
|
1391 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1392 |
// delete the last char in trigger string
|
|
1393 |
iDataStore.TriggerStr()->DeleteLast();
|
|
1394 |
|
|
1395 |
// Get auto complete candidate from engine
|
|
1396 |
// by the new trigger string
|
|
1397 |
iDataStore.DoPredictiveL();
|
|
1398 |
|
|
1399 |
// Show fix symbol in the first dropdown list
|
|
1400 |
iDataStore.SetFixEnglishSymbolL(ERowOne);
|
|
1401 |
iDataStore.SetHighlight(EFalse);
|
|
1402 |
|
|
1403 |
iStateManager.SetState(
|
|
1404 |
CPeninputFingerHwrStateManagerEn::EPeninputFingerHwrStatePredictSelectingEn );
|
|
1405 |
#else
|
|
1406 |
// Show two row fix symbol
|
|
1407 |
iDataStore.SetFixEnglishSymbolL(ERowTwo);
|
|
1408 |
iStateManager.HwrLayout().HideTwoRowEngSymbolList(EFalse);
|
|
1409 |
#endif
|
|
1410 |
}
|
|
1411 |
|
|
1412 |
|
|
1413 |
|
|
1414 |
// -----------------------------------------------------------------------------
|
|
1415 |
// CPeninputFingerHwrEnglishStateWriting::OnSelectedCandidatesL()
|
|
1416 |
// .
|
|
1417 |
// -----------------------------------------------------------------------------
|
|
1418 |
//
|
|
1419 |
void CPeninputFingerHwrEnglishStateWriting::OnSelectedCandidatesL(
|
|
1420 |
const TDesC& aEventData )
|
|
1421 |
{
|
|
1422 |
TPtrC ptr;
|
|
1423 |
ptr.Set( ( aEventData.Left( aEventData.Length() - 1 ) ) );
|
|
1424 |
|
|
1425 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1426 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
1427 |
HBufC* defaultCandidate = candidates[0];
|
|
1428 |
|
|
1429 |
if( *defaultCandidate != ptr )
|
|
1430 |
{
|
|
1431 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
1432 |
{
|
|
1433 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
1434 |
iStateManager.HwrLayout().SubmitStringToFep(realCandidate->Des());
|
|
1435 |
|
|
1436 |
delete realCandidate;
|
|
1437 |
}
|
|
1438 |
else
|
|
1439 |
{
|
|
1440 |
iStateManager.HwrLayout().SubmitStringToFep(ptr);
|
|
1441 |
}
|
|
1442 |
|
|
1443 |
// Set the trigger string in different condition
|
|
1444 |
if(!iDataStore.IsEnglishLetter(ptr))
|
|
1445 |
{
|
|
1446 |
iStateManager.HwrLayout().SubmitStartPosToFep(ETrue);
|
|
1447 |
iDataStore.TriggerStr()->Set(ptr);
|
|
1448 |
}
|
|
1449 |
else
|
|
1450 |
{
|
|
1451 |
iDataStore.TriggerStr()->DeleteLast();
|
|
1452 |
iDataStore.TriggerStr()->Append(ptr);
|
|
1453 |
}
|
|
1454 |
|
|
1455 |
// according to new trigger string to get auto complete candidate.
|
|
1456 |
iDataStore.DoPredictiveL();
|
|
1457 |
|
|
1458 |
}
|
|
1459 |
// Set the first dropdown list content
|
|
1460 |
iDataStore.SetFixEnglishSymbolL();
|
|
1461 |
|
|
1462 |
// Not highlight the default writing candidate.
|
|
1463 |
iDataStore.SetHighlight(EFalse);
|
|
1464 |
|
|
1465 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1466 |
EPeninputFingerHwrStatePredictSelectingEn );
|
|
1467 |
|
|
1468 |
#else
|
|
1469 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
1470 |
{
|
|
1471 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
1472 |
iStateManager.HwrLayout().SubmitStringToFep( realCandidate->Des() );
|
|
1473 |
delete realCandidate;
|
|
1474 |
}
|
|
1475 |
else
|
|
1476 |
{
|
|
1477 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
1478 |
}
|
|
1479 |
|
|
1480 |
// Set two dropdown list content and show them
|
|
1481 |
iDataStore.SetFixEnglishSymbolL(ERowTwo);
|
|
1482 |
iStateManager.HwrLayout().HideTwoRowEngSymbolList(EFalse);
|
|
1483 |
|
|
1484 |
iStateManager.SetState(
|
|
1485 |
CPeninputFingerHwrStateManagerEn::
|
|
1486 |
EPeninputFingerHwrStateCandidateSelectingEn );
|
|
1487 |
#endif // RD_INTELLIGENT_TEXT_INPUT
|
|
1488 |
|
|
1489 |
}
|
|
1490 |
|
|
1491 |
// -----------------------------------------------------------------------------
|
|
1492 |
// CPeninputFingerHwrEnglishStateWriting::OnSelectedPredictivesL()
|
|
1493 |
// .
|
|
1494 |
// -----------------------------------------------------------------------------
|
|
1495 |
//
|
|
1496 |
void CPeninputFingerHwrEnglishStateWriting::OnSelectedPredictivesL(
|
|
1497 |
const TDesC& aEventData )
|
|
1498 |
{
|
|
1499 |
TPtrC ptr;
|
|
1500 |
ptr.Set( ( aEventData.Left( aEventData.Length() - 1 ) ) );
|
|
1501 |
|
|
1502 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1503 |
TPtrC string = iDataStore.TriggerStr()->GetString();
|
|
1504 |
// replace all the trigger string that has been submitted into ICF
|
|
1505 |
iStateManager.HwrLayout().Replace(string, ptr);
|
|
1506 |
iStateManager.HwrLayout().SubmitStringToFep(KDisplaySpace);
|
|
1507 |
|
|
1508 |
// Set the first dropdown list content and not hightlight the
|
|
1509 |
// first cell
|
|
1510 |
iDataStore.SetFixEnglishSymbolL();
|
|
1511 |
iDataStore.SetHighlight(EFalse);
|
|
1512 |
|
|
1513 |
iDataStore.ClearPredictive();
|
|
1514 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1515 |
|
|
1516 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1517 |
EPeninputFingerHwrStatePredictSelectingEn );
|
|
1518 |
|
|
1519 |
#else
|
|
1520 |
RPointerArray<HBufC> candidates = iDataStore.Predictive();
|
|
1521 |
|
|
1522 |
//handle special display char
|
|
1523 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
1524 |
{
|
|
1525 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
1526 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
1527 |
delete realCandidate;
|
|
1528 |
}
|
|
1529 |
else
|
|
1530 |
{
|
|
1531 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
1532 |
}
|
|
1533 |
|
|
1534 |
// Set the two dropdown list content
|
|
1535 |
iDataStore.SetFixEnglishSymbolL(ERowTwo);
|
|
1536 |
iStateManager.HwrLayout().HideTwoRowEngSymbolList(EFalse);
|
|
1537 |
|
|
1538 |
iStateManager.SetState(
|
|
1539 |
CPeninputFingerHwrStateManagerEn::
|
|
1540 |
EPeninputFingerHwrStateCandidateSelectingEn );
|
|
1541 |
#endif
|
|
1542 |
}
|
|
1543 |
|
|
1544 |
|
|
1545 |
|
|
1546 |
// -----------------------------------------------------------------------------
|
|
1547 |
// CPeninputFingerHwrStateHandlerWriting::OnEntry()
|
|
1548 |
// .
|
|
1549 |
// -----------------------------------------------------------------------------
|
|
1550 |
//
|
|
1551 |
void CPeninputFingerHwrEnglishStateWriting::OnEntry()
|
|
1552 |
{
|
|
1553 |
|
|
1554 |
}
|
|
1555 |
|
|
1556 |
// -----------------------------------------------------------------------------
|
|
1557 |
// CPeninputFingerHwrStateHandlerWriting::OnExit()
|
|
1558 |
// .
|
|
1559 |
// -----------------------------------------------------------------------------
|
|
1560 |
//
|
|
1561 |
void CPeninputFingerHwrEnglishStateWriting::OnExit()
|
|
1562 |
{
|
|
1563 |
|
|
1564 |
}
|
|
1565 |
|
|
1566 |
|
|
1567 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
1568 |
// CPeninputFingerHwrEnglishStateCandidateSelecting class
|
|
1569 |
// -----------------------------------------------------------------------------
|
|
1570 |
// CPeninputFingerHwrEnglishStateCandidateSelecting::
|
|
1571 |
// CPeninputFingerHwrEnglishStateCandidateSelecting()
|
|
1572 |
// .
|
|
1573 |
// -----------------------------------------------------------------------------
|
|
1574 |
//
|
|
1575 |
CPeninputFingerHwrEnglishStateCandidateSelecting::
|
|
1576 |
CPeninputFingerHwrEnglishStateCandidateSelecting(
|
|
1577 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1578 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
1579 |
{
|
|
1580 |
|
|
1581 |
}
|
|
1582 |
|
|
1583 |
// -----------------------------------------------------------------------------
|
|
1584 |
// CPeninputFingerHwrEnglishStateCandidateSelecting::NewL()
|
|
1585 |
// .
|
|
1586 |
// -----------------------------------------------------------------------------
|
|
1587 |
//
|
|
1588 |
CPeninputFingerHwrEnglishStateCandidateSelecting*
|
|
1589 |
CPeninputFingerHwrEnglishStateCandidateSelecting::NewL(
|
|
1590 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1591 |
{
|
|
1592 |
CPeninputFingerHwrEnglishStateCandidateSelecting* self = new( ELeave )
|
|
1593 |
CPeninputFingerHwrEnglishStateCandidateSelecting( aStateManager );
|
|
1594 |
|
|
1595 |
return self;
|
|
1596 |
}
|
|
1597 |
|
|
1598 |
|
|
1599 |
// -----------------------------------------------------------------------------
|
|
1600 |
// CPeninputFingerHwrEnglishStateCandidateSelecting::HandleEventL()
|
|
1601 |
// .
|
|
1602 |
// -----------------------------------------------------------------------------
|
|
1603 |
//
|
|
1604 |
void CPeninputFingerHwrEnglishStateCandidateSelecting::HandleEventL( const TInt aEventType,
|
|
1605 |
const TDesC& aEventData )
|
|
1606 |
{
|
|
1607 |
switch( aEventType )
|
|
1608 |
{
|
|
1609 |
case EHwrEventCandidateSelected:
|
|
1610 |
{
|
|
1611 |
OnSelectedCandidatesL( aEventData );
|
|
1612 |
}
|
|
1613 |
break;
|
|
1614 |
case EHwrEventPredictiveSelected:
|
|
1615 |
{
|
|
1616 |
OnSelectedPredictivesL( aEventData );
|
|
1617 |
}
|
|
1618 |
break;
|
|
1619 |
case EHwrEventKeyBack:
|
|
1620 |
{
|
|
1621 |
OnClickBackSpaceL();
|
|
1622 |
}
|
|
1623 |
break;
|
|
1624 |
case EEventHwrStrokeStarted:
|
|
1625 |
{
|
|
1626 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1627 |
EPeninputFingerHwrStateWritingEn );
|
|
1628 |
}
|
|
1629 |
break;
|
|
1630 |
default:
|
|
1631 |
break;
|
|
1632 |
}
|
|
1633 |
|
|
1634 |
}
|
|
1635 |
|
|
1636 |
// -----------------------------------------------------------------------------
|
|
1637 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnSelectedCandidatesL()
|
|
1638 |
// .
|
|
1639 |
// -----------------------------------------------------------------------------
|
|
1640 |
//
|
|
1641 |
void CPeninputFingerHwrEnglishStateCandidateSelecting::OnSelectedCandidatesL(
|
|
1642 |
const TDesC& aEventData )
|
|
1643 |
{
|
|
1644 |
TPtrC ptr;
|
|
1645 |
ptr.Set( aEventData.Left( aEventData.Length() - 1 ) );
|
|
1646 |
|
|
1647 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1648 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
1649 |
HBufC* defaultCandidate = candidates[0];
|
|
1650 |
|
|
1651 |
if( *defaultCandidate != ptr )
|
|
1652 |
{
|
|
1653 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
1654 |
{
|
|
1655 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
1656 |
iStateManager.HwrLayout().Replace( *defaultCandidate,
|
|
1657 |
*realCandidate, ETrue );
|
|
1658 |
delete realCandidate;
|
|
1659 |
}
|
|
1660 |
else
|
|
1661 |
{
|
|
1662 |
iStateManager.HwrLayout().Replace( *defaultCandidate, ptr, ETrue );
|
|
1663 |
}
|
|
1664 |
|
|
1665 |
// update trigger string in different condition
|
|
1666 |
if(!iDataStore.IsEnglishLetter(ptr))
|
|
1667 |
{
|
|
1668 |
iStateManager.HwrLayout().SubmitStartPosToFep(ETrue);
|
|
1669 |
iDataStore.TriggerStr()->Set(ptr);
|
|
1670 |
}
|
|
1671 |
else
|
|
1672 |
{
|
|
1673 |
iDataStore.TriggerStr()->DeleteLast();
|
|
1674 |
iDataStore.TriggerStr()->Append(ptr);
|
|
1675 |
}
|
|
1676 |
|
|
1677 |
iDataStore.DoPredictiveL();
|
|
1678 |
|
|
1679 |
}
|
|
1680 |
// Set the first dropdown list content and not highlight
|
|
1681 |
// the first cell
|
|
1682 |
iDataStore.SetFixEnglishSymbolL();
|
|
1683 |
iDataStore.SetHighlight(EFalse);
|
|
1684 |
|
|
1685 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1686 |
EPeninputFingerHwrStatePredictSelectingEn );
|
|
1687 |
|
|
1688 |
|
|
1689 |
#else
|
|
1690 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
1691 |
{
|
|
1692 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
1693 |
iStateManager.HwrLayout().SubmitStringToFep( realCandidate->Des() );
|
|
1694 |
delete realCandidate;
|
|
1695 |
}
|
|
1696 |
else
|
|
1697 |
{
|
|
1698 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
1699 |
}
|
|
1700 |
|
|
1701 |
iDataStore.SetFixEnglishSymbolL(ERowTwo);
|
|
1702 |
iStateManager.HwrLayout().HideTwoRowEngSymbolList(EFalse);
|
|
1703 |
|
|
1704 |
#endif
|
|
1705 |
}
|
|
1706 |
|
|
1707 |
// -----------------------------------------------------------------------------
|
|
1708 |
// CPeninputFingerHwrEnglishStateCandidateSelecting::OnSelectedPredictivesL()
|
|
1709 |
// .
|
|
1710 |
// -----------------------------------------------------------------------------
|
|
1711 |
//
|
|
1712 |
void CPeninputFingerHwrEnglishStateCandidateSelecting::OnSelectedPredictivesL(
|
|
1713 |
const TDesC& aEventData)
|
|
1714 |
{
|
|
1715 |
TPtrC ptr;
|
|
1716 |
ptr.Set(( aEventData.Left( aEventData.Length() - 1 )));
|
|
1717 |
|
|
1718 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1719 |
// for auto complete, replace all the trigger string
|
|
1720 |
TPtrC string = iDataStore.TriggerStr()->GetString();
|
|
1721 |
iStateManager.HwrLayout().Replace(string, ptr);
|
|
1722 |
iStateManager.HwrLayout().SubmitStringToFep(KDisplaySpace);
|
|
1723 |
iDataStore.SetFixEnglishSymbolL();
|
|
1724 |
iDataStore.SetHighlight(EFalse);
|
|
1725 |
|
|
1726 |
iDataStore.ClearPredictive();
|
|
1727 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1728 |
|
|
1729 |
iStateManager.SetState( CPeninputFingerHwrStateManagerEn::
|
|
1730 |
EPeninputFingerHwrStatePredictSelectingEn );
|
|
1731 |
#else
|
|
1732 |
// for normal English recognition, the second dropdownlist show candidates
|
|
1733 |
RPointerArray<HBufC> candidates = iDataStore.Candidate();
|
|
1734 |
HBufC* defaultCandidate = candidates[0];
|
|
1735 |
|
|
1736 |
if( *defaultCandidate != ptr )
|
|
1737 |
{
|
|
1738 |
//handle special display char
|
|
1739 |
if( iDataStore.IsSpecialDisplayChars( ptr ) )
|
|
1740 |
{
|
|
1741 |
HBufC* realCandidate = iDataStore.ConvertDisplayChars( ptr );
|
|
1742 |
iStateManager.HwrLayout().Replace( *defaultCandidate,
|
|
1743 |
*realCandidate );
|
|
1744 |
delete realCandidate;
|
|
1745 |
}
|
|
1746 |
else
|
|
1747 |
{
|
|
1748 |
iStateManager.HwrLayout().Replace( *defaultCandidate, ptr );
|
|
1749 |
}
|
|
1750 |
}
|
|
1751 |
|
|
1752 |
iDataStore.SetFixEnglishSymbolL(ERowTwo);
|
|
1753 |
iStateManager.HwrLayout().HideTwoRowEngSymbolList(EFalse);
|
|
1754 |
#endif // RD_INTELLIGENT_TEXT_INPUT
|
|
1755 |
|
|
1756 |
}
|
|
1757 |
|
|
1758 |
// -----------------------------------------------------------------------------
|
|
1759 |
// CPeninputFingerHwrEnglishStateCandidateSelecting::OnClickBackSpaceL()
|
|
1760 |
// .
|
|
1761 |
// -----------------------------------------------------------------------------
|
|
1762 |
//
|
|
1763 |
void CPeninputFingerHwrEnglishStateCandidateSelecting::OnClickBackSpaceL()
|
|
1764 |
{
|
|
1765 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1766 |
// delete the last char in trigger string
|
|
1767 |
iDataStore.TriggerStr()->DeleteLast();
|
|
1768 |
|
|
1769 |
// Get auto complete candidate from engine
|
|
1770 |
// by the new trigger string
|
|
1771 |
iDataStore.DoPredictiveL();
|
|
1772 |
|
|
1773 |
// Show fix symbol in the first dropdown list
|
|
1774 |
iDataStore.SetFixEnglishSymbolL(ERowOne);
|
|
1775 |
iDataStore.SetHighlight(EFalse);
|
|
1776 |
|
|
1777 |
iStateManager.SetState(
|
|
1778 |
CPeninputFingerHwrStateManagerEn::EPeninputFingerHwrStatePredictSelectingEn );
|
|
1779 |
#else
|
|
1780 |
// Show two row fix symbol
|
|
1781 |
iDataStore.SetFixEnglishSymbolL(ERowTwo);
|
|
1782 |
iStateManager.HwrLayout().HideTwoRowEngSymbolList(EFalse);
|
|
1783 |
#endif
|
|
1784 |
}
|
|
1785 |
|
|
1786 |
|
|
1787 |
// -----------------------------------------------------------------------------
|
|
1788 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnEntry()
|
|
1789 |
// .
|
|
1790 |
// -----------------------------------------------------------------------------
|
|
1791 |
//
|
|
1792 |
void CPeninputFingerHwrEnglishStateCandidateSelecting::OnEntry()
|
|
1793 |
{
|
|
1794 |
|
|
1795 |
}
|
|
1796 |
|
|
1797 |
// -----------------------------------------------------------------------------
|
|
1798 |
// CPeninputFingerHwrStateHandlerCandidateSelecting::OnExit()
|
|
1799 |
// .
|
|
1800 |
// -----------------------------------------------------------------------------
|
|
1801 |
//
|
|
1802 |
void CPeninputFingerHwrEnglishStateCandidateSelecting::OnExit()
|
|
1803 |
{
|
|
1804 |
|
|
1805 |
}
|
|
1806 |
|
|
1807 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
1808 |
|
|
1809 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
1810 |
// CPeninputFingerHwrEnglishStatePredictSelecting class
|
|
1811 |
// -----------------------------------------------------------------------------
|
|
1812 |
// CPeninputFingerHwrEnglishStatePredictSelecting::
|
|
1813 |
// CPeninputFingerHwrEnglishStatePredictSelecting()
|
|
1814 |
// .
|
|
1815 |
// -----------------------------------------------------------------------------
|
|
1816 |
//
|
|
1817 |
CPeninputFingerHwrEnglishStatePredictSelecting::
|
|
1818 |
CPeninputFingerHwrEnglishStatePredictSelecting(
|
|
1819 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1820 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
1821 |
{
|
|
1822 |
|
|
1823 |
}
|
|
1824 |
|
|
1825 |
// -----------------------------------------------------------------------------
|
|
1826 |
// CPeninputFingerHwrEnglishStatePredictSelecting::NewL()
|
|
1827 |
// .
|
|
1828 |
// -----------------------------------------------------------------------------
|
|
1829 |
//
|
|
1830 |
CPeninputFingerHwrEnglishStatePredictSelecting*
|
|
1831 |
CPeninputFingerHwrEnglishStatePredictSelecting::NewL(
|
|
1832 |
CPeninputFingerHwrStateManagerEn& aStateManager )
|
|
1833 |
{
|
|
1834 |
CPeninputFingerHwrEnglishStatePredictSelecting* self = new( ELeave )
|
|
1835 |
CPeninputFingerHwrEnglishStatePredictSelecting( aStateManager );
|
|
1836 |
|
|
1837 |
return self;
|
|
1838 |
}
|
|
1839 |
|
|
1840 |
|
|
1841 |
// -----------------------------------------------------------------------------
|
|
1842 |
// CPeninputFingerHwrEnglishStatePredictSelecting::HandleEventL()
|
|
1843 |
// .
|
|
1844 |
// -----------------------------------------------------------------------------
|
|
1845 |
//
|
|
1846 |
void CPeninputFingerHwrEnglishStatePredictSelecting::HandleEventL( const TInt aEventType,
|
|
1847 |
const TDesC& aEventData )
|
|
1848 |
{
|
|
1849 |
switch( aEventType )
|
|
1850 |
{
|
|
1851 |
case EHwrEventCandidateSelected:
|
|
1852 |
{
|
|
1853 |
OnSelectedCandidatesL(aEventData);
|
|
1854 |
}
|
|
1855 |
break;
|
|
1856 |
case EHwrEventPredictiveSelected:
|
|
1857 |
{
|
|
1858 |
OnSelectedPredictivesL( aEventData );
|
|
1859 |
}
|
|
1860 |
break;
|
|
1861 |
case EHwrEventKeyBack:
|
|
1862 |
{
|
|
1863 |
OnClickBackSpaceL();
|
|
1864 |
}
|
|
1865 |
break;
|
|
1866 |
case EEventHwrStrokeStarted:
|
|
1867 |
{
|
|
1868 |
iStateManager.SetState(
|
|
1869 |
CPeninputFingerHwrStateManagerEn::EPeninputFingerHwrStateWritingEn );
|
|
1870 |
}
|
|
1871 |
break;
|
|
1872 |
default:
|
|
1873 |
break;
|
|
1874 |
}
|
|
1875 |
}
|
|
1876 |
|
|
1877 |
// -----------------------------------------------------------------------------
|
|
1878 |
// CPeninputFingerHwrEnglishStatePredictSelecting::OnSelectedCandidatesL()
|
|
1879 |
// .
|
|
1880 |
// -----------------------------------------------------------------------------
|
|
1881 |
//
|
|
1882 |
void CPeninputFingerHwrEnglishStatePredictSelecting::OnSelectedCandidatesL(
|
|
1883 |
const TDesC& aEventData )
|
|
1884 |
{
|
|
1885 |
TPtrC ptr;
|
|
1886 |
ptr.Set(( aEventData.Left( aEventData.Length() - 1 )));
|
|
1887 |
iStateManager.HwrLayout().SubmitStringToFep( ptr );
|
|
1888 |
iStateManager.HwrLayout().SubmitStartPosToFep(EFalse);
|
|
1889 |
|
|
1890 |
|
|
1891 |
// in fact, just get an empty auto complete candidate
|
|
1892 |
// because the prt is punc.
|
|
1893 |
iDataStore.TriggerStr()->Set(ptr);
|
|
1894 |
iDataStore.DoPredictiveL();
|
|
1895 |
}
|
|
1896 |
|
|
1897 |
// -----------------------------------------------------------------------------
|
|
1898 |
// CPeninputFingerHwrEnglishStatePredictSelecting::OnSelectedPredictivesL()
|
|
1899 |
// .
|
|
1900 |
// -----------------------------------------------------------------------------
|
|
1901 |
//
|
|
1902 |
void CPeninputFingerHwrEnglishStatePredictSelecting::OnSelectedPredictivesL(
|
|
1903 |
const TDesC& aEventData )
|
|
1904 |
{
|
|
1905 |
TPtrC ptr;
|
|
1906 |
ptr.Set(( aEventData.Left( aEventData.Length() - 1 )));
|
|
1907 |
|
|
1908 |
TPtrC string = iDataStore.TriggerStr()->GetString();
|
|
1909 |
// replace all the trigger string that have been submitted into ICF.
|
|
1910 |
iStateManager.HwrLayout().Replace(string, ptr);
|
|
1911 |
iStateManager.HwrLayout().SubmitStringToFep(KDisplaySpace);
|
|
1912 |
iDataStore.ClearPredictive();
|
|
1913 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1914 |
}
|
|
1915 |
|
|
1916 |
// -----------------------------------------------------------------------------
|
|
1917 |
// CPeninputFingerHwrEnglishStatePredictSelecting::OnClickBackSpaceL()
|
|
1918 |
// .
|
|
1919 |
// -----------------------------------------------------------------------------
|
|
1920 |
//
|
|
1921 |
void CPeninputFingerHwrEnglishStatePredictSelecting::OnClickBackSpaceL()
|
|
1922 |
{
|
|
1923 |
// delete the last char in trigger string and get auto complete candidate
|
|
1924 |
iDataStore.TriggerStr()->DeleteLast();
|
|
1925 |
iDataStore.DoPredictiveL();
|
|
1926 |
|
|
1927 |
if( iDataStore.PredictiveCount() <= 0 )
|
|
1928 |
{
|
|
1929 |
iDataStore.TriggerStr()->DeleteAll();
|
|
1930 |
}
|
|
1931 |
}
|
|
1932 |
|
|
1933 |
// -----------------------------------------------------------------------------
|
|
1934 |
// CPeninputFingerHwrEnglishStatePredictSelecting::OnEntry()
|
|
1935 |
// .
|
|
1936 |
// -----------------------------------------------------------------------------
|
|
1937 |
//
|
|
1938 |
void CPeninputFingerHwrEnglishStatePredictSelecting::OnEntry()
|
|
1939 |
{
|
|
1940 |
|
|
1941 |
}
|
|
1942 |
|
|
1943 |
// -----------------------------------------------------------------------------
|
|
1944 |
// CPeninputFingerHwrEnglishStatePredictSelecting::OnExit()
|
|
1945 |
// .
|
|
1946 |
// -----------------------------------------------------------------------------
|
|
1947 |
//
|
|
1948 |
void CPeninputFingerHwrEnglishStatePredictSelecting::OnExit()
|
|
1949 |
{
|
|
1950 |
|
|
1951 |
}
|
|
1952 |
|
|
1953 |
#endif // RD_INTELLIGENT_TEXT_INPUT
|
|
1954 |
|
|
1955 |
|
|
1956 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
1957 |
// CPeninputFingerHwrEnglishStateStandby class
|
|
1958 |
// -----------------------------------------------------------------------------
|
|
1959 |
// CPeninputFingerHwrNumericStateStandby::CPeninputFingerHwrNumericStateStandby()
|
|
1960 |
// .
|
|
1961 |
// -----------------------------------------------------------------------------
|
|
1962 |
//
|
|
1963 |
CPeninputFingerHwrNumericStateStandby::CPeninputFingerHwrNumericStateStandby(
|
|
1964 |
CPeninputFingerHwrStateManagerNum& aStateManager )
|
|
1965 |
:CPeninputFingerHwrStateHandlerBase( aStateManager )
|
|
1966 |
{
|
|
1967 |
|
|
1968 |
}
|
|
1969 |
|
|
1970 |
// -----------------------------------------------------------------------------
|
|
1971 |
// CPeninputFingerHwrNumericStateStandby::NewL()
|
|
1972 |
// .
|
|
1973 |
// -----------------------------------------------------------------------------
|
|
1974 |
//
|
|
1975 |
CPeninputFingerHwrNumericStateStandby* CPeninputFingerHwrNumericStateStandby::NewL(
|
|
1976 |
CPeninputFingerHwrStateManagerNum& aStateManager )
|
|
1977 |
{
|
|
1978 |
CPeninputFingerHwrNumericStateStandby* self = new( ELeave )
|
|
1979 |
CPeninputFingerHwrNumericStateStandby( aStateManager );
|
|
1980 |
|
|
1981 |
return self;
|
|
1982 |
|
|
1983 |
}
|
|
1984 |
|
|
1985 |
|
|
1986 |
// -----------------------------------------------------------------------------
|
|
1987 |
// CPeninputFingerHwrNumericStateStandby::HandleEventL()
|
|
1988 |
// .
|
|
1989 |
// -----------------------------------------------------------------------------
|
|
1990 |
//
|
|
1991 |
void CPeninputFingerHwrNumericStateStandby::HandleEventL( const TInt /*aEventType*/,
|
|
1992 |
const TDesC& /*aEventData*/ )
|
|
1993 |
{
|
|
1994 |
}
|
|
1995 |
|
|
1996 |
// -----------------------------------------------------------------------------
|
|
1997 |
// CPeninputFingerHwrNumericStateStandby::OnEntry()
|
|
1998 |
// .
|
|
1999 |
// -----------------------------------------------------------------------------
|
|
2000 |
//
|
|
2001 |
void CPeninputFingerHwrNumericStateStandby::OnEntry()
|
|
2002 |
{
|
|
2003 |
iDataStore.TriggerStr()->DeleteAll();
|
|
2004 |
|
|
2005 |
#ifdef RD_INTELLIGENT_TEXT_INPUT
|
|
2006 |
iStateManager.HwrLayout().SubmitStartPosToFep(EFalse);
|
|
2007 |
#endif // RD_INTELLIGENT_TEXT_INPUT
|
|
2008 |
}
|
|
2009 |
|
|
2010 |
// -----------------------------------------------------------------------------
|
|
2011 |
// CPeninputFingerHwrNumericStateStandby::OnExit()
|
|
2012 |
// .
|
|
2013 |
// -----------------------------------------------------------------------------
|
|
2014 |
//
|
|
2015 |
void CPeninputFingerHwrNumericStateStandby::OnExit()
|
|
2016 |
{
|
|
2017 |
|
|
2018 |
}
|
|
2019 |
|
|
2020 |
//End of file
|