textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp
equal
deleted
inserted
replaced
668 iInsertionPoint->DelayCursorShown(); |
668 iInsertionPoint->DelayCursorShown(); |
669 } |
669 } |
670 |
670 |
671 AdjustSelectionL( icfdata.iCurSel ); |
671 AdjustSelectionL( icfdata.iCurSel ); |
672 RecalcualteTextPositionL(); |
672 RecalcualteTextPositionL(); |
673 SetMsgBubbleRect(); |
673 //SetMsgBubbleRect(); |
|
674 SetMsgBubbleRectAccordingToLanguage(); |
674 Draw(); |
675 Draw(); |
675 } |
676 } |
676 break; |
677 break; |
677 case EPeninputICFReplace: |
678 case EPeninputICFReplace: |
678 { |
679 { |
824 iHideBubbleTemp = EFalse; |
825 iHideBubbleTemp = EFalse; |
825 } |
826 } |
826 } |
827 } |
827 else |
828 else |
828 { |
829 { |
829 SetMsgBubbleRect(); |
830 //SetMsgBubbleRect(); |
|
831 SetMsgBubbleRectAccordingToLanguage(); |
830 SetInfoBubbleRect(); |
832 SetInfoBubbleRect(); |
831 } |
833 } |
832 } |
834 } |
833 |
835 |
834 TBool CFepLayoutMultiLineIcfEditor::HighlightOverlapWithBubble( const TRect& aRect ) |
836 TBool CFepLayoutMultiLineIcfEditor::HighlightOverlapWithBubble( const TRect& aRect ) |
1191 iInsertionPoint->SetPosition( TPoint(rect.iTl.iX + width1 + iOffset,rect.iTl.iY )); |
1193 iInsertionPoint->SetPosition( TPoint(rect.iTl.iX + width1 + iOffset,rect.iTl.iY )); |
1192 |
1194 |
1193 TInt baseLine = iFont->AscentInPixels()/2 + rect.Height()/2; |
1195 TInt baseLine = iFont->AscentInPixels()/2 + rect.Height()/2; |
1194 |
1196 |
1195 TRect clipRect = |
1197 TRect clipRect = |
1196 TRect( TPoint(Rect().iTl.iX, rect.iTl.iY), TPoint( Rect().iBr.iX, rect.iBr.iY)); |
1198 TRect( TPoint(Rect().iTl.iX + 1, rect.iTl.iY), TPoint( Rect().iBr.iX - 1, rect.iBr.iY)); |
1197 |
1199 |
1198 gc->SetClippingRect( clipRect ); |
1200 gc->SetClippingRect( clipRect ); |
1199 gc->Clear( clipRect ); |
1201 gc->Clear( clipRect ); |
1200 |
1202 |
1201 DrawOpaqueMaskBackground( clipRect ); |
1203 DrawOpaqueMaskBackground( clipRect ); |
1311 TRAP_IGNORE(iTextView->SetViewLineAtTopL( iLineNumber+1 )); |
1313 TRAP_IGNORE(iTextView->SetViewLineAtTopL( iLineNumber+1 )); |
1312 } |
1314 } |
1313 } |
1315 } |
1314 |
1316 |
1315 TRAP_IGNORE(RecalcualteTextPositionL()); |
1317 TRAP_IGNORE(RecalcualteTextPositionL()); |
1316 SetMsgBubbleRect(); |
1318 |
|
1319 //SetMsgBubbleRect(); |
|
1320 SetMsgBubbleRectAccordingToLanguage(); |
1317 } |
1321 } |
1318 |
1322 |
1319 void CFepLayoutMultiLineIcfEditor::ResetViewHeightL() |
1323 void CFepLayoutMultiLineIcfEditor::ResetViewHeightL() |
1320 { |
1324 { |
1321 const TInt height = iLayout->FormattedHeightInPixels(); |
1325 const TInt height = iLayout->FormattedHeightInPixels(); |
1362 { |
1366 { |
1363 iViewRect.iBr.iY -= margin; |
1367 iViewRect.iBr.iY -= margin; |
1364 } |
1368 } |
1365 iTextView->SetViewRect(iViewRect); |
1369 iTextView->SetViewRect(iViewRect); |
1366 } |
1370 } |
|
1371 |
|
1372 void CFepLayoutMultiLineIcfEditor::SetMsgBubbleRectAccordingToLanguage() |
|
1373 { |
|
1374 if ( iPreLanguageID == ELangPrcChinese || |
|
1375 iPreLanguageID == ELangHongKongChinese || |
|
1376 iPreLanguageID == ELangTaiwanChinese || |
|
1377 iPreLanguageID == ELangKorean ) |
|
1378 { |
|
1379 SetMsgBubbleRect(); |
|
1380 return; |
|
1381 } |
|
1382 else |
|
1383 { |
|
1384 if(( !iMsgBubble->IsShowing() && !iHideBubbleTemp ) || |
|
1385 iLineMaxCount < 1 || iCursorSel.iCursorPos < 0 ) |
|
1386 { |
|
1387 return; |
|
1388 } |
|
1389 |
|
1390 iMsgBubble->Popup( iMsgBubble->Rect()); |
|
1391 iHideBubbleTemp = EFalse; |
|
1392 |
|
1393 return; |
|
1394 } |
|
1395 } |
1367 |
1396 |
1368 void CFepLayoutMultiLineIcfEditor::SetMsgBubbleRect() |
1397 void CFepLayoutMultiLineIcfEditor::SetMsgBubbleRect() |
1369 { |
1398 { |
1370 if( ( !iMsgBubble->IsShowing() && !iHideBubbleTemp ) || |
1399 if( ( !iMsgBubble->IsShowing() && !iHideBubbleTemp ) || |
1371 iLineMaxCount < 1 || iCursorSel.iCursorPos < 0 ) |
1400 iLineMaxCount < 1 || iCursorSel.iCursorPos < 0 ) |
1739 // Draw(); |
1768 // Draw(); |
1740 // } |
1769 // } |
1741 iTextView->HandleGlobalChangeNoRedrawL(); |
1770 iTextView->HandleGlobalChangeNoRedrawL(); |
1742 iTextView->SetSelectionL( iTextView->Selection() ); |
1771 iTextView->SetSelectionL( iTextView->Selection() ); |
1743 RecalcualteTextPositionL(); |
1772 RecalcualteTextPositionL(); |
1744 SetMsgBubbleRect(); |
1773 //SetMsgBubbleRect(); |
|
1774 SetMsgBubbleRectAccordingToLanguage(); |
1745 Draw(); |
1775 Draw(); |
1746 } |
1776 } |
1747 |
1777 |
1748 TBool CFepLayoutMultiLineIcfEditor::BelongToPromptText(TInt aPos) |
1778 TBool CFepLayoutMultiLineIcfEditor::BelongToPromptText(TInt aPos) |
1749 { |
1779 { |
2678 |
2708 |
2679 void CFepLayoutMultiLineIcfEditor::ShowBubble(const TDesC& aText, const TRect& /*aRect*/) |
2709 void CFepLayoutMultiLineIcfEditor::ShowBubble(const TDesC& aText, const TRect& /*aRect*/) |
2680 { |
2710 { |
2681 TRAP_IGNORE(iMsgBubble->SetTextL(aText)); |
2711 TRAP_IGNORE(iMsgBubble->SetTextL(aText)); |
2682 iHideBubbleTemp = ETrue; |
2712 iHideBubbleTemp = ETrue; |
2683 SetMsgBubbleRect(); |
2713 //SetMsgBubbleRect(); |
|
2714 SetMsgBubbleRectAccordingToLanguage(); |
2684 } |
2715 } |
2685 |
2716 |
2686 void CFepLayoutMultiLineIcfEditor::ShowByteWarningBubble(const TDesC& aInfo) |
2717 void CFepLayoutMultiLineIcfEditor::ShowByteWarningBubble(const TDesC& aInfo) |
2687 { |
2718 { |
2688 TSize size = iInfoBubble->Rect().Size(); |
2719 TSize size = iInfoBubble->Rect().Size(); |
2778 CalculateCursorPos(cursorPt); |
2809 CalculateCursorPos(cursorPt); |
2779 if ( !iViewRect.Contains( cursorPt ) && ( lineIndex + 1 ) > ( iLineMaxCount - 1 ) ) |
2810 if ( !iViewRect.Contains( cursorPt ) && ( lineIndex + 1 ) > ( iLineMaxCount - 1 ) ) |
2780 { |
2811 { |
2781 iTextView->SetViewLineAtTopL(( lineIndex + 1 ) - ( iLineMaxCount - 1 )); |
2812 iTextView->SetViewLineAtTopL(( lineIndex + 1 ) - ( iLineMaxCount - 1 )); |
2782 RecalcualteTextPositionL(); |
2813 RecalcualteTextPositionL(); |
2783 SetMsgBubbleRect(); |
2814 //SetMsgBubbleRect(); |
|
2815 SetMsgBubbleRectAccordingToLanguage(); |
2784 } |
2816 } |
2785 } |
2817 } |
2786 |
2818 |
2787 const TInt lineCount = iLayout->NumFormattedLines(); |
2819 const TInt lineCount = iLayout->NumFormattedLines(); |
2788 |
2820 |
2797 |
2829 |
2798 iTextView->SetViewLineAtTopL( |
2830 iTextView->SetViewLineAtTopL( |
2799 lineCount - pageCount + 1 < 1 ? 1 : lineCount - pageCount + 1 ); |
2831 lineCount - pageCount + 1 < 1 ? 1 : lineCount - pageCount + 1 ); |
2800 |
2832 |
2801 RecalcualteTextPositionL(); |
2833 RecalcualteTextPositionL(); |
2802 SetMsgBubbleRect(); |
2834 //SetMsgBubbleRect(); |
|
2835 SetMsgBubbleRectAccordingToLanguage(); |
2803 } |
2836 } |
2804 } |
2837 } |
2805 } |
2838 } |
2806 |
2839 |
2807 void CFepLayoutMultiLineIcfEditor::DrawIcfBackground( CFbsBitGc& /*aGc*/, const TRect& aDrawnRect, |
2840 void CFepLayoutMultiLineIcfEditor::DrawIcfBackground( CFbsBitGc& /*aGc*/, const TRect& aDrawnRect, |