45 #include "peninputitutwesternuimgr.h" |
45 #include "peninputitutwesternuimgr.h" |
46 #include "peninputgenericitutconverter.h" |
46 #include "peninputgenericitutconverter.h" |
47 #include "peninputcommonbgctrl.h" |
47 #include "peninputcommonbgctrl.h" |
48 |
48 |
49 _LIT(KBmpFileName, "z:\\resource\\apps\\peninputgenericitut.mbm"); |
49 _LIT(KBmpFileName, "z:\\resource\\apps\\peninputgenericitut.mbm"); |
|
50 _LIT(KEmptyString, ""); |
50 |
51 |
51 const TInt KImageMajorSkinId = EAknsMajorGeneric; |
52 const TInt KImageMajorSkinId = EAknsMajorGeneric; |
52 const TUint KDefaultSpellTextColor = 0; |
53 const TUint KDefaultSpellTextColor = 0; |
53 const TUint KDefaultIcfTextColor = 0x000000; |
54 const TUint KDefaultIcfTextColor = 0x000000; |
54 const TUint KDefaultIcfFrameColor = 0x000000; |
55 const TUint KDefaultIcfFrameColor = 0x000000; |
156 iStandardItutKp->SetKeyTextColorGroup( EAknsCIQsnTextColorsCG65 ); |
158 iStandardItutKp->SetKeyTextColorGroup( EAknsCIQsnTextColorsCG65 ); |
157 iStandardItutKp->SetDrawOpaqueBackground(EFalse); |
159 iStandardItutKp->SetDrawOpaqueBackground(EFalse); |
158 |
160 |
159 // read key shift icon res |
161 // read key shift icon res |
160 CPenInputColorIcon* shiftIcon = CPenInputColorIcon::NewL( R_ITUT_KEYPAD_SHIFT_ICON ); |
162 CPenInputColorIcon* shiftIcon = CPenInputColorIcon::NewL( R_ITUT_KEYPAD_SHIFT_ICON ); |
161 shiftIcon->ResizeL( iDataMgr->iShiftIconRect.Size() ); |
163 if ( IsPortraitWest()) |
|
164 { |
|
165 shiftIcon->ResizeL( iDataMgr->iShiftIconRectForPrtWest.Size()); |
|
166 } |
|
167 else |
|
168 { |
|
169 shiftIcon->ResizeL( iDataMgr->iShiftIconRect.Size()); |
|
170 } |
162 iStandardItutKp->SetShiftIcon( shiftIcon ); |
171 iStandardItutKp->SetShiftIcon( shiftIcon ); |
163 |
172 |
164 //set key to be 9 piece graphics |
173 //set key to be 9 piece graphics |
165 iStandardItutKp->SetKeySkinId( EKeyBmpNormal, KAknsIIDQsnFrKeypadButtonFrNormal ); |
174 iStandardItutKp->SetKeySkinId( EKeyBmpNormal, KAknsIIDQsnFrKeypadButtonFrNormal ); |
166 iStandardItutKp->SetKeySkinId( EKeyBmpHighlight, KAknsIIDQsnFrKeypadButtonFrPressed ); |
175 iStandardItutKp->SetKeySkinId( EKeyBmpHighlight, KAknsIIDQsnFrKeypadButtonFrPressed ); |
495 } |
504 } |
496 |
505 |
497 |
506 |
498 void CGenericItutWindow::CreateAllButtonL() |
507 void CGenericItutWindow::CreateAllButtonL() |
499 { |
508 { |
500 CFepUiBaseCtrl* temp = NULL; |
509 //CFepUiBaseCtrl* temp = NULL; |
501 //create backgrand |
510 //create backgrand |
502 CreateBackGroundControlL(); |
511 CreateBackGroundControlL(); |
503 |
512 |
504 //create backspace |
513 //create backspace |
505 CreateButtonL(ERawKeyButton, ECtrlIdBackspace, EBackspaceRect, |
514 CreateButtonL(ERawKeyButton, ECtrlIdBackspace, EBackspaceRect, |
506 EBackspaceInnerRect,R_FINGER_RAWKEY_BACKSPACE); |
515 EBackspaceInnerRect,R_FINGER_RAWKEY_BACKSPACE); |
507 |
516 |
508 //create switch |
517 //create switch |
|
518 /* |
509 CreateButtonL(ECommonButton, ECtrlIdSwitch, ESwitchRect, |
519 CreateButtonL(ECommonButton, ECtrlIdSwitch, ESwitchRect, |
510 ESwitchInnerRect, R_FINGER_LAYOUT_SWITCH); |
520 ESwitchInnerRect, R_FINGER_LAYOUT_SWITCH); |
511 |
521 |
512 |
|
513 //create indicator |
|
514 // temp = CreateButtonL(ERawKeyButton, ECtrlIdIndicator, KUnavailableID, |
|
515 // KUnavailableID,KUnavailableID, 127); |
|
516 //If open indicator menu, please use the following 2 lines |
522 //If open indicator menu, please use the following 2 lines |
517 temp = CreateButtonL(ECommonButton, ECtrlIdIndicator, KUnavailableID, |
523 temp = CreateButtonL(ECommonButton, ECtrlIdIndicator, KUnavailableID, |
518 KUnavailableID,KUnavailableID); |
524 KUnavailableID,KUnavailableID); |
519 |
525 |
520 if (temp) |
526 if (temp) |
521 { |
527 { |
522 temp->Hide(ETrue); |
528 temp->Hide(ETrue); |
523 } |
529 } |
524 |
530 |
525 temp = NULL; |
531 temp = NULL; |
526 |
532 */ |
527 |
533 |
528 // create navi |
534 // create navi |
529 CreateButtonL(ERawKeyButton, ECtrlIdArrowLeft, EArrowLeftRect, |
535 CreateButtonL(ERawKeyButton, ECtrlIdArrowLeft, EArrowLeftRect, |
530 ELeftInnerRect,R_FINGER_RAWKEY_LEFTARROW); |
536 ELeftInnerRect,R_FINGER_RAWKEY_LEFTARROW); |
531 |
537 |
810 NULL, |
822 NULL, |
811 KAknsIIDQsnFrInputPreviewSideL, |
823 KAknsIIDQsnFrInputPreviewSideL, |
812 KAknsIIDQsnFrInputPreviewMiddle, |
824 KAknsIIDQsnFrInputPreviewMiddle, |
813 KAknsIIDQsnFrInputPreviewSideR); |
825 KAknsIIDQsnFrInputPreviewSideR); |
814 iICF->SetMsgBubbleCtrlSize(TSize(iBubbleSize.iW,iBubbleSize.iH)); |
826 iICF->SetMsgBubbleCtrlSize(TSize(iBubbleSize.iW,iBubbleSize.iH)); |
|
827 iICF->MsgBubbleCtrl()->SetTextL( KEmptyString ); |
815 /* Teleca change start, 18.05.2009 ssal */ |
828 /* Teleca change start, 18.05.2009 ssal */ |
816 iICF->InfoBubbleCtrl()->SetTextFormat(iBubbleTextLayout); |
829 iICF->InfoBubbleCtrl()->SetTextFormat(iBubbleTextLayout); |
817 iICF->InfoBubbleCtrl()->SetTextColorIndex( EAknsCIQsnTextColorsCG67 ); |
830 iICF->InfoBubbleCtrl()->SetTextColorIndex( EAknsCIQsnTextColorsCG67 ); |
818 iICF->InfoBubbleCtrl()->SetBitmapParam(NULL, |
831 iICF->InfoBubbleCtrl()->SetBitmapParam(NULL, |
819 NULL, |
832 NULL, |
832 { |
845 { |
833 if (iChnCtrlInited) |
846 if (iChnCtrlInited) |
834 { |
847 { |
835 return; |
848 return; |
836 } |
849 } |
|
850 // create switch |
|
851 CreateButtonL(ECommonButton, ECtrlIdSwitch, ESwitchRect, |
|
852 ESwitchInnerRect, R_FINGER_LAYOUT_SWITCH); |
|
853 |
|
854 // create indicator button |
|
855 CFepUiBaseCtrl* indicatorBtn = CreateButtonL(ECommonButton, |
|
856 ECtrlIdIndicator, KUnavailableID, |
|
857 KUnavailableID,KUnavailableID); |
|
858 |
|
859 // create spell indicator |
|
860 CAknFepCtrlLabel* spellIndicator = CAknFepCtrlLabel::NewL(iLayoutOwner, ECtrlIdSpellIndicator); |
|
861 AddControlL(spellIndicator); |
|
862 spellIndicator->Hide(ETrue); |
|
863 |
|
864 // create input case type menu |
|
865 AddEditorMenuL(); |
|
866 |
|
867 // create switch input mode menu |
|
868 iInputModeSwitch = CPeninputLayoutInputmodelChoice::NewL( |
|
869 iLayoutOwner, |
|
870 ECtrlIdInputSwitch, |
|
871 EPluginInputModeItut ); |
|
872 iInputModeSwitch->SetListSkinID( KAknsIIDQsnFrList, KAknsIIDQsnFrPopupSub ); |
|
873 AddControlL( iInputModeSwitch ); |
837 |
874 |
838 CreateDropdownListL(); |
875 CreateDropdownListL(); |
839 // create spell control for stroke/zhuyin |
876 // create spell control for stroke/zhuyin |
840 TRect rect = TItutDataConverter::AnyToRect(iDataMgr->RequestData(ESpellRect)); |
877 TRect rect = TItutDataConverter::AnyToRect(iDataMgr->RequestData(ESpellRect)); |
841 iSpell = CFepInputContextField::NewL(rect, iLayoutOwner, ECtrlIdSpellICF); |
878 iSpell = CFepInputContextField::NewL(rect, iLayoutOwner, ECtrlIdSpellICF); |
978 } |
1015 } |
979 |
1016 |
980 return err; |
1017 return err; |
981 } |
1018 } |
982 |
1019 |
983 |
1020 void CGenericItutWindow::SetIndiBubbleImageL( const TInt aImgID1, |
984 |
1021 const TInt aMaskID1, |
|
1022 const TInt aImgID2, |
|
1023 const TInt aMaskID2 ) |
|
1024 { |
|
1025 MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); |
|
1026 |
|
1027 CFbsBitmap* bmp1 = NULL; |
|
1028 CFbsBitmap* mask1 = NULL; |
|
1029 |
|
1030 TInt colorIndex = EAknsCIQsnIconColorsCG30; |
|
1031 |
|
1032 AknsUtils::CreateColorIconL(skininstance, |
|
1033 KAknsIIDQsnIconColors, |
|
1034 KAknsIIDQsnIconColors, |
|
1035 colorIndex, |
|
1036 bmp1, |
|
1037 mask1, |
|
1038 AknIconUtils::AvkonIconFileName(), |
|
1039 aImgID1, |
|
1040 aMaskID1, |
|
1041 KRgbGray); |
|
1042 CleanupStack::PushL( bmp1 ); |
|
1043 CleanupStack::PushL( mask1 ); |
|
1044 |
|
1045 AknIconUtils::GetContentDimensions(bmp1, iIndicatorSize); |
|
1046 |
|
1047 CFbsBitmap* bmp2 = NULL; |
|
1048 CFbsBitmap* mask2 = NULL; |
|
1049 AknsUtils::CreateColorIconL(skininstance, |
|
1050 KAknsIIDQsnIconColors, |
|
1051 KAknsIIDQsnIconColors, |
|
1052 colorIndex, |
|
1053 bmp2, |
|
1054 mask2, |
|
1055 AknIconUtils::AvkonIconFileName(), |
|
1056 aImgID2, |
|
1057 aMaskID2, |
|
1058 KRgbGray); |
|
1059 |
|
1060 CleanupStack::PushL( bmp2 ); |
|
1061 CleanupStack::PushL( mask2 ); |
|
1062 |
|
1063 AknIconUtils::GetContentDimensions(bmp2, iIndicatorTextSize); |
|
1064 |
|
1065 TRect boundRect; |
|
1066 if ( iIndiWithText ) |
|
1067 { |
|
1068 boundRect = TItutDataConverter::AnyToRect( |
|
1069 iDataMgr->RequestData(EIndiIconWithTextRect)); |
|
1070 } |
|
1071 else |
|
1072 { |
|
1073 boundRect = TItutDataConverter::AnyToRect( |
|
1074 iDataMgr->RequestData(EIndiIconWithoutTextRect)); |
|
1075 } |
|
1076 TRect imgrect, textrect; |
|
1077 |
|
1078 CalIndicatorRect(boundRect, imgrect, textrect, EIndiAlignCenter); |
|
1079 AknIconUtils::SetSize(bmp1, imgrect.Size(), EAspectRatioNotPreserved); |
|
1080 AknIconUtils::SetSize(mask1, imgrect.Size(), EAspectRatioNotPreserved); |
|
1081 AknIconUtils::SetSize(bmp2, textrect.Size(), EAspectRatioNotPreserved); |
|
1082 AknIconUtils::SetSize(mask2, textrect.Size(), EAspectRatioNotPreserved); |
|
1083 |
|
1084 CFbsBitmap* bmp3 = AknPenImageUtils::CombineTwoImagesL(bmp1, bmp2, bmp1->DisplayMode()); |
|
1085 CFbsBitmap* mask3 = AknPenImageUtils::CombineTwoImagesL(mask1, mask2, EGray256); |
|
1086 |
|
1087 iICF->MsgBubbleCtrl()->SetBitmapParam( bmp3, mask3, |
|
1088 KAknsIIDQsnFrInputPreviewSideL, |
|
1089 KAknsIIDQsnFrInputPreviewMiddle, |
|
1090 KAknsIIDQsnFrInputPreviewSideR ); |
|
1091 |
|
1092 CleanupStack::PopAndDestroy( mask2 ); |
|
1093 CleanupStack::PopAndDestroy( bmp2 ); |
|
1094 CleanupStack::PopAndDestroy( mask1 ); |
|
1095 CleanupStack::PopAndDestroy( bmp1 ); |
|
1096 } |
985 void CGenericItutWindow::SetIndicatorImageL(CFepUiBaseCtrl* aIndicator, |
1097 void CGenericItutWindow::SetIndicatorImageL(CFepUiBaseCtrl* aIndicator, |
986 const TInt aImgID1, |
1098 const TInt aImgID1, |
987 const TInt aMaskID1, |
1099 const TInt aMaskID1, |
988 const TInt aImgID2, |
1100 const TInt aImgID2, |
989 const TInt aMaskID2) |
1101 const TInt aMaskID2) |
990 { |
1102 { |
|
1103 if ( NULL == aIndicator ) |
|
1104 { |
|
1105 return; |
|
1106 } |
991 MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); |
1107 MAknsSkinInstance* skininstance = AknsUtils::SkinInstance(); |
992 |
1108 |
993 CFbsBitmap* bmp1 = NULL; |
1109 CFbsBitmap* bmp1 = NULL; |
994 CFbsBitmap* mask1 = NULL; |
1110 CFbsBitmap* mask1 = NULL; |
995 |
1111 |
1096 CleanupStack::PopAndDestroy( bmp2 ); |
1212 CleanupStack::PopAndDestroy( bmp2 ); |
1097 CleanupStack::PopAndDestroy( mask1 ); |
1213 CleanupStack::PopAndDestroy( mask1 ); |
1098 CleanupStack::PopAndDestroy( bmp1 ); |
1214 CleanupStack::PopAndDestroy( bmp1 ); |
1099 } |
1215 } |
1100 |
1216 |
|
1217 void CGenericItutWindow::UpdateIndiBubbleL( TUint8* aData ) |
|
1218 { |
|
1219 RDesReadStream readStream; |
|
1220 TFepIndicatorInfo indicatorData; |
|
1221 |
|
1222 TPtr8 countPtr( aData, 4*sizeof(TInt), 4*sizeof(TInt) ); |
|
1223 readStream.Open(countPtr); |
|
1224 CleanupClosePushL(readStream); |
|
1225 |
|
1226 indicatorData.iIndicatorImgID = readStream.ReadInt32L(); |
|
1227 indicatorData.iIndicatorMaskID = readStream.ReadInt32L(); |
|
1228 indicatorData.iIndicatorTextImgID = readStream.ReadInt32L(); |
|
1229 indicatorData.iIndicatorTextMaskID = readStream.ReadInt32L(); |
|
1230 |
|
1231 CleanupStack::PopAndDestroy(&readStream); |
|
1232 |
|
1233 if (indicatorData.iIndicatorImgID != 0 && |
|
1234 indicatorData.iIndicatorMaskID != 0 && |
|
1235 indicatorData.iIndicatorTextImgID != 0 && |
|
1236 indicatorData.iIndicatorTextMaskID != 0) |
|
1237 { |
|
1238 iDataMgr->SetIndicatorData(indicatorData); |
|
1239 iImDimensionSet = ETrue; |
|
1240 |
|
1241 SetIndiBubbleImageL( indicatorData.iIndicatorImgID, |
|
1242 indicatorData.iIndicatorMaskID, |
|
1243 indicatorData.iIndicatorTextImgID, |
|
1244 indicatorData.iIndicatorTextMaskID); |
|
1245 |
|
1246 if ( iLayoutOwner->UiMgr()->CurrentState()->StateType() == |
|
1247 CGenericItutUiMgrBase::EStateSpelling ) |
|
1248 { |
|
1249 TRect bubbleRect = TItutDataConverter::AnyToRect( |
|
1250 iDataMgr->RequestData( ESpellIndiPaneWithoutTextRect )); |
|
1251 TRect iconRect = TItutDataConverter::AnyToRect( |
|
1252 iDataMgr->RequestData( ESpellIndiIconWithoutTextRect )); |
|
1253 TSize offset( 0, 6 ); |
|
1254 TSize size( iconRect.Width(), iconRect.Height()); |
|
1255 |
|
1256 iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); |
|
1257 iICF->MsgBubbleCtrl()->SetIconOffsetAndSize( offset, size ); |
|
1258 iICF->ShowBubble( KEmptyString, iICF->MsgBubbleCtrl()->Rect()); |
|
1259 } |
|
1260 else |
|
1261 { |
|
1262 TBuf<100> text; |
|
1263 iICF->MsgBubbleCtrl()->GetText( text ); |
|
1264 iICF->ShowBubble( text, iICF->MsgBubbleCtrl()->Rect()); |
|
1265 } |
|
1266 } |
|
1267 } |
1101 |
1268 |
1102 void CGenericItutWindow::UpdateIndicatorL(TUint8* aData) |
1269 void CGenericItutWindow::UpdateIndicatorL(TUint8* aData) |
1103 { |
1270 { |
1104 if ( iLayoutOwner->UiMgr()->CurrentState()->StateType() == |
1271 if ( iLayoutOwner->UiMgr()->CurrentState()->StateType() == |
1105 CGenericItutUiMgrBase::EStateComposition || |
1272 CGenericItutUiMgrBase::EStateComposition || |
1138 |
1305 |
1139 if (iLayoutOwner->UiMgr()->CurrentState()->StateType() == |
1306 if (iLayoutOwner->UiMgr()->CurrentState()->StateType() == |
1140 CGenericItutUiMgrBase::EStateSpelling) |
1307 CGenericItutUiMgrBase::EStateSpelling) |
1141 { |
1308 { |
1142 temp = Control(ECtrlIdSpellIndicator); |
1309 temp = Control(ECtrlIdSpellIndicator); |
1143 Control(ECtrlIdIndicator)->Hide(ETrue); |
1310 if ( !temp ) |
|
1311 { |
|
1312 return; |
|
1313 } |
|
1314 |
|
1315 CFepUiBaseCtrl* indi = Control(ECtrlIdIndicator); |
|
1316 if ( !indi ) |
|
1317 { |
|
1318 return; |
|
1319 } |
|
1320 indi->Hide(ETrue); |
1144 SetIndicatorImageL(temp, |
1321 SetIndicatorImageL(temp, |
1145 indicatorData.iIndicatorImgID, |
1322 indicatorData.iIndicatorImgID, |
1146 indicatorData.iIndicatorMaskID, |
1323 indicatorData.iIndicatorMaskID, |
1147 indicatorData.iIndicatorTextImgID, |
1324 indicatorData.iIndicatorTextImgID, |
1148 indicatorData.iIndicatorTextMaskID); |
1325 indicatorData.iIndicatorTextMaskID); |
1438 icffont->FontMaxHeight(), |
1625 icffont->FontMaxHeight(), |
1439 icffont); |
1626 icffont); |
1440 } |
1627 } |
1441 else |
1628 else |
1442 { |
1629 { |
1443 iICF->SetTextMargin ( iDataMgr->iIcfTextLeftMargin, |
1630 if ( iDataMgr->IsLandScape()) |
1444 iDataMgr->iIcfTextRightMargin, |
1631 { |
1445 iDataMgr->iIcfTextTopMargin, |
1632 iICF->SetTextMargin ( iDataMgr->iIcfTextLeftMargin, |
1446 iDataMgr->iIcfTextBottomMargin ); |
1633 iDataMgr->iIcfTextRightMargin, |
1447 |
1634 iDataMgr->iIcfTextTopMargin, |
1448 iICF->SetLineSpace( iDataMgr->iIcfTextLineSpaceMargin ); |
1635 iDataMgr->iIcfTextBottomMargin ); |
1449 |
1636 |
1450 iICF->SizeChangedL(TItutDataConverter::AnyToRect(iDataMgr->RequestData(EIcfRect)), |
1637 iICF->SetLineSpace( iDataMgr->iIcfTextLineSpaceMargin ); |
1451 //icffont->HeightInPixels(), |
1638 |
1452 iDataMgr->iIcfTextHeight, |
1639 iICF->SizeChangedL(TItutDataConverter::AnyToRect(iDataMgr->RequestData(EIcfRect)), |
1453 icffont->FontMaxHeight(), |
1640 iDataMgr->iIcfTextHeight, |
1454 icffont); |
1641 icffont->FontMaxHeight(), |
|
1642 icffont); |
|
1643 } |
|
1644 else |
|
1645 { |
|
1646 iICF->SetTextMargin ( iDataMgr->iIcfTextLeftMarginForPrtWest, |
|
1647 iDataMgr->iIcfTextRightMarginForPrtWest, |
|
1648 iDataMgr->iIcfTextTopMarginForPrtWest, |
|
1649 iDataMgr->iIcfTextBottomMarginForPrtWest ); |
|
1650 |
|
1651 iICF->SetLineSpace( iDataMgr->iIcfTextLineSpaceMarginForPrtWest ); |
|
1652 |
|
1653 iICF->SizeChangedL(TItutDataConverter::AnyToRect(iDataMgr->RequestData(EIcfRect)), |
|
1654 iDataMgr->iIcfTextHeightForPrtWest, |
|
1655 icffont->FontMaxHeight(), |
|
1656 icffont); |
|
1657 } |
1455 } |
1658 } |
1456 |
1659 |
1457 iICF->Hide(EFalse); |
1660 iICF->Hide(EFalse); |
1458 |
1661 |
|
1662 if ( IsPortraitWest() && (!iDataMgr->IsChineseGlobalLanguage())) |
|
1663 { |
|
1664 iICF->MsgBubbleCtrl()->SetTextL( KEmptyString ); |
|
1665 iIndiWithText = EFalse; |
|
1666 IndiBubbleWithoutText(); |
|
1667 } |
1459 if( iDataMgr->IsChinese() ) |
1668 if( iDataMgr->IsChinese() ) |
1460 { |
1669 { |
1461 ControlSizeChanged(ECtrlIdArrowUp, EArrowUpRect, EUpInnerRect, ETrue); |
1670 ControlSizeChanged(ECtrlIdArrowUp, EArrowUpRect, EUpInnerRect, ETrue); |
1462 ControlSizeChanged(ECtrlIdArrowDown, EArrowDownRect, EDownInnerRect, ETrue); |
1671 ControlSizeChanged(ECtrlIdArrowDown, EArrowDownRect, EDownInnerRect, ETrue); |
1463 } |
1672 } |
1464 |
1673 |
1465 TBool bSizeChanged = EFalse; |
1674 TBool bSizeChanged = EFalse; |
1466 ControlSizeChanged(ECtrlIdArrowLeft, EArrowLeftRect, ELeftInnerRect, ETrue); |
1675 ControlSizeChanged(ECtrlIdArrowLeft, EArrowLeftRect, ELeftInnerRect, ETrue); |
1467 ControlSizeChanged(ECtrlIdArrowRight, EArrowRightRect, ERightInnerRect, ETrue); |
1676 ControlSizeChanged(ECtrlIdArrowRight, EArrowRightRect, ERightInnerRect, ETrue); |
1468 ControlSizeChanged(ECtrlIdSwitch, ESwitchRect, ESwitchInnerRect, ETrue); |
1677 if( iDataMgr->IsChinese()) |
|
1678 { |
|
1679 ControlSizeChanged(ECtrlIdSwitch, ESwitchRect, ESwitchInnerRect, ETrue); |
|
1680 } |
1469 bSizeChanged = ControlSizeChanged(ECtrlIdBackspace, EBackspaceRect, EBackspaceInnerRect, ETrue); |
1681 bSizeChanged = ControlSizeChanged(ECtrlIdBackspace, EBackspaceRect, EBackspaceInnerRect, ETrue); |
1470 ControlSizeChanged(ECtrlIdOptions, EOptionsRect, EOptionInnerRect, ETrue); |
1682 ControlSizeChanged(ECtrlIdOptions, EOptionsRect, EOptionInnerRect, ETrue); |
1471 ControlSizeChanged(ECtrlIdClose, ECloseRect, ECloseInnerRect, ETrue); |
1683 ControlSizeChanged(ECtrlIdClose, ECloseRect, ECloseInnerRect, ETrue); |
1472 |
1684 |
1473 // resize all controls |
1685 // resize all controls |
1526 // when skin change all control with skin image should be reload. |
1738 // when skin change all control with skin image should be reload. |
1527 TRAP_IGNORE(ConstructKeyImageFromResourceL( R_ITUT_KEYPAD_BITMAP )); |
1739 TRAP_IGNORE(ConstructKeyImageFromResourceL( R_ITUT_KEYPAD_BITMAP )); |
1528 |
1740 |
1529 // reconstruct shift icon when skin changed |
1741 // reconstruct shift icon when skin changed |
1530 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ReConstructL()); |
1742 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ReConstructL()); |
1531 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ResizeL(iDataMgr->iShiftIconRect.Size())); |
1743 if ( IsPortraitWest()) |
|
1744 { |
|
1745 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ResizeL(iDataMgr->iShiftIconRectForPrtWest.Size())); |
|
1746 } |
|
1747 else |
|
1748 { |
|
1749 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ResizeL(iDataMgr->iShiftIconRect.Size())); |
|
1750 } |
1532 |
1751 |
1533 //Skin change will case the reconstuction of the button graphic. |
1752 //Skin change will case the reconstuction of the button graphic. |
1534 //When language is RToL, it should be mirrored again. |
1753 //When language is RToL, it should be mirrored again. |
1535 if( iDataMgr->IsRtoLLanguage() ) |
1754 if( iDataMgr->IsRtoLLanguage() ) |
1536 { |
1755 { |
1562 iLayoutOwner->SignalOwner(ESignalEnterMatchSelection, buf); |
1781 iLayoutOwner->SignalOwner(ESignalEnterMatchSelection, buf); |
1563 } |
1782 } |
1564 |
1783 |
1565 void CGenericItutWindow::ResetIndicatorL(CFepUiBaseCtrl* aIndicator) |
1784 void CGenericItutWindow::ResetIndicatorL(CFepUiBaseCtrl* aIndicator) |
1566 { |
1785 { |
|
1786 if ( NULL == aIndicator ) |
|
1787 { |
|
1788 return; |
|
1789 } |
1567 SetIndicatorImageL(aIndicator, |
1790 SetIndicatorImageL(aIndicator, |
1568 iDataMgr->IndicatorData().iIndicatorImgID, |
1791 iDataMgr->IndicatorData().iIndicatorImgID, |
1569 iDataMgr->IndicatorData().iIndicatorMaskID, |
1792 iDataMgr->IndicatorData().iIndicatorMaskID, |
1570 iDataMgr->IndicatorData().iIndicatorTextImgID, |
1793 iDataMgr->IndicatorData().iIndicatorTextImgID, |
1571 iDataMgr->IndicatorData().iIndicatorTextMaskID); |
1794 iDataMgr->IndicatorData().iIndicatorTextMaskID); |
1791 |
2020 |
1792 unicodesArr1.Close(); |
2021 unicodesArr1.Close(); |
1793 unicodesInt.Close(); |
2022 unicodesInt.Close(); |
1794 |
2023 |
1795 } |
2024 } |
|
2025 TBool CGenericItutWindow::IsPortraitWest() |
|
2026 { |
|
2027 return !iDataMgr->IsChinese() && !iDataMgr->IsLandScape(); |
|
2028 } |
|
2029 |
|
2030 void CGenericItutWindow::IndiBubbleWithText() |
|
2031 { |
|
2032 if ( iICF ) |
|
2033 { |
|
2034 TAknTextLineLayout textLine = TItutDataConverter::AnyToTextLine( |
|
2035 iDataMgr->RequestData( EIndiTextLine )); |
|
2036 TRect bubbleRect = TItutDataConverter::AnyToRect( |
|
2037 iDataMgr->RequestData( EIndiPaneWithTextRect )); |
|
2038 TRect iconRect = TItutDataConverter::AnyToRect( |
|
2039 iDataMgr->RequestData( EIndiIconWithTextRect )); |
|
2040 TSize offset( 60, 6 ); |
|
2041 TSize size( iconRect.Width(), iconRect.Height()); |
|
2042 |
|
2043 iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); |
|
2044 iICF->MsgBubbleCtrl()->SetIconOffsetAndSize( offset, size ); |
|
2045 iICF->MsgBubbleCtrl()->SetTextFormat( textLine ); |
|
2046 iICF->MsgBubbleCtrl()->SetTextColorIndex( EAknsCIQsnTextColorsCG67 ); |
|
2047 } |
|
2048 } |
|
2049 |
|
2050 void CGenericItutWindow::IndiBubbleWithoutText() |
|
2051 { |
|
2052 if ( iICF ) |
|
2053 { |
|
2054 TRect bubbleRect = TItutDataConverter::AnyToRect( |
|
2055 iDataMgr->RequestData( EIndiPaneWithoutTextRect )); |
|
2056 TRect iconRect = TItutDataConverter::AnyToRect( |
|
2057 iDataMgr->RequestData( EIndiIconWithoutTextRect )); |
|
2058 TSize offset( 0, 6 ); |
|
2059 TSize size( iconRect.Width(), iconRect.Height()); |
|
2060 |
|
2061 iICF->MsgBubbleCtrl()->SetRect( bubbleRect ); |
|
2062 iICF->MsgBubbleCtrl()->SetIconOffsetAndSize( offset, size ); |
|
2063 } |
|
2064 } |
|
2065 |
|
2066 void CGenericItutWindow::SetIndiWithTextFlag( TBool aFlag ) |
|
2067 { |
|
2068 iIndiWithText = aFlag; |
|
2069 } |
1796 // End Of File |
2070 // End Of File |