fep/aknfep/src/AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.cpp
branchRCL_3
changeset 50 5a1685599b76
parent 44 ecbabf52600f
child 56 8152b1f1763a
equal deleted inserted replaced
46:bd83ceabce89 50:5a1685599b76
    28 
    28 
    29 // System includes
    29 // System includes
    30 #include <PtiEngine.h>  
    30 #include <PtiEngine.h>  
    31 #include <PtiUserDicEntry.h>
    31 #include <PtiUserDicEntry.h>
    32 #include <aknnotewrappers.h> //CAknWarningNote 
    32 #include <aknnotewrappers.h> //CAknWarningNote 
       
    33 #include "AknFepUiManagerBase.h"
    33 
    34 
    34 const TInt KMinCandidateCount = 1;
    35 const TInt KMinCandidateCount = 1;
    35 // User includes
    36 // User includes
    36 #include "AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.h"
    37 #include "AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase.h"
    37 #include "AknFepUiInputStateCandidateQwertyBaseChinesePhrase.h"
    38 #include "AknFepUiInputStateCandidateQwertyBaseChinesePhrase.h"
    40 #include "AknFepUICtrlInputPane.h"
    41 #include "AknFepUICtrlInputPane.h"
    41 #include "aknfepuictrleditpane.h"           //phrase creation
    42 #include "aknfepuictrleditpane.h"           //phrase creation
    42 #include "AknFepUIManagerStateInterface.h"  
    43 #include "AknFepUIManagerStateInterface.h"  
    43 #include "AknFepManager.h" 
    44 #include "AknFepManager.h" 
    44 #include <aknfep.rsg>                 
    45 #include <aknfep.rsg>                 
       
    46 #include "AknFepUiManagerChinese.h"
    45 
    47 
    46 // ---------------------------------------------------------------------------
    48 // ---------------------------------------------------------------------------
    47 // AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase::
    49 // AknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase::
    48 // TAknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase
    50 // TAknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase
    49 // (other items were commented in a header).
    51 // (other items were commented in a header).
   204                     }
   206                     }
   205                 else
   207                 else
   206                     {
   208                     {
   207                     if ( CheckFirstGroupStroke() )
   209                     if ( CheckFirstGroupStroke() )
   208                         {
   210                         {
       
   211                         //stroke to be shown
       
   212                         if ( iPlugin.IsEnable())
       
   213                             {
       
   214                             iPlugin.AnalyseL();
       
   215                             }
   209                         RefreshUI( EFalse );
   216                         RefreshUI( EFalse );
   210                         UIContainer()->CandidatePane()->SelectFirstPhrase();
   217                         UIContainer()->CandidatePane()->SelectFirstPhrase();
   211                         }
   218                         }
   212                     else
   219                     else
   213                         {
   220                         {
       
   221                         //stroke to be shown
       
   222                         if ( iPlugin.IsEnable())
       
   223                             {
       
   224                             iPlugin.AnalyseL();
       
   225                             }
   214                         UIContainer()->EditPaneWindow()->SetAutoChangeStateFlag( EAutoChangeStateFromCandidate );
   226                         UIContainer()->EditPaneWindow()->SetAutoChangeStateFlag( EAutoChangeStateFromCandidate );
   215                         iOwner->ChangeState( EMiniQwertyEdit );
   227                         iOwner->ChangeState( EMiniQwertyEdit );
   216                         }
   228                         }
   217                     }
   229                     }
   218                 }
   230                 }
   276         default:
   288         default:
   277             TAknFepInputStateChineseBase::HandleCommandL( aCommandId );
   289             TAknFepInputStateChineseBase::HandleCommandL( aCommandId );
   278             break;
   290             break;
   279         }
   291         }
   280     }
   292     }
   281 
   293 void TAknFepUiInputStateCandidateMiniQwertyPinyinAndStrokePhrase::SubmitTextL( const TDesC& aText )
       
   294 	{
       
   295 	 if ( aText.Length() )
       
   296 		 {
       
   297 		 if ( !CommitInlineEEPL( aText ) )
       
   298 			{
       
   299 			DoActionAfterCommit();
       
   300 			}
       
   301 		else
       
   302 			{
       
   303 			if ( CheckFirstGroupStroke() )
       
   304 				{
       
   305                 //stroke to be shown
       
   306                 if ( iPlugin.IsEnable())
       
   307                     {
       
   308                     iPlugin.AnalyseL();
       
   309                     }
       
   310 				RefreshUI( EFalse );
       
   311 				UIContainer()->CandidatePane()->SelectFirstPhrase();
       
   312 				}
       
   313 			else
       
   314 				{
       
   315                 if ( iPlugin.IsEnable())
       
   316 			        {
       
   317 			        iPlugin.AnalyseL();
       
   318 			        }
       
   319 				UIContainer()->EditPaneWindow()->SetAutoChangeStateFlag( EAutoChangeStateFromCandidate );
       
   320 				iOwner->ChangeState( EMiniQwertyEdit );
       
   321 				}
       
   322 			}
       
   323 		}
       
   324 	}
   282 // End of file
   325 // End of file