56 #include "peninputvkblayout.h" |
56 #include "peninputvkblayout.h" |
57 |
57 |
58 // constant definition |
58 // constant definition |
59 const TInt KInvalidImg = -1 ; |
59 const TInt KInvalidImg = -1 ; |
60 |
60 |
61 |
61 const TInt KTooltipLeftMargin = 10; |
62 |
62 const TInt KTooltipTopMargin = 0; |
|
63 const TInt KTooltipRightMargin = 10; |
|
64 const TInt KTooltipBottomMargin = 0; |
63 |
65 |
64 // ======== MEMBER FUNCTIONS ======== |
66 // ======== MEMBER FUNCTIONS ======== |
65 |
67 |
66 // --------------------------------------------------------------------------- |
68 // --------------------------------------------------------------------------- |
67 // CAknFepVkbWindow::NewL |
69 // CAknFepVkbWindow::NewL |
1218 { |
1220 { |
1219 if ( UiLayout()->PenInputType() != EPluginInputModeFSQ ) |
1221 if ( UiLayout()->PenInputType() != EPluginInputModeFSQ ) |
1220 { |
1222 { |
1221 return; |
1223 return; |
1222 } |
1224 } |
1223 iInputContextField->ShowTooltipL( aText ); |
1225 |
|
1226 // Calculate tooltip width |
|
1227 const TPeninputCnTooltipBoxLayoutData& tooltipBoxLAF |
|
1228 = iLafMgr->TooltipBoxLayoutData(); |
|
1229 TRect tooltipRect = tooltipBoxLAF.iRect; |
|
1230 // Calculate inner rect |
|
1231 TRect innerRect = tooltipRect; |
|
1232 innerRect.iTl += TPoint( KTooltipLeftMargin, KTooltipTopMargin ); |
|
1233 innerRect.iBr -= TPoint( KTooltipRightMargin, KTooltipBottomMargin ); |
|
1234 const CFont* font = tooltipBoxLAF.iFont; |
|
1235 // Set inner width in terms of text width |
|
1236 innerRect.SetWidth( font->TextWidthInPixels( aText ) ); |
|
1237 tooltipRect.iTl |
|
1238 = innerRect.iTl - TPoint( KTooltipLeftMargin, KTooltipTopMargin ); |
|
1239 tooltipRect.iBr |
|
1240 = innerRect.iBr + TPoint( KTooltipRightMargin, KTooltipBottomMargin ); |
|
1241 // Set tooltip rect in terms of inner rect |
|
1242 iInputContextField->ShowTooltipL( aText, tooltipRect ); |
1224 } |
1243 } |
1225 |
1244 |
1226 // -------------------------------------------------------------------------- |
1245 // -------------------------------------------------------------------------- |
1227 // Hide tooltip of ICF |
1246 // Hide tooltip of ICF |
1228 // -------------------------------------------------------------------------- |
1247 // -------------------------------------------------------------------------- |
1438 EAknsCIQsnTextColorsCG55 ); |
1457 EAknsCIQsnTextColorsCG55 ); |
1439 iInputContextField->TooltipBubbleCtrl()->SetBitmapParam(NULL, |
1458 iInputContextField->TooltipBubbleCtrl()->SetBitmapParam(NULL, |
1440 NULL, |
1459 NULL, |
1441 KAknsIIDQsnFrInputPreviewSideL, |
1460 KAknsIIDQsnFrInputPreviewSideL, |
1442 KAknsIIDQsnFrInputPreviewMiddle, |
1461 KAknsIIDQsnFrInputPreviewMiddle, |
1443 KAknsIIDQsnFrInputPreviewSideR); |
1462 KAknsIIDQsnFrInputPreviewSideR); |
1444 |
1463 iInputContextField->TooltipBubbleCtrl()->SetFrameDiff( KTooltipLeftMargin, |
|
1464 KTooltipTopMargin, |
|
1465 KTooltipRightMargin, |
|
1466 KTooltipBottomMargin ); |
1445 // read color from skin for autocompletion part |
1467 // read color from skin for autocompletion part |
1446 iInputContextField->SetAutoCompleteTextColor( |
1468 iInputContextField->SetAutoCompleteTextColor( |
1447 AutoCompletionPartColorOnFSQ() ); |
1469 AutoCompletionPartColorOnFSQ() ); |
1448 } |
1470 } |
1449 } |
1471 } |