158 iStandardItutKp->SetKeyTextColorGroup( EAknsCIQsnTextColorsCG65 ); |
158 iStandardItutKp->SetKeyTextColorGroup( EAknsCIQsnTextColorsCG65 ); |
159 iStandardItutKp->SetDrawOpaqueBackground(EFalse); |
159 iStandardItutKp->SetDrawOpaqueBackground(EFalse); |
160 |
160 |
161 // read key shift icon res |
161 // read key shift icon res |
162 CPenInputColorIcon* shiftIcon = CPenInputColorIcon::NewL( R_ITUT_KEYPAD_SHIFT_ICON ); |
162 CPenInputColorIcon* shiftIcon = CPenInputColorIcon::NewL( R_ITUT_KEYPAD_SHIFT_ICON ); |
163 if ( IsPortraitWest()) |
163 if ( iDataMgr->IsPortraitWest()) |
164 { |
164 { |
|
165 CPenInputColorIcon* starIcon = CPenInputColorIcon::NewL( R_ITUT_KEYPAD_STAR_ICON ); |
165 shiftIcon->ResizeL( iDataMgr->iShiftIconRectForPrtWest.Size()); |
166 shiftIcon->ResizeL( iDataMgr->iShiftIconRectForPrtWest.Size()); |
|
167 starIcon->ResizeL( iDataMgr->iStarIconRectForPrtWest.Size()); |
|
168 iStandardItutKp->SetStarIcon( starIcon ); |
166 } |
169 } |
167 else |
170 else |
168 { |
171 { |
169 shiftIcon->ResizeL( iDataMgr->iShiftIconRect.Size()); |
172 shiftIcon->ResizeL( iDataMgr->iShiftIconRect.Size()); |
170 } |
173 } |
369 |
372 |
370 |
373 |
371 iBackgroundCtrl->SetRect(TItutDataConverter::AnyToRect( |
374 iBackgroundCtrl->SetRect(TItutDataConverter::AnyToRect( |
372 iLayoutOwner->DataMgr()->RequestData(ELayoutRect))); |
375 iLayoutOwner->DataMgr()->RequestData(ELayoutRect))); |
373 |
376 |
374 TCommonBgCtrlSubItem bgSubItem; |
|
375 TRect spellPaneRect; |
|
376 |
|
377 spellPaneRect = TItutDataConverter::AnyToRect( |
|
378 iDataMgr->RequestData(ESpellQueryPaneRect) ); |
|
379 |
|
380 bgSubItem.iRect = spellPaneRect; |
|
381 bgSubItem.iFrameID = KAknsIIDQsnFrPopupSub; |
|
382 bgSubItem.iCenterID = KAknsIIDDefault; |
|
383 bgSubItem.iIsShow = EFalse; |
|
384 |
|
385 iBackgroundCtrl->AddSubBgItemL( bgSubItem ); |
|
386 |
|
387 AddControlL(iBackgroundCtrl); |
377 AddControlL(iBackgroundCtrl); |
388 } |
378 } |
389 |
379 |
390 |
380 |
391 CAknFepCtrlCommonButton* CGenericItutWindow::CreateRawKeyButtonL(const TInt aControlId, |
381 CAknFepCtrlCommonButton* CGenericItutWindow::CreateRawKeyButtonL(const TInt aControlId, |
845 { |
835 { |
846 if (iChnCtrlInited) |
836 if (iChnCtrlInited) |
847 { |
837 { |
848 return; |
838 return; |
849 } |
839 } |
850 // create switch |
840 |
851 CreateButtonL(ECommonButton, ECtrlIdSwitch, ESwitchRect, |
841 if( !Control( ECtrlIdSwitch )) |
852 ESwitchInnerRect, R_FINGER_LAYOUT_SWITCH); |
842 { |
853 |
843 // create switch |
854 // create indicator button |
844 CreateButtonL(ECommonButton, ECtrlIdSwitch, ESwitchRect, |
855 CFepUiBaseCtrl* indicatorBtn = CreateButtonL(ECommonButton, |
845 ESwitchInnerRect, R_FINGER_LAYOUT_SWITCH); |
856 ECtrlIdIndicator, KUnavailableID, |
846 } |
857 KUnavailableID,KUnavailableID); |
847 |
858 |
848 if( !Control( ECtrlIdIndicator ) ) |
|
849 { |
|
850 // create indicator button |
|
851 CFepUiBaseCtrl* indicatorBtn = CreateButtonL(ECommonButton, |
|
852 ECtrlIdIndicator, KUnavailableID, |
|
853 KUnavailableID,KUnavailableID); |
|
854 |
|
855 // create input case type menu |
|
856 AddEditorMenuL(); |
|
857 } |
|
858 |
|
859 if( ! iInputModeSwitch ) |
|
860 { |
|
861 // create switch input mode menu |
|
862 iInputModeSwitch = CPeninputLayoutInputmodelChoice::NewL( |
|
863 iLayoutOwner, |
|
864 ECtrlIdInputSwitch, |
|
865 EPluginInputModeItut ); |
|
866 iInputModeSwitch->SetListSkinID( KAknsIIDQsnFrList, KAknsIIDQsnFrPopupSub ); |
|
867 AddControlL( iInputModeSwitch ); |
|
868 } |
859 // create spell indicator |
869 // create spell indicator |
860 CAknFepCtrlLabel* spellIndicator = CAknFepCtrlLabel::NewL(iLayoutOwner, ECtrlIdSpellIndicator); |
870 CAknFepCtrlLabel* spellIndicator = CAknFepCtrlLabel::NewL(iLayoutOwner, ECtrlIdSpellIndicator); |
861 AddControlL(spellIndicator); |
871 AddControlL(spellIndicator); |
862 spellIndicator->Hide(ETrue); |
872 spellIndicator->Hide(ETrue); |
863 |
873 |
864 // create input case type menu |
874 |
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 ); |
|
874 |
|
875 CreateDropdownListL(); |
875 CreateDropdownListL(); |
876 // create spell control for stroke/zhuyin |
876 // create spell control for stroke/zhuyin |
877 TRect rect = TItutDataConverter::AnyToRect(iDataMgr->RequestData(ESpellRect)); |
877 TRect rect = TItutDataConverter::AnyToRect(iDataMgr->RequestData(ESpellRect)); |
878 iSpell = CFepInputContextField::NewL(rect, iLayoutOwner, ECtrlIdSpellICF); |
878 iSpell = CFepInputContextField::NewL(rect, iLayoutOwner, ECtrlIdSpellICF); |
879 |
879 |
1334 } |
1334 } |
1335 } |
1335 } |
1336 else |
1336 else |
1337 { |
1337 { |
1338 temp = Control(ECtrlIdIndicator); |
1338 temp = Control(ECtrlIdIndicator); |
1339 if ( !temp ) |
|
1340 { |
|
1341 return; |
|
1342 } |
|
1343 |
1339 |
1344 CFepUiBaseCtrl* indi = Control(ECtrlIdSpellIndicator); |
1340 CFepUiBaseCtrl* indi = Control(ECtrlIdSpellIndicator); |
1345 if ( !indi ) |
1341 if( indi ) |
1346 { |
1342 { |
1347 return; |
1343 indi->Hide(ETrue); |
1348 } |
1344 } |
1349 indi->Hide(ETrue); |
1345 |
1350 SetIndicatorImageL(temp, |
1346 if( temp ) |
1351 indicatorData.iIndicatorImgID, |
1347 { |
1352 indicatorData.iIndicatorMaskID, |
1348 SetIndicatorImageL(temp, |
1353 indicatorData.iIndicatorTextImgID, |
1349 indicatorData.iIndicatorImgID, |
1354 indicatorData.iIndicatorTextMaskID); |
1350 indicatorData.iIndicatorMaskID, |
1355 if( temp->Hiden() ) |
1351 indicatorData.iIndicatorTextImgID, |
1356 { |
1352 indicatorData.iIndicatorTextMaskID); |
1357 temp->Hide( EFalse ); |
1353 if( temp->Hiden() ) |
1358 } |
1354 { |
1359 else |
1355 temp->Hide( EFalse ); |
1360 { |
1356 } |
1361 temp->ClearRect( temp->Rect() ); |
1357 else |
1362 temp->Draw(); |
1358 { |
1363 temp->UpdateArea( temp->Rect() ); |
1359 temp->ClearRect( temp->Rect() ); |
1364 iLayoutOwner->RootControl()->ReDrawRect( temp->Rect() ); |
1360 temp->Draw(); |
1365 } |
1361 temp->UpdateArea( temp->Rect() ); |
|
1362 iLayoutOwner->RootControl()->ReDrawRect( temp->Rect() ); |
|
1363 } |
|
1364 } |
1366 } |
1365 } |
1367 } |
1366 } |
1368 } |
1367 } |
1369 |
1368 |
1370 void CGenericItutWindow::CalIndicatorRect(const TRect& aBoundRect, |
1369 void CGenericItutWindow::CalIndicatorRect(const TRect& aBoundRect, |
1620 iMatchSelection->SetTextProperty( |
1619 iMatchSelection->SetTextProperty( |
1621 TItutDataConverter::AnyToFont(iDataMgr->RequestData(EIcfFont)), GetMatchListTextColor()); |
1620 TItutDataConverter::AnyToFont(iDataMgr->RequestData(EIcfFont)), GetMatchListTextColor()); |
1622 |
1621 |
1623 iBackgroundCtrl->SizeChanged( |
1622 iBackgroundCtrl->SizeChanged( |
1624 TItutDataConverter::AnyToRect(iDataMgr->RequestData( ELayoutRect ) ) ); |
1623 TItutDataConverter::AnyToRect(iDataMgr->RequestData( ELayoutRect ) ) ); |
1625 iBackgroundCtrl->GetSubBgItem(0).iRect = TItutDataConverter::AnyToRect( |
|
1626 iDataMgr->RequestData(ESpellQueryPaneRect) ); |
|
1627 |
1624 |
1628 TRAP_IGNORE(ApplyVariantLafDataL(ETrue); |
1625 TRAP_IGNORE(ApplyVariantLafDataL(ETrue); |
1629 iLayoutOwner->HandleCommand(EItutExtCmdSizeChanged, NULL)); |
1626 iLayoutOwner->HandleCommand(EItutExtCmdSizeChanged, NULL)); |
1630 |
1627 |
1631 |
1628 |
1748 } |
1745 } |
1749 |
1746 |
1750 TBool bSizeChanged = EFalse; |
1747 TBool bSizeChanged = EFalse; |
1751 ControlSizeChanged(ECtrlIdArrowLeft, EArrowLeftRect, ELeftInnerRect, ETrue); |
1748 ControlSizeChanged(ECtrlIdArrowLeft, EArrowLeftRect, ELeftInnerRect, ETrue); |
1752 ControlSizeChanged(ECtrlIdArrowRight, EArrowRightRect, ERightInnerRect, ETrue); |
1749 ControlSizeChanged(ECtrlIdArrowRight, EArrowRightRect, ERightInnerRect, ETrue); |
1753 if( iDataMgr->IsChinese()) |
1750 if( iDataMgr->IsChinese() || iDataMgr->IsKorean() ) |
1754 { |
1751 { |
1755 ControlSizeChanged(ECtrlIdSwitch, ESwitchRect, ESwitchInnerRect, ETrue); |
1752 ControlSizeChanged(ECtrlIdSwitch, ESwitchRect, ESwitchInnerRect, ETrue); |
1756 } |
1753 } |
1757 bSizeChanged = ControlSizeChanged(ECtrlIdBackspace, EBackspaceRect, EBackspaceInnerRect, ETrue); |
1754 bSizeChanged = ControlSizeChanged(ECtrlIdBackspace, EBackspaceRect, EBackspaceInnerRect, ETrue); |
1758 ControlSizeChanged(ECtrlIdOptions, EOptionsRect, EOptionInnerRect, ETrue); |
1755 ControlSizeChanged(ECtrlIdOptions, EOptionsRect, EOptionInnerRect, ETrue); |
1857 // when skin change all control with skin image should be reload. |
1854 // when skin change all control with skin image should be reload. |
1858 TRAP_IGNORE(ConstructKeyImageFromResourceL( R_ITUT_KEYPAD_BITMAP )); |
1855 TRAP_IGNORE(ConstructKeyImageFromResourceL( R_ITUT_KEYPAD_BITMAP )); |
1859 |
1856 |
1860 // reconstruct shift icon when skin changed |
1857 // reconstruct shift icon when skin changed |
1861 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ReConstructL()); |
1858 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ReConstructL()); |
1862 if ( IsPortraitWest()) |
1859 TRAP_IGNORE(iStandardItutKp->StarIcon()->ReConstructL()); |
|
1860 if ( iDataMgr->IsPortraitWest()) |
1863 { |
1861 { |
1864 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ResizeL(iDataMgr->iShiftIconRectForPrtWest.Size())); |
1862 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ResizeL(iDataMgr->iShiftIconRectForPrtWest.Size())); |
|
1863 TRAP_IGNORE(iStandardItutKp->StarIcon()->ResizeL(iDataMgr->iStarIconRectForPrtWest.Size())); |
1865 } |
1864 } |
1866 else |
1865 else |
1867 { |
1866 { |
1868 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ResizeL(iDataMgr->iShiftIconRect.Size())); |
1867 TRAP_IGNORE(iStandardItutKp->ShiftIcon()->ResizeL(iDataMgr->iShiftIconRect.Size())); |
1869 } |
1868 } |
2201 } |
2196 } |
2202 void CGenericItutWindow::SetIndiWithTextFlag( TBool aFlag ) |
2197 void CGenericItutWindow::SetIndiWithTextFlag( TBool aFlag ) |
2203 { |
2198 { |
2204 iIndiWithText = aFlag; |
2199 iIndiWithText = aFlag; |
2205 } |
2200 } |
|
2201 void CGenericItutWindow::CreateKoreanSpecificCtrlsIfNeededL() |
|
2202 { |
|
2203 if( !Control(ECtrlIdIndicator) ) |
|
2204 { |
|
2205 CreateButtonL(ECommonButton, ECtrlIdIndicator, KUnavailableID, |
|
2206 KUnavailableID,KUnavailableID); |
|
2207 // create input case type menu |
|
2208 AddEditorMenuL(); |
|
2209 } |
|
2210 |
|
2211 if( !Control(ECtrlIdSwitch)) |
|
2212 { |
|
2213 CreateButtonL(ECommonButton, ECtrlIdSwitch, ESwitchRect, |
|
2214 ESwitchInnerRect, R_FINGER_LAYOUT_SWITCH); |
|
2215 |
|
2216 } |
|
2217 |
|
2218 |
|
2219 if( !iInputModeSwitch ) |
|
2220 { |
|
2221 // create switch input mode menu |
|
2222 iInputModeSwitch = CPeninputLayoutInputmodelChoice::NewL( |
|
2223 iLayoutOwner, |
|
2224 ECtrlIdInputSwitch, |
|
2225 EPluginInputModeItut ); |
|
2226 iInputModeSwitch->SetListSkinID( KAknsIIDQsnFrList, KAknsIIDQsnFrPopupSub ); |
|
2227 AddControlL( iInputModeSwitch ); |
|
2228 } |
|
2229 } |
2206 // End Of File |
2230 // End Of File |