fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp
branchRCL_3
changeset 50 5a1685599b76
parent 46 bd83ceabce89
child 56 8152b1f1763a
equal deleted inserted replaced
46:bd83ceabce89 50:5a1685599b76
   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();
   512     CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
   513     CDesCArrayFlat* keystroke = editPane->KeystrokeArray();
   513     RArray<TInt>* keycodeArray = editPane->KeycodeArray();
   514     RArray<TInt>* keycodeArray = editPane->KeycodeArray();
   514     TInt keystrokeLength = keystroke->Count();
   515     TInt keystrokeLength = keystroke->Count();
   515 
   516 
   516     TBool ret = ETrue;
   517     TBool ret = ETrue;
   675             {
   676             {
   676             if ( popup->IsEnabled() )
   677             if ( popup->IsEnabled() )
   677                 {
   678                 {
   678                 popup->Enable( EFalse );
   679                 popup->Enable( EFalse );
   679                 }
   680                 }
       
   681             candidatePane->SelectFirst();
   680             iOwner->ChangeState( ECandidate );
   682             iOwner->ChangeState( ECandidate );
   681             }
   683             }
   682         else
   684         else
   683             {
   685             {
   684             if ( keystrokeLength > 0 && keystroke->MdcaPoint( 0 )[0] == KSai )
   686             if ( keystrokeLength > 0 && keystroke->MdcaPoint( 0 )[0] == KSai )
  1003         default:
  1005         default:
  1004             TAknFepInputStateChineseBase::HandleCommandL( aCommandId );
  1006             TAknFepInputStateChineseBase::HandleCommandL( aCommandId );
  1005             break;
  1007             break;
  1006         }
  1008         }
  1007     }
  1009     }
       
  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 
  1008 // End of file   
  1048 // End of file   
  1009 
  1049