textinput/peninputgenericitut/src/peninputitutwesternuistatematchselection.cpp
branchRCL_3
changeset 9 e6a39382bb9c
parent 8 4eb1ae11334f
equal deleted inserted replaced
8:4eb1ae11334f 9:e6a39382bb9c
   101    }
   101    }
   102 
   102 
   103 void CWesternItutUiStateMatchSelection::OnExit()
   103 void CWesternItutUiStateMatchSelection::OnExit()
   104     {
   104     {
   105     // Hide ICF, Backspace, Arrow contrls when exit to avoid flick
   105     // Hide ICF, Backspace, Arrow contrls when exit to avoid flick
   106     iOwner->LayoutContext()->ShowArrowBtn(0);
   106     //iOwner->LayoutContext()->ShowArrowBtn(0);
   107     iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
   107     //iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
   108     iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide( ETrue );
   108     //iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide( ETrue );
   109     iSelList->CloseWindow();
   109     iSelList->CloseWindow();
   110     iIcf->SetOverLapState(EFalse);
   110     iIcf->SetOverLapState(EFalse);
   111     }
   111     }
   112 
   112 
   113 CGenericItutUiMgrBase::TUiState CWesternItutUiStateMatchSelection::StateType()
   113 CGenericItutUiMgrBase::TUiState CWesternItutUiStateMatchSelection::StateType()
   184     switch (aCmd)
   184     switch (aCmd)
   185         {
   185         {
   186         case ECmdPenInputFingerMatchList:
   186         case ECmdPenInputFingerMatchList:
   187             {
   187             {
   188             RDesReadStream readStream;
   188             RDesReadStream readStream;
   189             TPtr8 countPtr(aData, 2*sizeof(TInt), 2*sizeof(TInt));
   189             TPtr8 countPtr(aData, 3 * sizeof(TInt), 3 * sizeof(TInt));
   190             readStream.Open(countPtr);
   190             readStream.Open(countPtr);
   191             CleanupClosePushL(readStream);
   191             CleanupClosePushL(readStream);
   192 
   192 
   193             TInt candcount = readStream.ReadInt32L();
   193             TInt candcount = readStream.ReadInt32L();
   194             TInt totalsize = readStream.ReadInt32L();
   194             TInt totalsize = readStream.ReadInt32L();
       
   195 			TInt langcode = readStream.ReadInt32L();
       
   196 			TInt align = TBidiText::ScriptDirectionality((TLanguage)langcode);
       
   197 			if(align != TBidiText::ELeftToRight)
       
   198 				align = CGraphicsContext::ERight;
       
   199 			else
       
   200 				align = CGraphicsContext::ELeft;
       
   201 			
   195             CleanupStack::PopAndDestroy(&readStream);
   202             CleanupStack::PopAndDestroy(&readStream);
   196 
   203 
   197             TPtr8 ptr(aData + 2*sizeof(TInt), totalsize - 2*sizeof(TInt), 
   204             TPtr8 ptr(aData + 3 * sizeof(TInt), totalsize - 3 * sizeof(TInt), 
   198                       totalsize - 2*sizeof(TInt));
   205                       totalsize - 3 * sizeof(TInt));
   199             readStream.Open(ptr);
   206             readStream.Open(ptr);
   200             CleanupClosePushL(readStream);
   207             CleanupClosePushL(readStream);
   201 
   208 
   202             iCandlist.ResetAndDestroy();
   209             iCandlist.ResetAndDestroy();
   203 
   210 
   204             iSelList->ClearItemsL();
   211             iSelList->ClearItemsL();
       
   212             iSelList->SetTextAlignment((CGraphicsContext::TTextAlign) align);
   205             CFepLayoutChoiceList::SItem item;
   213             CFepLayoutChoiceList::SItem item;
   206 
   214 
   207             for (TInt i = 0; i < candcount; i++)
   215             for (TInt i = 0; i < candcount; i++)
   208                 {
   216                 {
   209                 TInt candSize = readStream.ReadInt32L();
   217                 TInt candSize = readStream.ReadInt32L();