textinput/peninputfingerhwr/inc/peninputfingerhwrstatemanager.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     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 
       
    18 #ifndef C_PENINPUTFINGERHWRSTATEMANAGER_H
       
    19 #define C_PENINPUTFINGERHWRSTATEMANAGER_H
       
    20 
       
    21 //SYSTEM INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <e32cmn.h>
       
    24 
       
    25 //FORWARD CLASS
       
    26 class CPeninputFingerHwrLayout;
       
    27 class CPeninputFingerHwrDataStore;
       
    28 class CPeninputFingerHwrStateManagerBase;
       
    29 class CPeninputFingerHwrStateManagerCn;
       
    30 class CPeninputFingerHwrStateManagerEn;
       
    31 class CPeninputFingerHwrStateManagerNum;
       
    32 
       
    33 
       
    34 /**
       
    35 * Class MPeninputFingerHwrStateHandler
       
    36 *
       
    37 * The state handler interfaces 
       
    38 *
       
    39 * @lib peninputFingerHwr.lib
       
    40 * @since S60 v5.0
       
    41 */
       
    42 class MPeninputFingerHwrStateHandler
       
    43     {
       
    44 public:    
       
    45     /**
       
    46     * Handle state event
       
    47     *
       
    48     * @since Series 60 5.0
       
    49     */
       
    50     virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData ) = 0;
       
    51     
       
    52     /**
       
    53     * Handle the state entering action
       
    54     *
       
    55     * @since Series 60 5.0
       
    56     */
       
    57     virtual void OnEntry() = 0;
       
    58     
       
    59     /**
       
    60     * Handle the state exiting action
       
    61     *
       
    62     * @since Series 60 5.0
       
    63     */
       
    64     virtual void OnExit() = 0;
       
    65     };
       
    66 
       
    67 
       
    68 /**
       
    69 * The state handler base class.
       
    70 *
       
    71 * @since Series 60 5.0.
       
    72 */    
       
    73 class CPeninputFingerHwrStateHandlerBase :public CBase 
       
    74      ,public MPeninputFingerHwrStateHandler
       
    75     {
       
    76     
       
    77 public:    
       
    78     /**
       
    79     * The handler base destructor
       
    80     *
       
    81     * @since Series 60 5.0
       
    82     */
       
    83     virtual ~CPeninputFingerHwrStateHandlerBase();
       
    84        
       
    85 protected:
       
    86     /**
       
    87     * The constructor.
       
    88     *
       
    89     * @since Series 60 5.0
       
    90     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
    91     */
       
    92     CPeninputFingerHwrStateHandlerBase( CPeninputFingerHwrStateManagerBase& aStateManager );
       
    93         
       
    94 protected:
       
    95     /**
       
    96     * The reference to state manager.
       
    97     *
       
    98     * @since Series 60 5.0
       
    99     */
       
   100     CPeninputFingerHwrStateManagerBase& iStateManager;
       
   101     
       
   102     /**
       
   103     * The data store reference
       
   104     *
       
   105     * @since Series 60 5.0
       
   106     */
       
   107     CPeninputFingerHwrDataStore& iDataStore;      
       
   108     };
       
   109 
       
   110 
       
   111 
       
   112 /**
       
   113 * The finger hwr state manager base class.
       
   114 *
       
   115 * @since Series 60 5.0
       
   116 */
       
   117 class CPeninputFingerHwrStateManagerBase : public CBase
       
   118     {
       
   119 public:
       
   120     enum TStateManagerState
       
   121         {
       
   122         EStateStandBy = 0
       
   123         };
       
   124 public:
       
   125     /**
       
   126     * The destructor
       
   127     *
       
   128     *@since Series 60 5.0
       
   129     */
       
   130     virtual ~CPeninputFingerHwrStateManagerBase();  
       
   131 
       
   132 public:
       
   133     /**
       
   134     * Handle the hwr box and canidate events
       
   135     *
       
   136     * @since Series 60 5.0
       
   137     * @param aEventType The event type
       
   138     * @param aEventData The event data
       
   139     */
       
   140     virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   141     
       
   142     /**
       
   143     * Return the layout reference
       
   144     *
       
   145     * @since Series 60 5.0
       
   146     * CPeninputFingerHwrLayout& The hwr layout reference
       
   147     */
       
   148     CPeninputFingerHwrLayout& HwrLayout();
       
   149     
       
   150     /**
       
   151     * Is stanby state
       
   152     *
       
   153     * @since Series 60 5.0
       
   154     * TBool The standby state flag
       
   155     */    
       
   156     TBool IsStandbyState();
       
   157     
       
   158     /**
       
   159     * Set current state.
       
   160     * 
       
   161     * @since Series 60 5.0
       
   162     * @param aState The state to be set. @See TPeninputFingerHwrState.
       
   163     */    
       
   164     virtual void SetState( TInt aState );     
       
   165 
       
   166     
       
   167 protected:
       
   168     /**
       
   169     * 2nd phase constructor.
       
   170     * 
       
   171     * @since Series 60 5.0
       
   172     */
       
   173     void BaseConstructL();
       
   174 
       
   175     /**
       
   176     * The constructor.
       
   177     *
       
   178     * @since Series 60 5.0
       
   179     * @param aLayout The full screen HWR layout pointer.
       
   180     */
       
   181     CPeninputFingerHwrStateManagerBase( CPeninputFingerHwrLayout* aLayout );
       
   182 
       
   183     /**
       
   184     * Pointer to the full screen hwr layout.
       
   185     * 
       
   186     * Not own.
       
   187     */
       
   188     CPeninputFingerHwrLayout* iLayout;
       
   189     
       
   190     /**
       
   191     * The pointer to current state.
       
   192     * Own
       
   193     */    
       
   194     CPeninputFingerHwrStateHandlerBase* iCurrentStateHandler;
       
   195     
       
   196     /**
       
   197     * The current state.
       
   198     * Own
       
   199     */
       
   200     TInt iCurrentState;
       
   201     
       
   202     };
       
   203 
       
   204 /**
       
   205 * The finger hwr state manager for Chinese.
       
   206 *
       
   207 * @since Series 60 5.0
       
   208 */
       
   209 class CPeninputFingerHwrStateManagerCn : public CPeninputFingerHwrStateManagerBase
       
   210     {
       
   211 public:
       
   212     /**
       
   213     * The factory function
       
   214     *
       
   215     * @since Series 60 5.0
       
   216     * @param aLayout The layout reference
       
   217     * @return CPeninputFingerHwrStateManager* The newly created CPeninputFingerHwrStateManager object
       
   218     */
       
   219     static CPeninputFingerHwrStateManagerCn* NewL( CPeninputFingerHwrLayout* aLayout );
       
   220     
       
   221     /**
       
   222     * The destructor
       
   223     *
       
   224     *@since Series 60 5.0
       
   225     */
       
   226     ~CPeninputFingerHwrStateManagerCn();
       
   227 
       
   228 public:    
       
   229     /**
       
   230     * The hwr states.
       
   231     *
       
   232     *@since Series 60 5.0
       
   233     */    
       
   234     enum TPeninputFingerHwrStateCn
       
   235     {
       
   236     EPeninputFingerHwrStateStandbyCn = EStateStandBy,
       
   237     EPeninputFingerHwrStateWritingCn,
       
   238     EPeninputFingerHwrStateCandidateSelectingCn,
       
   239     EPeninputFingerHwrStatePredictSelectingCn,
       
   240     EPeninputFingerHwrStateCountCn
       
   241     };    
       
   242 
       
   243 public:
       
   244     /**
       
   245     * Handle the hwr box and canidate events
       
   246     *
       
   247     * @since Series 60 5.0
       
   248     * @param aEventType The event type
       
   249     * @param aEventData The event data
       
   250     */
       
   251     virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   252     
       
   253     /**
       
   254     * Set current state.
       
   255     * 
       
   256     * @since Series 60 5.0
       
   257     * @param aState The state to be set. @See TPeninputFingerHwrState.
       
   258     */    
       
   259     virtual void SetState( TInt aState );
       
   260     
       
   261 private:
       
   262     /**
       
   263     * The constructor.
       
   264     *
       
   265     * @since Series 60 5.0
       
   266     * @param aLayout The full screen HWR layout pointer.
       
   267     */
       
   268     CPeninputFingerHwrStateManagerCn( CPeninputFingerHwrLayout* aLayout );
       
   269     
       
   270     /**
       
   271     * 2nd phase constructor.
       
   272     * 
       
   273     * @since Series 60 5.0
       
   274     */
       
   275     void ConstructL();
       
   276     
       
   277     /**
       
   278     * Find the current state object.
       
   279     *
       
   280     * @since Series 60 5.0
       
   281     * @param aState According to this state type, 
       
   282     *        we could find the corresponding state obect.
       
   283     */
       
   284     CPeninputFingerHwrStateHandlerBase* Find( TPeninputFingerHwrStateCn );
       
   285     
       
   286 private:    
       
   287     /**
       
   288     * Store all states pointers.
       
   289     * Own.
       
   290     */
       
   291     CPeninputFingerHwrStateHandlerBase* iStateHandlers[EPeninputFingerHwrStateCountCn];
       
   292     
       
   293     /**
       
   294     * Store all states' types.
       
   295     * Own
       
   296     */
       
   297     TPeninputFingerHwrStateCn iStates[EPeninputFingerHwrStateCountCn];    
       
   298     };
       
   299 
       
   300 
       
   301 /**
       
   302 * The finger hwr state manager for English.
       
   303 *
       
   304 * @since Series 60 5.0
       
   305 */
       
   306 class CPeninputFingerHwrStateManagerEn : public CPeninputFingerHwrStateManagerBase
       
   307     {
       
   308 public:
       
   309     /**
       
   310     * The factory function
       
   311     *
       
   312     * @since Series 60 5.0
       
   313     * @param aLayout The layout reference
       
   314     * @return CPeninputFingerHwrStateManagerEn* The newly created CPeninputFingerHwrStateManagerEn object
       
   315     */
       
   316     static CPeninputFingerHwrStateManagerEn* NewL( CPeninputFingerHwrLayout* aLayout );
       
   317     
       
   318     /**
       
   319     * The destructor
       
   320     *
       
   321     *@since Series 60 5.0
       
   322     */
       
   323     ~CPeninputFingerHwrStateManagerEn();
       
   324     
       
   325     /**
       
   326     * Set current state.
       
   327     * 
       
   328     * @since Series 60 5.0
       
   329     * @param aState The state to be set. @See TPeninputFingerHwrState.
       
   330     */    
       
   331     virtual void SetState( TInt aState );
       
   332     
       
   333 public:    
       
   334     /**
       
   335     * The hwr states.
       
   336     *
       
   337     *@since Series 60 5.0
       
   338     */    
       
   339     enum TPeninputFingerHwrStateEn
       
   340     {
       
   341     EPeninputFingerHwrStateStandbyEn = EStateStandBy,
       
   342     EPeninputFingerHwrStateWritingEn,
       
   343     EPeninputFingerHwrStateCandidateSelectingEn,
       
   344 #ifdef RD_INTELLIGENT_TEXT_INPUT    
       
   345     EPeninputFingerHwrStatePredictSelectingEn,
       
   346 #endif
       
   347     EPeninputFingerHwrStateCountEn
       
   348     };    
       
   349 
       
   350 public:
       
   351     
       
   352     /**
       
   353     * Handle the hwr box and canidate events
       
   354     *
       
   355     * @since Series 60 5.0
       
   356     * @param aEventType The event type
       
   357     * @param aEventData The event data
       
   358     */
       
   359     virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData );   
       
   360     
       
   361     /**
       
   362     * Set current state.
       
   363     * 
       
   364     * @since Series 60 5.0
       
   365     * @param aState The state to be set. @See TPeninputFingerHwrState.
       
   366     */    
       
   367     void SetState( TPeninputFingerHwrStateEn aState );
       
   368     
       
   369 private:
       
   370     /**
       
   371     * The constructor.
       
   372     *
       
   373     * @since Series 60 5.0
       
   374     * @param aLayout The full screen HWR layout pointer.
       
   375     */
       
   376     CPeninputFingerHwrStateManagerEn( CPeninputFingerHwrLayout* aLayout );
       
   377     
       
   378     /**
       
   379     * 2nd phase constructor.
       
   380     * 
       
   381     * @since Series 60 5.0
       
   382     */
       
   383     void ConstructL();
       
   384     
       
   385     /**
       
   386     * Find the current state object.
       
   387     *
       
   388     * @since Series 60 5.0
       
   389     * @param aState According to this state type, 
       
   390     *        we could find the corresponding state obect.
       
   391     */
       
   392     CPeninputFingerHwrStateHandlerBase* Find( TPeninputFingerHwrStateEn );
       
   393     
       
   394 private:    
       
   395     /**
       
   396     * Store all states pointers.
       
   397     * Own.
       
   398     */
       
   399     CPeninputFingerHwrStateHandlerBase* iStateHandlers[EPeninputFingerHwrStateCountEn];
       
   400     
       
   401     /**
       
   402     * Store all states' types.
       
   403     * Own
       
   404     */
       
   405     TPeninputFingerHwrStateEn iStates[EPeninputFingerHwrStateCountEn];
       
   406     
       
   407     };    
       
   408 
       
   409 /**
       
   410 * The finger hwr state manager for Number.
       
   411 *
       
   412 * @since Series 60 5.0
       
   413 */
       
   414 class CPeninputFingerHwrStateManagerNum : public CPeninputFingerHwrStateManagerBase
       
   415     {
       
   416 public:
       
   417     /**
       
   418     * The factory function
       
   419     *
       
   420     * @since Series 60 5.0
       
   421     * @param aLayout The layout reference
       
   422     * @return CPeninputFingerHwrStateManager* The newly created CPeninputFingerHwrStateManager object
       
   423     */
       
   424     static CPeninputFingerHwrStateManagerNum* NewL( CPeninputFingerHwrLayout* aLayout );
       
   425     
       
   426     /**
       
   427     * The destructor
       
   428     *
       
   429     *@since Series 60 5.0
       
   430     */
       
   431     ~CPeninputFingerHwrStateManagerNum();
       
   432     
       
   433     /**
       
   434     * Set current state.
       
   435     * 
       
   436     * @since Series 60 5.0
       
   437     * @param aState The state to be set. @See TPeninputFingerHwrState.
       
   438     */    
       
   439     virtual void SetState( TInt aState );
       
   440     
       
   441 public:    
       
   442     /**
       
   443     * The hwr states.
       
   444     *
       
   445     *@since Series 60 5.0
       
   446     */    
       
   447     enum TPeninputFingerHwrStateNum
       
   448     {
       
   449     EPeninputFingerHwrStateStandbyNum = EStateStandBy,
       
   450     EPeninputFingerHwrStateCountNum
       
   451     };    
       
   452 
       
   453 public:
       
   454     
       
   455     /**
       
   456     * Handle the hwr box and canidate events
       
   457     *
       
   458     * @since Series 60 5.0
       
   459     * @param aEventType The event type
       
   460     * @param aEventData The event data
       
   461     */
       
   462     virtual void HandleEventL( const TInt aEventType, const TDesC& aEventData );   
       
   463     
       
   464     /**
       
   465     * Set current state.
       
   466     * 
       
   467     * @since Series 60 5.0
       
   468     * @param aState The state to be set. @See TPeninputFingerHwrState.
       
   469     */    
       
   470     void SetState( TPeninputFingerHwrStateNum aState );
       
   471     
       
   472 private:
       
   473     /**
       
   474     * The constructor.
       
   475     *
       
   476     * @since Series 60 5.0
       
   477     * @param aLayout The full screen HWR layout pointer.
       
   478     */
       
   479     CPeninputFingerHwrStateManagerNum( CPeninputFingerHwrLayout* aLayout );
       
   480     
       
   481     /**
       
   482     * 2nd phase constructor.
       
   483     * 
       
   484     * @since Series 60 5.0
       
   485     */
       
   486     void ConstructL();
       
   487     
       
   488     /**
       
   489     * Find the current state object.
       
   490     *
       
   491     * @since Series 60 5.0
       
   492     * @param aState According to this state type, 
       
   493     *        we could find the corresponding state obect.
       
   494     */
       
   495     CPeninputFingerHwrStateHandlerBase* Find( TPeninputFingerHwrStateNum );
       
   496     
       
   497 private:    
       
   498     /**
       
   499     * Store all states pointers.
       
   500     * Own.
       
   501     */
       
   502     CPeninputFingerHwrStateHandlerBase* iStateHandlers[EPeninputFingerHwrStateCountNum];
       
   503     
       
   504     /**
       
   505     * Store all states' types.
       
   506     * Own
       
   507     */
       
   508     TPeninputFingerHwrStateNum iStates[EPeninputFingerHwrStateCountNum];
       
   509 
       
   510     };
       
   511 
       
   512 
       
   513 /**
       
   514 * The Standby state class.
       
   515 *
       
   516 * @since Series 60 5.0
       
   517 */    
       
   518 class CPeninputFingerHwrChineseStateStandby : public CPeninputFingerHwrStateHandlerBase
       
   519     {
       
   520 public:
       
   521     /**
       
   522     * Factory function
       
   523     *
       
   524     * @since Series 60 5.0
       
   525     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   526     * @return CPeninputFingerHwrStateHandlerStandby* Return the 
       
   527           CPeninputFingerHwrStateHandlerStandby object pointer. 
       
   528     */
       
   529     static CPeninputFingerHwrChineseStateStandby* NewL( 
       
   530         CPeninputFingerHwrStateManagerCn& aStateManager );
       
   531 public:
       
   532     
       
   533     /**
       
   534     * Handle state event
       
   535     *
       
   536     * @since Series 60 5.0
       
   537     */
       
   538     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   539     
       
   540     /**
       
   541     * Handle the state entering action
       
   542     * 
       
   543     * @since Series 60 5.0
       
   544     */
       
   545     void OnEntry();
       
   546     
       
   547     /**
       
   548     * Handle the state exiting action
       
   549     *
       
   550     * @since Series 60 5.0
       
   551     */
       
   552     void OnExit();
       
   553     
       
   554 private:
       
   555     /**
       
   556     * The constructor
       
   557     *
       
   558     * @since Series 60 5.0
       
   559     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   560     */
       
   561     CPeninputFingerHwrChineseStateStandby( 
       
   562          CPeninputFingerHwrStateManagerCn& aStateManager );
       
   563             
       
   564     };
       
   565 
       
   566 
       
   567 /**
       
   568 * The Writing state class.
       
   569 *
       
   570 * @since Series 60 5.0
       
   571 */
       
   572 class CPeninputFingerHwrChineseStateWriting : public CPeninputFingerHwrStateHandlerBase
       
   573     {
       
   574 public:
       
   575     /**
       
   576     * Factory function
       
   577     *
       
   578     * @since Series 60 5.0
       
   579     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   580     * @return CPeninputFingerHwrStateHandlerWriting* Return the 
       
   581           CPeninputFingerHwrStateHandlerWriting object pointer. 
       
   582     */
       
   583     static CPeninputFingerHwrChineseStateWriting* NewL( 
       
   584         CPeninputFingerHwrStateManagerCn& aStateManager );    
       
   585 public:
       
   586     
       
   587     /**
       
   588     * Handle state event
       
   589     *
       
   590     * @since Series 60 5.0
       
   591     */
       
   592     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   593     
       
   594     /**
       
   595     * Handle the state entering action
       
   596     * 
       
   597     * @since Series 60 5.0
       
   598     */
       
   599     void OnEntry();
       
   600     
       
   601     /**
       
   602     * Handle the state exiting action
       
   603     *
       
   604     * @since Series 60 5.0
       
   605     */
       
   606     void OnExit();
       
   607     
       
   608 private:
       
   609     /**
       
   610     * The constructor
       
   611     *
       
   612     * @since Series 60 5.0
       
   613     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   614     */
       
   615     CPeninputFingerHwrChineseStateWriting( CPeninputFingerHwrStateManagerCn& aStateManager );
       
   616     
       
   617 private:
       
   618     /**
       
   619     * Handle the end stroke event
       
   620     *
       
   621     * @since Series 60 5.0
       
   622     * @param aEventData The trace data
       
   623     */
       
   624     void OnEndStrokeL( const TDesC& aEventData );
       
   625 
       
   626     /**
       
   627     * Handle the end writing event
       
   628     *
       
   629     * @since Series 60 5.0
       
   630     * @param aEventData The trace data
       
   631     */
       
   632     void OnEndWritingL( const TDesC& aEventData );
       
   633     
       
   634     /**
       
   635     * Handle the backspace event
       
   636     *
       
   637     * @since Series 60 5.0
       
   638     */
       
   639     void OnClickBackSpaceL();
       
   640     
       
   641     /**
       
   642     * Handle the candidate selection event
       
   643     *
       
   644     * @since Series 60 5.0
       
   645     * @param aEventData The trace data
       
   646     */
       
   647     void OnSelectedCandidatesL( const TDesC& aEventData );
       
   648     
       
   649     /**
       
   650     * Handle the predictives selection event
       
   651     *
       
   652     * @since Series 60 5.0
       
   653     * @param aEventData The trace data
       
   654     */
       
   655     void OnSelectedPredictivesL( const TDesC& aEventData );
       
   656     };
       
   657 
       
   658 /**
       
   659 * The CandidateSelecting state class for Chinese.
       
   660 *
       
   661 * @since Series 60 5.0
       
   662 */
       
   663 class CPeninputFingerHwrChineseStateCandidateSelecting : public CPeninputFingerHwrStateHandlerBase
       
   664     {
       
   665 public:
       
   666     /**
       
   667     * Factory function
       
   668     *
       
   669     * @since Series 60 5.0
       
   670     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   671     * @return CPeninputFingerHwrStateHandlerCandidateSelecting Return the 
       
   672           CPeninputFingerHwrStateHandlerCandidateSelecting object pointer. 
       
   673     */
       
   674     static CPeninputFingerHwrChineseStateCandidateSelecting* NewL( 
       
   675         CPeninputFingerHwrStateManagerCn& aStateManager );    
       
   676 public:
       
   677     
       
   678     /**
       
   679     * Handle state event
       
   680     *
       
   681     * @since Series 60 5.0
       
   682     */
       
   683     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   684     
       
   685     /**
       
   686     * Handle the state entering action
       
   687     * 
       
   688     * @since Series 60 5.0
       
   689     */
       
   690     void OnEntry();
       
   691     
       
   692     /**
       
   693     * Handle the state exiting action
       
   694     *
       
   695     * @since Series 60 5.0
       
   696     */
       
   697     void OnExit();
       
   698     
       
   699 private:
       
   700     /**
       
   701     * The constructor
       
   702     *
       
   703     * @since Series 60 5.0
       
   704     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   705     */
       
   706     CPeninputFingerHwrChineseStateCandidateSelecting( 
       
   707               CPeninputFingerHwrStateManagerCn& aStateManager );
       
   708     
       
   709 private:
       
   710     /**
       
   711     * Handle one candiate selected event
       
   712     * 
       
   713     * @since Series 60 5.0
       
   714     * @param aEventData The selected candidate
       
   715     */
       
   716     void OnSelectedCandidatesL( const TDesC& aEventData );
       
   717     
       
   718     /**
       
   719     * Handle predictive candidate selected events
       
   720     *
       
   721     * @since Series 60 5.0
       
   722     * @param aEventData The selected predictive candidate
       
   723     * @param aAppend ETrue if the aEventData need to be appended onto trigger string
       
   724              EFalse if the aEventData need to set trigger string and do not
       
   725              submit it to layout
       
   726     */
       
   727     void OnSelectedPredictivesL( const TDesC& aEventData, TBool aAppend = ETrue );
       
   728     
       
   729     /**
       
   730     * Handle backspace events
       
   731     *
       
   732     * @since Series 60 5.0
       
   733     */
       
   734     void OnClickBackSpaceL();
       
   735     };
       
   736 
       
   737 
       
   738 /**
       
   739 * The PredictSelecting state class for Chinese.
       
   740 *
       
   741 * @since Series 60 5.0
       
   742 */
       
   743 class CPeninputFingerHwrChineseStatePredictSelecting : public CPeninputFingerHwrStateHandlerBase
       
   744     {
       
   745 public:
       
   746     /**
       
   747     * Factory function
       
   748     *
       
   749     * @since Series 60 5.0
       
   750     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   751     * @return CPeninputFingerHwrStateHandlerPredictSelecting Return the 
       
   752           CPeninputFingerHwrStateHandlerPredictSelecting object pointer. 
       
   753     */
       
   754     static CPeninputFingerHwrChineseStatePredictSelecting* NewL( 
       
   755         CPeninputFingerHwrStateManagerCn& aStateManager );    
       
   756 public:
       
   757     /**
       
   758     * Handle command
       
   759     *
       
   760     * @since Series 60 5.0
       
   761     */
       
   762     void HandleCommand( TInt aCmd, TUint8* aData );
       
   763     
       
   764     /**
       
   765     * Handle state event
       
   766     *
       
   767     * @since Series 60 5.0
       
   768     */
       
   769     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   770     
       
   771     /**
       
   772     * Handle the state entering action
       
   773     * 
       
   774     * @since Series 60 5.0
       
   775     */
       
   776     void OnEntry();
       
   777     
       
   778     /**
       
   779     * Handle the state exiting action
       
   780     *
       
   781     * @since Series 60 5.0
       
   782     */
       
   783     void OnExit();
       
   784     
       
   785 private:
       
   786     /**
       
   787     * The constructor
       
   788     *
       
   789     * @since Series 60 5.0
       
   790     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   791     */
       
   792     CPeninputFingerHwrChineseStatePredictSelecting( 
       
   793          CPeninputFingerHwrStateManagerCn& aStateManager );
       
   794               
       
   795 private:
       
   796     /**
       
   797     * Handle one Candidate selected event
       
   798     * 
       
   799     * @since Series 60 5.0
       
   800     * @param aEventData The selected candidate
       
   801     */
       
   802     void OnSelectedCandidatesL(const TDesC& aEventData);
       
   803 
       
   804     /**
       
   805     * Handle one predictive candiate selected event
       
   806     * 
       
   807     * @since Series 60 5.0
       
   808     * @param aEventData The selected candidate
       
   809     */
       
   810     void OnSelectedPredictivesL( const TDesC& aEventData );
       
   811     
       
   812     /**
       
   813     * Handle one backspace event
       
   814     * 
       
   815     * @since Series 60 5.0
       
   816     * @param aEventData The selected candidate
       
   817     */    
       
   818     void OnClickBackSpaceL();              
       
   819     };
       
   820 
       
   821 
       
   822 /**
       
   823 * The Standby state class for English.
       
   824 *
       
   825 * @since Series 60 5.0
       
   826 */    
       
   827 class CPeninputFingerHwrEnglishStateStandby : public CPeninputFingerHwrStateHandlerBase
       
   828     {
       
   829 public:
       
   830     /**
       
   831      * Factory function
       
   832     *
       
   833     * @since Series 60 5.0
       
   834     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   835     * @return CPeninputFingerHwrStateHandlerStandby* Return the 
       
   836           CPeninputFingerHwrStateHandlerStandby object pointer. 
       
   837     */
       
   838     static CPeninputFingerHwrEnglishStateStandby* NewL( 
       
   839         CPeninputFingerHwrStateManagerEn& aStateManager );
       
   840 public:
       
   841     
       
   842     /**
       
   843     * Handle state event
       
   844     *
       
   845     * @since Series 60 5.0
       
   846     */
       
   847     void HandleEventL( TInt aEventType, const TDesC& aEventData );
       
   848     
       
   849     /**
       
   850     * Handle the state entering action
       
   851     * 
       
   852     * @since Series 60 5.0
       
   853     */
       
   854     void OnEntry();
       
   855     
       
   856     /**
       
   857     * Handle the state exiting action
       
   858     *
       
   859     * @since Series 60 5.0
       
   860     */
       
   861     void OnExit();
       
   862     
       
   863 private:
       
   864     /**
       
   865     * The constructor
       
   866     *
       
   867     * @since Series 60 5.0
       
   868     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   869     */
       
   870     CPeninputFingerHwrEnglishStateStandby( 
       
   871          CPeninputFingerHwrStateManagerEn& aStateManager );
       
   872             
       
   873     };
       
   874 
       
   875 
       
   876 /**
       
   877 * The Writing state class for English.
       
   878 *
       
   879 * @since Series 60 5.0
       
   880 */
       
   881 class CPeninputFingerHwrEnglishStateWriting : public CPeninputFingerHwrStateHandlerBase
       
   882     {
       
   883 public:
       
   884     /**
       
   885     * Factory function
       
   886     *
       
   887     * @since Series 60 5.0
       
   888     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   889     * @return CPeninputFingerHwrStateHandlerWriting* Return the 
       
   890           CPeninputFingerHwrStateHandlerWriting object pointer. 
       
   891     */
       
   892     static CPeninputFingerHwrEnglishStateWriting* NewL( 
       
   893         CPeninputFingerHwrStateManagerEn& aStateManager );    
       
   894 public:
       
   895     
       
   896     /**
       
   897     * Handle state event
       
   898     *
       
   899     * @since Series 60 5.0
       
   900     */
       
   901     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   902     
       
   903     /**
       
   904     * Handle the state entering action
       
   905     * 
       
   906     * @since Series 60 5.0
       
   907     */
       
   908     void OnEntry();
       
   909     
       
   910     /**
       
   911     * Handle the state exiting action
       
   912     *
       
   913     * @since Series 60 5.0
       
   914     */
       
   915     void OnExit();
       
   916     
       
   917 private:
       
   918     /**
       
   919     * The constructor
       
   920     *
       
   921     * @since Series 60 5.0
       
   922     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   923     */
       
   924     CPeninputFingerHwrEnglishStateWriting( CPeninputFingerHwrStateManagerEn& aStateManager );
       
   925 
       
   926     /**
       
   927     * Handle the end stroke event
       
   928     *
       
   929     * @since Series 60 5.0
       
   930     * @param aEventData The trace data
       
   931     */
       
   932     void OnEndStrokeL( const TDesC& aEventData );
       
   933 
       
   934     /**
       
   935     * Handle the end writing event
       
   936     *
       
   937     * @since Series 60 5.0
       
   938     * @param aEventData The trace data
       
   939     */
       
   940     void OnEndWritingL( const TDesC& aEventData );
       
   941     
       
   942     /**
       
   943     * Handle the end writing event
       
   944     *
       
   945     * @since Series 60 5.0
       
   946     */
       
   947     void OnClickBackSpaceL();
       
   948     
       
   949     /**
       
   950     * Handle the candidates selection event
       
   951     *
       
   952     * @since Series 60 5.0
       
   953     * @param aEventData The trace data
       
   954     */    
       
   955     void OnSelectedCandidatesL( const TDesC& aEventData );
       
   956 
       
   957     /**
       
   958     * Handle the predictive selection event
       
   959     *
       
   960     * @since Series 60 5.0
       
   961     * @param aEventData The trace data
       
   962     */
       
   963     void OnSelectedPredictivesL( const TDesC& aEventData );
       
   964            
       
   965     };
       
   966 
       
   967 /**
       
   968 * The CandidateSelecting state class for English.
       
   969 *
       
   970 * @since Series 60 5.0
       
   971 */
       
   972 class CPeninputFingerHwrEnglishStateCandidateSelecting : public CPeninputFingerHwrStateHandlerBase
       
   973     {
       
   974 public:
       
   975     /**
       
   976     * Factory function
       
   977     *
       
   978     * @since Series 60 5.0
       
   979     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
   980     * @return CPeninputFingerHwrStateHandlerCandidateSelecting Return the 
       
   981           CPeninputFingerHwrStateHandlerCandidateSelecting object pointer. 
       
   982     */
       
   983     static CPeninputFingerHwrEnglishStateCandidateSelecting* NewL( 
       
   984         CPeninputFingerHwrStateManagerEn& aStateManager );    
       
   985 public:
       
   986     
       
   987     /**
       
   988     * Handle state event
       
   989     *
       
   990     * @since Series 60 5.0
       
   991     */
       
   992     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
   993     
       
   994     /**
       
   995     * Handle the state entering action
       
   996     * 
       
   997     * @since Series 60 5.0
       
   998     */
       
   999     void OnEntry();
       
  1000     
       
  1001     /**
       
  1002     * Handle the state exiting action
       
  1003     *
       
  1004     * @since Series 60 5.0
       
  1005     */
       
  1006     void OnExit();
       
  1007     
       
  1008 private:
       
  1009     /**
       
  1010     * The constructor
       
  1011     *
       
  1012     * @since Series 60 5.0
       
  1013     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
  1014     */
       
  1015     CPeninputFingerHwrEnglishStateCandidateSelecting( 
       
  1016               CPeninputFingerHwrStateManagerEn& aStateManager );
       
  1017     
       
  1018 private:
       
  1019     /**
       
  1020     * Handle one candiate selected event
       
  1021     * 
       
  1022     * @since Series 60 5.0
       
  1023     * @param aEventData The selected candidate
       
  1024     */
       
  1025     void OnSelectedCandidatesL( const TDesC& aEventData );
       
  1026     
       
  1027     /**
       
  1028     * Handle predictive candidate selected events
       
  1029     *
       
  1030     * @since Series 60 5.0
       
  1031     * @param aEventData The selected predictive candidate
       
  1032     * @param aAppend ETrue if the aEventData need to be appended onto trigger string
       
  1033              EFalse if the aEventData need to set trigger string and do not
       
  1034              submit it to layout
       
  1035     */
       
  1036     void OnSelectedPredictivesL( const TDesC& aEventData );
       
  1037         
       
  1038     void OnClickBackSpaceL();
       
  1039     
       
  1040     };
       
  1041 
       
  1042 
       
  1043 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
  1044 /**
       
  1045 * The PredictSelecting state class for English.
       
  1046 *
       
  1047 * @since Series 60 5.0
       
  1048 */
       
  1049 class CPeninputFingerHwrEnglishStatePredictSelecting : public CPeninputFingerHwrStateHandlerBase
       
  1050     {
       
  1051 public:
       
  1052     /**
       
  1053     * Factory function
       
  1054     *
       
  1055     * @since Series 60 5.0
       
  1056     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
  1057     * @return CPeninputFingerHwrStateHandlerPredictSelecting Return the 
       
  1058           CPeninputFingerHwrStateHandlerPredictSelecting object pointer. 
       
  1059     */
       
  1060     static CPeninputFingerHwrEnglishStatePredictSelecting* NewL( 
       
  1061         CPeninputFingerHwrStateManagerEn& aStateManager );    
       
  1062 public:
       
  1063     
       
  1064     /**
       
  1065     * Handle state event
       
  1066     *
       
  1067     * @since Series 60 5.0
       
  1068     */
       
  1069     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
  1070     
       
  1071     /**
       
  1072     * Handle the state entering action
       
  1073     * 
       
  1074     * @since Series 60 5.0
       
  1075     */
       
  1076     void OnEntry();
       
  1077     
       
  1078     /**
       
  1079     * Handle the state exiting action
       
  1080     *
       
  1081     * @since Series 60 5.0
       
  1082     */
       
  1083     void OnExit();
       
  1084     
       
  1085 private:
       
  1086     /**
       
  1087     * The constructor
       
  1088     *
       
  1089     * @since Series 60 5.0
       
  1090     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
  1091     */
       
  1092     CPeninputFingerHwrEnglishStatePredictSelecting( 
       
  1093          CPeninputFingerHwrStateManagerEn& aStateManager );
       
  1094               
       
  1095 private:
       
  1096     void OnSelectedCandidatesL( const TDesC& aEventData );
       
  1097 
       
  1098 
       
  1099     /**
       
  1100     * Handle one predictive candiate selected event
       
  1101     * 
       
  1102     * @since Series 60 5.0
       
  1103     * @param aEventData The selected candidate
       
  1104     */
       
  1105     void OnSelectedPredictivesL( const TDesC& aEventData );
       
  1106     
       
  1107     void OnClickBackSpaceL();            
       
  1108     };
       
  1109 #endif // RD_INTELLIGENT_TEXT_INPUT    
       
  1110     
       
  1111     
       
  1112 /**
       
  1113 * The Standby state class for number.
       
  1114 *
       
  1115 * @since Series 60 5.0
       
  1116 */    
       
  1117 class CPeninputFingerHwrNumericStateStandby : public CPeninputFingerHwrStateHandlerBase
       
  1118     {
       
  1119 public:
       
  1120     /**
       
  1121      * Factory function
       
  1122     *
       
  1123     * @since Series 60 5.0
       
  1124     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
  1125     * @return CPeninputFingerHwrStateHandlerStandby* Return the 
       
  1126           CPeninputFingerHwrStateHandlerStandby object pointer. 
       
  1127     */
       
  1128     static CPeninputFingerHwrNumericStateStandby* NewL( 
       
  1129         CPeninputFingerHwrStateManagerNum& aStateManager );
       
  1130 public:
       
  1131     
       
  1132     /**
       
  1133     * Handle state event
       
  1134     *
       
  1135     * @since Series 60 5.0
       
  1136     */
       
  1137     void HandleEventL( const TInt aEventType, const TDesC& aEventData );
       
  1138     
       
  1139     /**
       
  1140     * Handle the state entering action
       
  1141     * 
       
  1142     * @since Series 60 5.0
       
  1143     */
       
  1144     void OnEntry();
       
  1145     
       
  1146     /**
       
  1147     * Handle the state exiting action
       
  1148     *
       
  1149     * @since Series 60 5.0
       
  1150     */
       
  1151     void OnExit();
       
  1152     
       
  1153 private:
       
  1154     /**
       
  1155     * The constructor
       
  1156     *
       
  1157     * @since Series 60 5.0
       
  1158     * @param aStateManager The reference to state manager. @see CPeninputFingerHwrStateManager.
       
  1159     */
       
  1160     CPeninputFingerHwrNumericStateStandby( 
       
  1161          CPeninputFingerHwrStateManagerNum& aStateManager );
       
  1162             
       
  1163     };    
       
  1164 
       
  1165 #endif    //C_PENINPUTFINGERHWRSTATEMANAGER_H