33 /** |
33 /** |
34 * Class MPeninputFingerHwrArStateHandler |
34 * Class MPeninputFingerHwrArStateHandler |
35 * |
35 * |
36 * The state handler interfaces |
36 * The state handler interfaces |
37 * |
37 * |
38 * @lib peninputFingerHwr.lib |
38 * @lib peninputfingerhwrar.lib |
39 * @since S60 v5.0 |
39 * @since S60 v5.0 |
40 */ |
40 */ |
41 class MPeninputFingerHwrArStateHandler |
41 class MPeninputFingerHwrArStateHandler |
42 { |
42 { |
43 public: |
43 public: |
44 /** |
44 /** |
45 * Handle state event |
45 * Handle state event |
46 * |
46 * |
47 * @since Series 60 5.0 |
47 * @since Symbian TB9.2 |
48 */ |
48 */ |
49 virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData ) = 0; |
49 virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData ) = 0; |
50 |
50 |
51 /** |
51 /** |
52 * Handle the state entering action |
52 * Handle the state entering action |
53 * |
53 * |
54 * @since Series 60 5.0 |
54 * @since Symbian TB9.2 |
55 */ |
55 */ |
56 virtual void OnEntry() = 0; |
56 virtual void OnEntry() = 0; |
57 |
57 |
58 /** |
58 /** |
59 * Handle the state exiting action |
59 * Handle the state exiting action |
60 * |
60 * |
61 * @since Series 60 5.0 |
61 * @since Symbian TB9.2 |
62 */ |
62 */ |
63 virtual void OnExit() = 0; |
63 virtual void OnExit() = 0; |
64 }; |
64 }; |
65 |
65 |
66 |
66 |
67 /** |
67 /** |
68 * The state handler base class. |
68 * The state handler base class. |
69 * |
69 * |
70 * @since Series 60 5.0. |
70 * @since Symbian TB9.2. |
71 */ |
71 */ |
72 class CPeninputFingerHwrArStateHandlerBase :public CBase |
72 class CPeninputFingerHwrArStateHandlerBase :public CBase |
73 ,public MPeninputFingerHwrArStateHandler |
73 ,public MPeninputFingerHwrArStateHandler |
74 { |
74 { |
75 |
75 |
76 public: |
76 public: |
77 /** |
77 /** |
78 * The handler base destructor |
78 * The handler base destructor |
79 * |
79 * |
80 * @since Series 60 5.0 |
80 * @since Symbian TB9.2 |
81 */ |
81 */ |
82 virtual ~CPeninputFingerHwrArStateHandlerBase(); |
82 virtual ~CPeninputFingerHwrArStateHandlerBase(); |
83 |
83 |
84 protected: |
84 protected: |
85 /** |
85 /** |
86 * The constructor. |
86 * The constructor. |
87 * |
87 * |
88 * @since Series 60 5.0 |
88 * @since Symbian TB9.2 |
89 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
89 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
90 */ |
90 */ |
91 CPeninputFingerHwrArStateHandlerBase( CPeninputFingerHwrArStateManagerBase& aStateManager ); |
91 CPeninputFingerHwrArStateHandlerBase( CPeninputFingerHwrArStateManagerBase& aStateManager ); |
92 |
92 |
93 protected: |
93 protected: |
94 /** |
94 /** |
95 * The reference to state manager. |
95 * The reference to state manager. |
96 * |
96 * |
97 * @since Series 60 5.0 |
97 * @since Symbian TB9.2 |
98 */ |
98 */ |
99 CPeninputFingerHwrArStateManagerBase& iStateManager; |
99 CPeninputFingerHwrArStateManagerBase& iStateManager; |
100 |
100 |
101 /** |
101 /** |
102 * The data store reference |
102 * The data store reference |
103 * |
103 * |
104 * @since Series 60 5.0 |
104 * @since Symbian TB9.2 |
105 */ |
105 */ |
106 CPeninputFingerHwrArDataStore& iDataStore; |
106 CPeninputFingerHwrArDataStore& iDataStore; |
107 }; |
107 }; |
108 |
108 |
109 |
109 |
110 |
110 |
111 /** |
111 /** |
112 * The finger hwr state manager base class. |
112 * The finger hwr state manager base class. |
113 * |
113 * |
114 * @since Series 60 5.0 |
114 * @since Symbian TB9.2 |
115 */ |
115 */ |
116 class CPeninputFingerHwrArStateManagerBase : public CBase |
116 class CPeninputFingerHwrArStateManagerBase : public CBase |
117 { |
117 { |
118 public: |
118 public: |
119 enum TStateManagerState |
119 enum TStateManagerState |
122 }; |
122 }; |
123 public: |
123 public: |
124 /** |
124 /** |
125 * The destructor |
125 * The destructor |
126 * |
126 * |
127 *@since Series 60 5.0 |
127 *@since Symbian TB9.2 |
128 */ |
128 */ |
129 virtual ~CPeninputFingerHwrArStateManagerBase(); |
129 virtual ~CPeninputFingerHwrArStateManagerBase(); |
130 |
130 |
131 public: |
131 public: |
132 /** |
132 /** |
133 * Handle the hwr box and canidate events |
133 * Handle the hwr box and canidate events |
134 * |
134 * |
135 * @since Series 60 5.0 |
135 * @since Symbian TB9.2 |
136 * @param aEventType The event type |
136 * @param aEventType The event type |
137 * @param aEventData The event data |
137 * @param aEventData The event data |
138 */ |
138 */ |
139 virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
139 virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
140 |
140 |
141 /** |
141 /** |
142 * Return the layout reference |
142 * Return the layout reference |
143 * |
143 * |
144 * @since Series 60 5.0 |
144 * @since Symbian TB9.2 |
145 * CPeninputFingerHwrArLayout& The hwr layout reference |
145 * CPeninputFingerHwrArLayout& The hwr layout reference |
146 */ |
146 */ |
147 CPeninputFingerHwrArLayout& HwrLayout(); |
147 CPeninputFingerHwrArLayout& HwrLayout(); |
148 |
148 |
149 /** |
149 /** |
150 * Is stanby state |
150 * Is stanby state |
151 * |
151 * |
152 * @since Series 60 5.0 |
152 * @since Symbian TB9.2 |
153 * TBool The standby state flag |
153 * TBool The standby state flag |
154 */ |
154 */ |
155 TBool IsStandbyState(); |
155 TBool IsStandbyState(); |
156 |
156 |
157 /** |
157 /** |
158 * Set current state. |
158 * Set current state. |
159 * |
159 * |
160 * @since Series 60 5.0 |
160 * @since Symbian TB9.2 |
161 * @param aState The state to be set. @See TPeninputFingerHwrState. |
161 * @param aState The state to be set. @See TPeninputFingerHwrState. |
162 */ |
162 */ |
163 virtual void SetState( TInt aState ); |
163 virtual void SetState( TInt aState ); |
164 |
164 |
165 |
165 |
166 protected: |
166 protected: |
167 /** |
167 /** |
168 * 2nd phase constructor. |
168 * 2nd phase constructor. |
169 * |
169 * |
170 * @since Series 60 5.0 |
170 * @since Symbian TB9.2 |
171 */ |
171 */ |
172 void BaseConstructL(); |
172 void BaseConstructL(); |
173 |
173 |
174 /** |
174 /** |
175 * The constructor. |
175 * The constructor. |
176 * |
176 * |
177 * @since Series 60 5.0 |
177 * @since Symbian TB9.2 |
178 * @param aLayout The full screen HWR layout pointer. |
178 * @param aLayout The full screen HWR layout pointer. |
179 */ |
179 */ |
180 CPeninputFingerHwrArStateManagerBase( CPeninputFingerHwrArLayout* aLayout ); |
180 CPeninputFingerHwrArStateManagerBase( CPeninputFingerHwrArLayout* aLayout ); |
181 |
181 |
182 /** |
182 /** |
201 }; |
201 }; |
202 |
202 |
203 /** |
203 /** |
204 * The finger hwr state manager for arabic. |
204 * The finger hwr state manager for arabic. |
205 * |
205 * |
206 * @since Series 60 5.0 |
206 * @since Symbian TB9.2 |
207 */ |
207 */ |
208 class CPeninputFingerHwrArStateManager : public CPeninputFingerHwrArStateManagerBase |
208 class CPeninputFingerHwrArStateManager : public CPeninputFingerHwrArStateManagerBase |
209 { |
209 { |
210 public: |
210 public: |
211 /** |
211 /** |
212 * The factory function |
212 * The factory function |
213 * |
213 * |
214 * @since Series 60 5.0 |
214 * @since Symbian TB9.2 |
215 * @param aLayout The layout reference |
215 * @param aLayout The layout reference |
216 * @return CPeninputFingerHwrArStateManager* The newly created CPeninputFingerHwrArStateManager object |
216 * @return CPeninputFingerHwrArStateManager* The newly created CPeninputFingerHwrArStateManager object |
217 */ |
217 */ |
218 static CPeninputFingerHwrArStateManager* NewL( CPeninputFingerHwrArLayout* aLayout ); |
218 static CPeninputFingerHwrArStateManager* NewL( CPeninputFingerHwrArLayout* aLayout ); |
219 |
219 |
220 /** |
220 /** |
221 * The destructor |
221 * The destructor |
222 * |
222 * |
223 *@since Series 60 5.0 |
223 *@since Symbian TB9.2 |
224 */ |
224 */ |
225 ~CPeninputFingerHwrArStateManager(); |
225 ~CPeninputFingerHwrArStateManager(); |
226 |
226 |
227 public: |
227 public: |
228 /** |
228 /** |
229 * The hwr states. |
229 * The hwr states. |
230 * |
230 * |
231 *@since Series 60 5.0 |
231 *@since Symbian TB9.2 |
232 */ |
232 */ |
233 enum TPeninputFingerHwrArState |
233 enum TPeninputFingerHwrArState |
234 { |
234 { |
235 EPeninputFingerHwrArStateStandby = EStateStandBy, |
235 EPeninputFingerHwrArStateStandby = EStateStandBy, |
236 EPeninputFingerHwrArStateWriting, |
236 EPeninputFingerHwrArStateWriting, |
240 |
240 |
241 public: |
241 public: |
242 /** |
242 /** |
243 * Handle the hwr box and canidate events |
243 * Handle the hwr box and canidate events |
244 * |
244 * |
245 * @since Series 60 5.0 |
245 * @since Symbian TB9.2 |
246 * @param aEventType The event type |
246 * @param aEventType The event type |
247 * @param aEventData The event data |
247 * @param aEventData The event data |
248 */ |
248 */ |
249 virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
249 virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
250 |
250 |
251 /** |
251 /** |
252 * Set current state. |
252 * Set current state. |
253 * |
253 * |
254 * @since Series 60 5.0 |
254 * @since Symbian TB9.2 |
255 * @param aState The state to be set. @See TPeninputFingerHwrState. |
255 * @param aState The state to be set. @See TPeninputFingerHwrState. |
256 */ |
256 */ |
257 virtual void SetState( TInt aState ); |
257 virtual void SetState( TInt aState ); |
258 |
258 |
259 private: |
259 private: |
260 /** |
260 /** |
261 * The constructor. |
261 * The constructor. |
262 * |
262 * |
263 * @since Series 60 5.0 |
263 * @since Symbian TB9.2 |
264 * @param aLayout The full screen HWR layout pointer. |
264 * @param aLayout The full screen HWR layout pointer. |
265 */ |
265 */ |
266 CPeninputFingerHwrArStateManager( CPeninputFingerHwrArLayout* aLayout ); |
266 CPeninputFingerHwrArStateManager( CPeninputFingerHwrArLayout* aLayout ); |
267 |
267 |
268 /** |
268 /** |
269 * 2nd phase constructor. |
269 * 2nd phase constructor. |
270 * |
270 * |
271 * @since Series 60 5.0 |
271 * @since Symbian TB9.2 |
272 */ |
272 */ |
273 void ConstructL(); |
273 void ConstructL(); |
274 |
274 |
275 /** |
275 /** |
276 * Find the current state object. |
276 * Find the current state object. |
277 * |
277 * |
278 * @since Series 60 5.0 |
278 * @since Symbian TB9.2 |
279 * @param aState According to this state type, |
279 * @param aState According to this state type, |
280 * we could find the corresponding state obect. |
280 * we could find the corresponding state obect. |
281 */ |
281 */ |
282 CPeninputFingerHwrArStateHandlerBase* Find( TPeninputFingerHwrArState ); |
282 CPeninputFingerHwrArStateHandlerBase* Find( TPeninputFingerHwrArState ); |
283 |
283 |
298 |
298 |
299 |
299 |
300 /** |
300 /** |
301 * The Standby state class. |
301 * The Standby state class. |
302 * |
302 * |
303 * @since Series 60 5.0 |
303 * @since Symbian TB9.2 |
304 */ |
304 */ |
305 class CPeninputFingerHwrArStateStandby : public CPeninputFingerHwrArStateHandlerBase |
305 class CPeninputFingerHwrArStateStandby : public CPeninputFingerHwrArStateHandlerBase |
306 { |
306 { |
307 public: |
307 public: |
308 /** |
308 /** |
309 * Factory function |
309 * Factory function |
310 * |
310 * |
311 * @since Series 60 5.0 |
311 * @since Symbian TB9.2 |
312 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
312 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
313 * @return CPeninputFingerHwrStateHandlerStandby* Return the |
313 * @return CPeninputFingerHwrStateHandlerStandby* Return the |
314 CPeninputFingerHwrStateHandlerStandby object pointer. |
314 CPeninputFingerHwrStateHandlerStandby object pointer. |
315 */ |
315 */ |
316 static CPeninputFingerHwrArStateStandby* NewL( |
316 static CPeninputFingerHwrArStateStandby* NewL( |
318 public: |
318 public: |
319 |
319 |
320 /** |
320 /** |
321 * Handle state event |
321 * Handle state event |
322 * |
322 * |
323 * @since Series 60 5.0 |
323 * @since Symbian TB9.2 |
324 */ |
324 */ |
325 void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
325 void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
326 |
326 |
327 /** |
327 /** |
328 * Handle the state entering action |
328 * Handle the state entering action |
329 * |
329 * |
330 * @since Series 60 5.0 |
330 * @since Symbian TB9.2 |
331 */ |
331 */ |
332 void OnEntry(); |
332 void OnEntry(); |
333 |
333 |
334 /** |
334 /** |
335 * Handle the state exiting action |
335 * Handle the state exiting action |
336 * |
336 * |
337 * @since Series 60 5.0 |
337 * @since Symbian TB9.2 |
338 */ |
338 */ |
339 void OnExit(); |
339 void OnExit(); |
340 |
340 |
341 private: |
341 private: |
342 /** |
342 /** |
343 * The constructor |
343 * The constructor |
344 * |
344 * |
345 * @since Series 60 5.0 |
345 * @since Symbian TB9.2 |
346 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
346 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
347 */ |
347 */ |
348 CPeninputFingerHwrArStateStandby( |
348 CPeninputFingerHwrArStateStandby( |
349 CPeninputFingerHwrArStateManager& aStateManager ); |
349 CPeninputFingerHwrArStateManager& aStateManager ); |
350 |
350 |
352 |
352 |
353 |
353 |
354 /** |
354 /** |
355 * The Writing state class. |
355 * The Writing state class. |
356 * |
356 * |
357 * @since Series 60 5.0 |
357 * @since Symbian TB9.2 |
358 */ |
358 */ |
359 class CPeninputFingerHwrArStateWriting : public CPeninputFingerHwrArStateHandlerBase |
359 class CPeninputFingerHwrArStateWriting : public CPeninputFingerHwrArStateHandlerBase |
360 { |
360 { |
361 public: |
361 public: |
362 /** |
362 /** |
363 * Factory function |
363 * Factory function |
364 * |
364 * |
365 * @since Series 60 5.0 |
365 * @since Symbian TB9.2 |
366 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
366 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
367 * @return CPeninputFingerHwrStateHandlerWriting* Return the |
367 * @return CPeninputFingerHwrStateHandlerWriting* Return the |
368 CPeninputFingerHwrStateHandlerWriting object pointer. |
368 CPeninputFingerHwrStateHandlerWriting object pointer. |
369 */ |
369 */ |
370 static CPeninputFingerHwrArStateWriting* NewL( |
370 static CPeninputFingerHwrArStateWriting* NewL( |
372 public: |
372 public: |
373 |
373 |
374 /** |
374 /** |
375 * Handle state event |
375 * Handle state event |
376 * |
376 * |
377 * @since Series 60 5.0 |
377 * @since Symbian TB9.2 |
378 */ |
378 */ |
379 void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
379 void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
380 |
380 |
381 /** |
381 /** |
382 * Handle the state entering action |
382 * Handle the state entering action |
383 * |
383 * |
384 * @since Series 60 5.0 |
384 * @since Symbian TB9.2 |
385 */ |
385 */ |
386 void OnEntry(); |
386 void OnEntry(); |
387 |
387 |
388 /** |
388 /** |
389 * Handle the state exiting action |
389 * Handle the state exiting action |
390 * |
390 * |
391 * @since Series 60 5.0 |
391 * @since Symbian TB9.2 |
392 */ |
392 */ |
393 void OnExit(); |
393 void OnExit(); |
394 |
394 |
395 private: |
395 private: |
396 /** |
396 /** |
397 * The constructor |
397 * The constructor |
398 * |
398 * |
399 * @since Series 60 5.0 |
399 * @since Symbian TB9.2 |
400 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
400 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
401 */ |
401 */ |
402 CPeninputFingerHwrArStateWriting( CPeninputFingerHwrArStateManager& aStateManager ); |
402 CPeninputFingerHwrArStateWriting( CPeninputFingerHwrArStateManager& aStateManager ); |
403 |
403 |
404 private: |
404 private: |
405 /** |
405 /** |
406 * Handle the end stroke event |
406 * Handle the end stroke event |
407 * |
407 * |
408 * @since Series 60 5.0 |
408 * @since Symbian TB9.2 |
409 * @param aEventData The trace data |
409 * @param aEventData The trace data |
410 */ |
410 */ |
411 void OnEndStrokeL( const TDesC& aEventData ); |
411 void OnEndStrokeL( const TDesC& aEventData ); |
412 |
412 |
413 /** |
413 /** |
414 * Handle the end writing event |
414 * Handle the end writing event |
415 * |
415 * |
416 * @since Series 60 5.0 |
416 * @since Symbian TB9.2 |
417 * @param aEventData The trace data |
417 * @param aEventData The trace data |
418 */ |
418 */ |
419 void OnEndWritingL( const TDesC& aEventData ); |
419 void OnEndWritingL( const TDesC& aEventData ); |
420 |
420 |
421 /** |
421 /** |
422 * Handle the candidate selection event |
422 * Handle the candidate selection event |
423 * |
423 * |
424 * @since Series 60 5.0 |
424 * @since Symbian TB9.2 |
425 * @param aEventData The trace data |
425 * @param aEventData The trace data |
426 */ |
426 */ |
427 void OnSelectedCandidatesL( const TDesC& aEventData ); |
427 void OnSelectedCandidatesL( const TDesC& aEventData ); |
428 |
428 |
429 }; |
429 }; |
430 |
430 |
431 /** |
431 /** |
432 * The CandidateSelecting state class for Chinese. |
432 * The CandidateSelecting state class for Chinese. |
433 * |
433 * |
434 * @since Series 60 5.0 |
434 * @since Symbian TB9.2 |
435 */ |
435 */ |
436 class CPeninputFingerHwrArStateCandidateSelecting : public CPeninputFingerHwrArStateHandlerBase |
436 class CPeninputFingerHwrArStateCandidateSelecting : public CPeninputFingerHwrArStateHandlerBase |
437 { |
437 { |
438 public: |
438 public: |
439 /** |
439 /** |
440 * Factory function |
440 * Factory function |
441 * |
441 * |
442 * @since Series 60 5.0 |
442 * @since Symbian TB9.2 |
443 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
443 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
444 * @return CPeninputFingerHwrStateHandlerCandidateSelecting Return the |
444 * @return CPeninputFingerHwrStateHandlerCandidateSelecting Return the |
445 CPeninputFingerHwrStateHandlerCandidateSelecting object pointer. |
445 CPeninputFingerHwrStateHandlerCandidateSelecting object pointer. |
446 */ |
446 */ |
447 static CPeninputFingerHwrArStateCandidateSelecting* NewL( |
447 static CPeninputFingerHwrArStateCandidateSelecting* NewL( |
449 public: |
449 public: |
450 |
450 |
451 /** |
451 /** |
452 * Handle state event |
452 * Handle state event |
453 * |
453 * |
454 * @since Series 60 5.0 |
454 * @since Symbian TB9.2 |
455 */ |
455 */ |
456 void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
456 void HandleEventL( const TInt aEventType, const TDesC& aEventData ); |
457 |
457 |
458 /** |
458 /** |
459 * Handle the state entering action |
459 * Handle the state entering action |
460 * |
460 * |
461 * @since Series 60 5.0 |
461 * @since Symbian TB9.2 |
462 */ |
462 */ |
463 void OnEntry(); |
463 void OnEntry(); |
464 |
464 |
465 /** |
465 /** |
466 * Handle the state exiting action |
466 * Handle the state exiting action |
467 * |
467 * |
468 * @since Series 60 5.0 |
468 * @since Symbian TB9.2 |
469 */ |
469 */ |
470 void OnExit(); |
470 void OnExit(); |
471 |
471 |
472 private: |
472 private: |
473 /** |
473 /** |
474 * The constructor |
474 * The constructor |
475 * |
475 * |
476 * @since Series 60 5.0 |
476 * @since Symbian TB9.2 |
477 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
477 * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager. |
478 */ |
478 */ |
479 CPeninputFingerHwrArStateCandidateSelecting( |
479 CPeninputFingerHwrArStateCandidateSelecting( |
480 CPeninputFingerHwrArStateManager& aStateManager ); |
480 CPeninputFingerHwrArStateManager& aStateManager ); |
481 |
481 |
482 private: |
482 private: |
483 /** |
483 /** |
484 * Handle one candiate selected event |
484 * Handle one candiate selected event |
485 * |
485 * |
486 * @since Series 60 5.0 |
486 * @since Symbian TB9.2 |
487 * @param aEventData The selected candidate |
487 * @param aEventData The selected candidate |
488 */ |
488 */ |
489 void OnSelectedCandidatesL( const TDesC& aEventData ); |
489 void OnSelectedCandidatesL( const TDesC& aEventData ); |
490 |
490 |
491 |
491 |
492 /** |
492 /** |
493 * Handle backspace events |
493 * Handle backspace events |
494 * |
494 * |
495 * @since Series 60 5.0 |
495 * @since Symbian TB9.2 |
496 */ |
496 */ |
497 void OnClickBackSpaceL(); |
497 void OnClickBackSpaceL(); |
498 }; |
498 }; |
499 |
499 |
500 |
500 |