62 |
62 |
63 // Constants |
63 // Constants |
64 const TInt KPeninputVkbWndInvalidIndex = -1; |
64 const TInt KPeninputVkbWndInvalidIndex = -1; |
65 const TInt KInvalidImg = -1 ; |
65 const TInt KInvalidImg = -1 ; |
66 const TInt KKeyCodeSize = 1; |
66 const TInt KKeyCodeSize = 1; |
|
67 |
|
68 const TInt KTooltipLeftMargin = 10; |
|
69 const TInt KTooltipTopMargin = 0; |
|
70 const TInt KTooltipRightMargin = 10; |
|
71 const TInt KTooltipBottomMargin = 0; |
67 |
72 |
68 _LIT( KVkbWindowResourceFile, |
73 _LIT( KVkbWindowResourceFile, |
69 "z:\\resource\\plugins\\peninputvkbwindow.RSC" ); |
74 "z:\\resource\\plugins\\peninputvkbwindow.RSC" ); |
70 _LIT( KConfigurationResourceFile, |
75 _LIT( KConfigurationResourceFile, |
71 "z:\\resource\\plugins\\peninputvkbwindowconfiginfo_" ); |
76 "z:\\resource\\plugins\\peninputvkbwindowconfiginfo_" ); |
802 icf->TooltipBubbleCtrl()->SetBitmapParam(NULL, |
807 icf->TooltipBubbleCtrl()->SetBitmapParam(NULL, |
803 NULL, |
808 NULL, |
804 KAknsIIDQsnFrInputPreviewSideL, |
809 KAknsIIDQsnFrInputPreviewSideL, |
805 KAknsIIDQsnFrInputPreviewMiddle, |
810 KAknsIIDQsnFrInputPreviewMiddle, |
806 KAknsIIDQsnFrInputPreviewSideR); |
811 KAknsIIDQsnFrInputPreviewSideR); |
807 |
812 icf->TooltipBubbleCtrl()->SetFrameDiff( KTooltipLeftMargin, |
|
813 KTooltipTopMargin, |
|
814 KTooltipRightMargin, |
|
815 KTooltipBottomMargin ); |
808 // read color from skin for autocompletion part |
816 // read color from skin for autocompletion part |
809 icf->SetAutoCompleteTextColor( AutoCompletionPartColor() ); |
817 icf->SetAutoCompleteTextColor( AutoCompletionPartColor() ); |
810 } |
818 } |
811 } |
819 } |
812 |
820 |
813 void CPeninputGenericVkbWindow::SetRangeBarSizeL(TInt x, TInt y) |
821 void CPeninputGenericVkbWindow::SetRangeBarSizeL(TInt x, TInt y) |
814 { |
822 { |
1917 = static_cast<CPeninputGenericVkbLayout*>( UiLayout() ); |
1925 = static_cast<CPeninputGenericVkbLayout*>( UiLayout() ); |
1918 if ( !icf || !( layout->IsEnableITIOnFSQ() ) ) |
1926 if ( !icf || !( layout->IsEnableITIOnFSQ() ) ) |
1919 { |
1927 { |
1920 return; |
1928 return; |
1921 } |
1929 } |
1922 icf->ShowTooltipL( aText ); |
1930 |
|
1931 // Calculate tooltip width |
|
1932 const TPeninputTooltipBoxLayoutData& tooltipBoxLAF |
|
1933 = iLafMgr->TooltipBoxLayoutData(); |
|
1934 TRect tooltipRect = tooltipBoxLAF.iRect; |
|
1935 // Calculate inner rect |
|
1936 TRect innerRect = tooltipRect; |
|
1937 innerRect.iTl += TPoint( KTooltipLeftMargin, KTooltipTopMargin ); |
|
1938 innerRect.iBr -= TPoint( KTooltipRightMargin, KTooltipBottomMargin ); |
|
1939 const CFont* font = tooltipBoxLAF.iFont; |
|
1940 // Set inner width in terms of text width |
|
1941 innerRect.SetWidth( font->TextWidthInPixels( aText ) ); |
|
1942 tooltipRect.iTl |
|
1943 = innerRect.iTl - TPoint( KTooltipLeftMargin, KTooltipTopMargin ); |
|
1944 tooltipRect.iBr |
|
1945 = innerRect.iBr + TPoint( KTooltipRightMargin, KTooltipBottomMargin ); |
|
1946 // Set tooltip rect in terms of inner rect |
|
1947 icf->ShowTooltipL( aText, tooltipRect ); |
1923 } |
1948 } |
1924 |
1949 |
1925 // -------------------------------------------------------------------------- |
1950 // -------------------------------------------------------------------------- |
1926 // Hide tooltip of ICF |
1951 // Hide tooltip of ICF |
1927 // -------------------------------------------------------------------------- |
1952 // -------------------------------------------------------------------------- |