fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp
branchRCL_3
changeset 56 8152b1f1763a
parent 50 5a1685599b76
equal deleted inserted replaced
50:5a1685599b76 56:8152b1f1763a
   507     CPtiEngine* ptiengine = iOwner->PtiEngine();
   507     CPtiEngine* ptiengine = iOwner->PtiEngine();
   508     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
   508     MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
   509     MAknFepUICtrlInputPane* inputPane = uiContainer->InputPane();
   509     MAknFepUICtrlInputPane* inputPane = uiContainer->InputPane();
   510     MAknFepUICtrlPinyinPopup* popup = uiContainer->PinyinPopupWindow();
   510     MAknFepUICtrlPinyinPopup* popup = uiContainer->PinyinPopupWindow();
   511     MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
   511     MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
   512     MAknFepUICtrlCandidatePane* candidatePane = uiContainer->CandidatePane();
       
   513     CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
   512     CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
   514     RArray<TInt>* keycodeArray = editPane->KeycodeArray();
   513     RArray<TInt>* keycodeArray = editPane->KeycodeArray();
   515     TInt keystrokeLength = keystroke->Count();
   514     TInt keystrokeLength = keystroke->Count();
   516 
   515 
   517     TBool ret = ETrue;
   516     TBool ret = ETrue;
   676             {
   675             {
   677             if ( popup->IsEnabled() )
   676             if ( popup->IsEnabled() )
   678                 {
   677                 {
   679                 popup->Enable( EFalse );
   678                 popup->Enable( EFalse );
   680                 }
   679                 }
   681             candidatePane->SelectFirst();
       
   682             iOwner->ChangeState( ECandidate );
   680             iOwner->ChangeState( ECandidate );
   683             }
   681             }
   684         else
   682         else
   685             {
   683             {
   686             if ( keystrokeLength > 0 && keystroke->MdcaPoint( 0 )[0] == KSai )
   684             if ( keystrokeLength > 0 && keystroke->MdcaPoint( 0 )[0] == KSai )
  1005         default:
  1003         default:
  1006             TAknFepInputStateChineseBase::HandleCommandL( aCommandId );
  1004             TAknFepInputStateChineseBase::HandleCommandL( aCommandId );
  1007             break;
  1005             break;
  1008         }
  1006         }
  1009     }
  1007     }
  1010 
       
  1011 void TAknFepInputStateEntryMiniQwertyZhuyinPhrase::SubmitTextL( const TDesC& aText )
       
  1012 	{
       
  1013 	MAknFepUICtrlContainerChinese* uiContainer = UIContainer();
       
  1014 	MAknFepUICtrlEditPane* editPane = uiContainer->EditPaneWindow();
       
  1015 	MAknFepUICtrlPinyinPopup* popup = uiContainer->PinyinPopupWindow();
       
  1016 	CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
       
  1017 	CPtiEngine* ptiengine = iOwner->PtiEngine();
       
  1018     
       
  1019     TInt keystrokeLength = keystroke->Count();
       
  1020     if ( !(editPane->GetEffictiveLength() == keystroke->Count()
       
  1021         && ptiengine->PhoneticSpellingCount() > popup->CurrentSelection())
       
  1022         && (!( keystrokeLength > 0 && keystroke->MdcaPoint( 0 )[0] == KSai )))
       
  1023         {
       
  1024 		editPane->SetChangeState( ETrue );
       
  1025         ClearDeliberateSelection();
       
  1026         editPane->SetNeedClearDeliberateSelection( ETrue );
       
  1027         iOwner->ChangeState( EZhuyinSpelling );
       
  1028         return;
       
  1029         }
       
  1030 	if ( aText.Length( ) )
       
  1031 	   {
       
  1032 	   MAknFepManagerUIInterface* fepMan = iOwner->FepMan( );
       
  1033 	   fepMan->NewTextL( aText );
       
  1034 	   fepMan->CommitInlineEditL( );
       
  1035 	   iOwner->PtiEngine()->SetPredictiveChineseChar( aText );
       
  1036 	   if ( fepMan->IsFlagSet( CAknFepManager::EFlagEditorFull ) )
       
  1037 	      {
       
  1038 	      fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
       
  1039 	      iOwner->FepMan()->TryCloseUiL( );
       
  1040 	      }
       
  1041 	   else
       
  1042 	      {
       
  1043 	      iOwner->ChangeState( EPredictiveCandidate );
       
  1044 	      }
       
  1045 	    }
       
  1046 	}
       
  1047 
       
  1048 // End of file   
  1008 // End of file   
  1049 
  1009