54 #include "peninputrangebarinfo.h" |
54 #include "peninputrangebarinfo.h" |
55 #include "peninputsplitqwertylafdatamgr.h" |
55 #include "peninputsplitqwertylafdatamgr.h" |
56 #include "peninputsplitqwertylangmeritpair.h" |
56 #include "peninputsplitqwertylangmeritpair.h" |
57 #include "peninputsplitqwertylayout.h" |
57 #include "peninputsplitqwertylayout.h" |
58 |
58 |
|
59 #include <peninputaknvkbpreviewbubblerenderer.h> |
|
60 |
59 // Constants |
61 // Constants |
60 const TInt KPeninputVkbWndInvalidIndex = -1; |
62 const TInt KPeninputVkbWndInvalidIndex = -1; |
61 const TInt KInvalidImg = -1 ; |
63 const TInt KInvalidImg = -1 ; |
62 |
64 |
63 _LIT( KVkbWindowResourceFile, "z:\\resource\\plugins\\peninputssqwin.rsc" ); |
65 _LIT( KVkbWindowResourceFile, "z:\\resource\\plugins\\peninputssqwin.rsc" ); |
225 iVkbCtrl->SetIrregularKeyBoard( EFalse ); |
227 iVkbCtrl->SetIrregularKeyBoard( EFalse ); |
226 iVkbLayout->SetNonIrregularResourceId( R_AKN_FEP_VKB_NONIRREGULAR_BITMAP ); |
228 iVkbLayout->SetNonIrregularResourceId( R_AKN_FEP_VKB_NONIRREGULAR_BITMAP ); |
227 iVkbLayout->ConstructFromNonIrregularResourceL(); |
229 iVkbLayout->ConstructFromNonIrregularResourceL(); |
228 |
230 |
229 //todo split-view FSQ, bubble support |
231 //todo split-view FSQ, bubble support |
230 /* |
232 CPeninputAknVkbPreviewBubbleRenderer* renderer = CPeninputAknVkbPreviewBubbleRenderer::NewL(); |
231 iVkbCtrl->ShowBubble(ETrue); |
233 iVkbCtrl->SetPreviewBubbleRenderer( renderer ); |
232 iVkbCtrl->SetGowithPointerDown(ETrue); |
234 iVkbCtrl->ShowBubble( ETrue ); |
233 iVkbCtrl->SetBubbleBitmapParam(NULL,NULL,KAknsIIDQsnFrInputCharPreview); |
235 iVkbCtrl->SetGowithPointerDown( ETrue ); |
234 */ |
236 iVkbCtrl->SetBubbleBitmapParam( NULL, NULL, KAknsIIDQsnFrInputCharPreview ); |
|
237 iVkbCtrl->SetBubbleSize( TSize(80,80) ); //todo preview-bubble |
235 |
238 |
236 //set key to be 9 piece graphics |
239 //set key to be 9 piece graphics |
237 iVkbCtrl->SetKeySkinId( EKeyBmpNormal, KAknsIIDQsnFrKeypadButtonFrNormal ); |
240 iVkbCtrl->SetKeySkinId( EKeyBmpNormal, KAknsIIDQsnFrKeypadButtonFrNormal ); |
238 iVkbCtrl->SetKeySkinId( EKeyBmpHighlight, KAknsIIDQsnFrKeypadButtonFrPressed ); |
241 iVkbCtrl->SetKeySkinId( EKeyBmpHighlight, KAknsIIDQsnFrKeypadButtonFrPressed ); |
239 iVkbCtrl->SetKeySkinId( EKeyBmpDim, KAknsIIDQsnFrKeypadButtonFrInactive ); |
242 iVkbCtrl->SetKeySkinId( EKeyBmpDim, KAknsIIDQsnFrKeypadButtonFrInactive ); |
975 |
978 |
976 // --------------------------------------------------------------------------- |
979 // --------------------------------------------------------------------------- |
977 // Load range labels for range list |
980 // Load range labels for range list |
978 // --------------------------------------------------------------------------- |
981 // --------------------------------------------------------------------------- |
979 // |
982 // |
980 void CPeninputSplitQwertyWindow::ConstructRangeLabelListL( TInt aLangId ) |
983 void CPeninputSplitQwertyWindow::ConstructRangeLabelListL( TInt /*aLangId*/ ) |
981 { |
984 { |
982 iRangeLabels.iLabelNativeChar.Zero(); |
985 iRangeLabels.iLabelNativeChar.Zero(); |
983 iRangeLabels.iLabelNativeNumber.Zero(); |
986 iRangeLabels.iLabelNativeNumber.Zero(); |
984 iRangeLabels.iLabelLatinChar.Zero(); |
987 iRangeLabels.iLabelLatinChar.Zero(); |
985 iRangeLabels.iLabelLatinNumber.Zero(); |
988 iRangeLabels.iLabelLatinNumber.Zero(); |
986 iRangeLabels.iLabelSymbol.Zero(); |
989 iRangeLabels.iLabelSymbol.Zero(); |
987 iRangeLabels.iLabelAccent.Zero(); |
990 iRangeLabels.iLabelAccent.Zero(); |
988 |
991 |
989 TInt resid = -1; |
992 TInt resid = R_PENINPUT_LAYOUT_VKB_RANGES; |
990 switch ( aLangId ) |
|
991 { |
|
992 case 16: //Cyrillic |
|
993 case 42: |
|
994 case 93: |
|
995 { |
|
996 resid = R_PENINPUT_LAYOUT_VKB_RANGES_CYRILLIC; |
|
997 } |
|
998 break; |
|
999 |
|
1000 case 54: //Greek |
|
1001 case 55: |
|
1002 { |
|
1003 resid = R_PENINPUT_LAYOUT_VKB_RANGES_GREEK; |
|
1004 } |
|
1005 break; |
|
1006 case 57: //Hebrew |
|
1007 { |
|
1008 resid = R_PENINPUT_LAYOUT_VKB_RANGES_HEBREW; |
|
1009 } |
|
1010 break; |
|
1011 case 37: //Arabic |
|
1012 { |
|
1013 resid = R_PENINPUT_LAYOUT_VKB_RANGES_ARABIC; |
|
1014 } |
|
1015 break; |
|
1016 case 50://Farsi |
|
1017 { |
|
1018 resid = R_PENINPUT_LAYOUT_VKB_RANGES_FARSI; |
|
1019 } |
|
1020 break; |
|
1021 case 94: //Urdu |
|
1022 { |
|
1023 resid = R_PENINPUT_LAYOUT_VKB_RANGES_URDU; |
|
1024 } |
|
1025 break; |
|
1026 case 33: //Thai |
|
1027 { |
|
1028 resid = R_PENINPUT_LAYOUT_VKB_RANGES_THAI; |
|
1029 } |
|
1030 break; |
|
1031 case 29: //chinese |
|
1032 case 30: |
|
1033 case 31: |
|
1034 break; |
|
1035 case 58: //Devanagiri |
|
1036 case 72: |
|
1037 { |
|
1038 resid = R_PENINPUT_LAYOUT_VKB_RANGES_DEVANAGIRI; |
|
1039 } |
|
1040 break; |
|
1041 default: //Latin |
|
1042 { |
|
1043 //1, 2, 3, 4, 5, 6, 7, 8, 9, 10, |
|
1044 //11, 12, 13, 14, 15, 17, 18, 20, 21, 22, |
|
1045 //23, 24, 25, 26, 27, 28, 39, 44, 45, 46, |
|
1046 //47, 48, 49, 51, 59, 67, 68, 70, 76, 78, |
|
1047 //79, 82, 83, 85, 91, 96, 102, 103, 401, 402 |
|
1048 resid = R_PENINPUT_LAYOUT_VKB_RANGES_LATIN; |
|
1049 } |
|
1050 } |
|
1051 |
993 |
1052 TResourceReader reader; |
994 TResourceReader reader; |
1053 CCoeEnv::Static()->CreateResourceReaderLC( reader, resid ); |
995 CCoeEnv::Static()->CreateResourceReaderLC( reader, resid ); |
1054 TPtrC ptr1 = reader.ReadTPtrC(); |
996 TPtrC ptr1 = reader.ReadTPtrC(); |
1055 TPtrC ptr2 = reader.ReadTPtrC(); |
997 TPtrC ptr2 = reader.ReadTPtrC(); |
1072 // Show or hide preview bubble |
1014 // Show or hide preview bubble |
1073 // --------------------------------------------------------------------------- |
1015 // --------------------------------------------------------------------------- |
1074 // |
1016 // |
1075 void CPeninputSplitQwertyWindow::ShowBubble( TInt aShow ) |
1017 void CPeninputSplitQwertyWindow::ShowBubble( TInt aShow ) |
1076 { |
1018 { |
1077 iVkbCtrl->ShowBubble( EFalse ); |
1019 iVkbCtrl->ShowBubble( aShow > 0 ? ETrue : EFalse ); |
1078 } |
1020 } |
1079 |
1021 |
1080 // --------------------------------------------------------------------------- |
1022 // --------------------------------------------------------------------------- |
1081 // Update state of range button |
1023 // Update state of range button |
1082 // --------------------------------------------------------------------------- |
1024 // --------------------------------------------------------------------------- |
1083 // |
1025 // |
1084 void CPeninputSplitQwertyWindow::UpdateRangeCtrlsL() |
1026 void CPeninputSplitQwertyWindow::UpdateRangeCtrlsL() |
1085 { |
1027 { |
1086 TInt currentRange = IntContext( EPeninputDataTypeCurrentRange ); |
1028 RArray<CFepLayoutChoiceList::SItem> items; |
1087 |
1029 PrepareRangeListItems( items ); |
1088 TInt resid = ConfigInfo()->RangebarResId(); |
1030 TInt count = items.Count(); |
1089 |
1031 items.Close(); |
1090 TResourceReader reader; |
1032 |
1091 |
1033 TInt languageId = IntContext( EPeninputDataTypeInputLanguage ); |
1092 CCoeEnv::Static()->CreateResourceReaderLC( reader, resid ); |
1034 TInt range = IntContext( EPeninputDataTypeCurrentRange ); |
1093 |
1035 |
1094 TInt count = reader.ReadInt16(); |
1036 TInt resId = -1; |
1095 for ( TInt i = 0; i < count; i++ ) |
1037 TInt aplhaRangeResId = -1; |
1096 { |
1038 TInt numberRangeResId = -1; |
1097 const TInt16 rangeId = reader.ReadInt16(); |
1039 GetRangeIconResource( languageId, aplhaRangeResId, numberRangeResId ); |
1098 const TInt16 rangeType = reader.ReadInt16(); |
1040 |
1099 const TInt16 ctrlId = reader.ReadInt16(); |
1041 if ( range == ERangeEnglish || range == ERangeNative ) |
1100 const TInt16 ctrlType = reader.ReadInt16(); |
1042 { |
1101 const TInt32 ctrlResId = reader.ReadInt32(); |
1043 resId = aplhaRangeResId; |
1102 const TInt actionStyle = reader.ReadInt16(); |
1044 } |
1103 TBool hide = reader.ReadInt16(); |
1045 else |
1104 TInt posidx = reader.ReadInt16(); |
1046 { |
1105 |
1047 resId = numberRangeResId; |
1106 if ( currentRange == rangeId ) |
1048 } |
1107 { |
1049 |
1108 iRangeButton->SetResourceId( ctrlResId ); |
1050 iRangeButton->SetResourceId( resId ); |
1109 iRangeButton->ConstructFromResourceL(); |
1051 iRangeButton->ConstructFromResourceL(); |
1110 break; |
1052 iRangeButton->SetDimmed( count < 1 ); |
1111 } |
|
1112 } |
|
1113 |
|
1114 // Pop and destroy reader |
|
1115 CleanupStack::PopAndDestroy( 1 ); |
|
1116 |
|
1117 } |
1053 } |
1118 |
1054 |
1119 // --------------------------------------------------------------------------- |
1055 // --------------------------------------------------------------------------- |
1120 // Update layout position and size |
1056 // Update layout position and size |
1121 // --------------------------------------------------------------------------- |
1057 // --------------------------------------------------------------------------- |
1517 // Show range list |
1453 // Show range list |
1518 // --------------------------------------------------------------------------- |
1454 // --------------------------------------------------------------------------- |
1519 // |
1455 // |
1520 void CPeninputSplitQwertyWindow::PopupRangeListL() |
1456 void CPeninputSplitQwertyWindow::PopupRangeListL() |
1521 { |
1457 { |
1522 TInt currentRange = IntContext( EPeninputDataTypeCurrentRange ); |
1458 if ( !iPopupInited ) |
1523 TInt permittedRange = IntContext( EPeninputDataTypePermittedRange ); |
1459 { |
1524 TInt currentAccent = IntContext( EPeninputDataTypeCurrentAccent ); |
1460 TRAP_IGNORE( DoIdleConstructL() ); |
1525 |
1461 } |
1526 CFepUiBaseCtrl* btn = Control( EPeninutWindowCtrlIdRangeBtn ); |
1462 |
1527 if( !btn ) |
1463 |
|
1464 iPopupWnd->ClearItemsL(); |
|
1465 RArray<CFepLayoutChoiceList::SItem> items; |
|
1466 PrepareRangeListItems( items ); |
|
1467 TInt count = items.Count(); |
|
1468 for ( TInt i = 0; i < count; i++ ) |
|
1469 { |
|
1470 iPopupWnd->AddItemL( items[i] ); |
|
1471 } |
|
1472 items.Close(); |
|
1473 |
|
1474 if ( iPopupWnd->ItemsCount() < 1 ) |
1528 { |
1475 { |
1529 return; |
1476 return; |
1530 } |
1477 } |
1531 |
1478 |
1532 if ( !iPopupInited ) |
1479 if ( iPopupWnd->ItemsCount() < 2 ) |
1533 { |
1480 { |
1534 TRAP_IGNORE( DoIdleConstructL() ); |
1481 const CFepLayoutChoiceList::SItem* item = iPopupWnd->ItemByIndex( 0 ); |
1535 } |
1482 CFepLayoutChoiceList::SEvent event; |
1536 |
1483 event.iIndex = 0; |
1537 iPopupWnd->ClearItemsL(); |
1484 event.iCommand = item->iCommand; |
1538 |
1485 TPtrC ptr; |
1539 CPeninputRangeBarInfo* rbinfo= ConfigInfo()->RangeBarInfo(); |
1486 ptr.Set(reinterpret_cast<TText*>(&event), sizeof(event)); |
1540 CPeninputRangeInfo* rgninfo = NULL; |
1487 HandleRangeListSelectedL( iPopupWnd, ptr ); |
1541 |
1488 return; |
1542 //add accent items |
1489 } |
1543 if ( permittedRange & ERangeAccent ) |
1490 |
1544 { |
1491 CFepUiBaseCtrl* btn = Control( EPeninutWindowCtrlIdRangeBtn ); |
1545 rgninfo = rbinfo->FindRange( ERangeAccent ); |
1492 iPopupWnd->SetListColumnNumWithLafL( iPopupWnd->ItemsCount() ); |
1546 if ( rgninfo ) |
|
1547 { |
|
1548 for ( TInt i = 0; i < iAccentCmdList.Count(); i++ ) |
|
1549 { |
|
1550 if( currentRange != ERangeAccent || currentAccent != i ) |
|
1551 { |
|
1552 iPopupWnd->AddItemL( iAccentCmdList[i] ); |
|
1553 } |
|
1554 } |
|
1555 } |
|
1556 } |
|
1557 |
|
1558 //add range items |
|
1559 |
|
1560 CFepLayoutChoiceList::SItem item; |
|
1561 |
|
1562 if ( permittedRange & ERangeNative ) |
|
1563 { |
|
1564 rgninfo = rbinfo->FindRange( ERangeNative ); |
|
1565 if ( rgninfo && currentRange != ERangeNative ) |
|
1566 { |
|
1567 item.iCommand = EPeninputVkbLayoutNativeChar; |
|
1568 item.iText.Copy( iRangeLabels.iLabelNativeChar ); |
|
1569 iPopupWnd->AddItemL( item ); |
|
1570 } |
|
1571 } |
|
1572 |
|
1573 if ( permittedRange & ERangeNativeNumber ) |
|
1574 { |
|
1575 rgninfo = rbinfo->FindRange( ERangeNativeNumber ); |
|
1576 if ( rgninfo && currentRange != ERangeNativeNumber ) |
|
1577 { |
|
1578 item.iCommand = EPeninputVkbLayoutNativeNumber; |
|
1579 item.iText.Copy( iRangeLabels.iLabelNativeNumber ); |
|
1580 iPopupWnd->AddItemL( item ); |
|
1581 } |
|
1582 } |
|
1583 |
|
1584 if ( permittedRange & ERangeEnglish ) |
|
1585 { |
|
1586 rgninfo = rbinfo->FindRange( ERangeEnglish ); |
|
1587 if ( rgninfo && currentRange != ERangeEnglish ) |
|
1588 { |
|
1589 item.iCommand = EPeninputVkbLayoutLatinChar; |
|
1590 item.iText.Copy( iRangeLabels.iLabelLatinChar ); |
|
1591 iPopupWnd->AddItemL( item ); |
|
1592 } |
|
1593 } |
|
1594 |
|
1595 if ( permittedRange & ERangeNumber ) |
|
1596 { |
|
1597 rgninfo = rbinfo->FindRange( ERangeNumber ); |
|
1598 if ( rgninfo && currentRange != ERangeNumber ) |
|
1599 { |
|
1600 item.iCommand = EPeninputVkbLayoutLatinNumber; |
|
1601 item.iText.Copy( iRangeLabels.iLabelLatinNumber ); |
|
1602 iPopupWnd->AddItemL( item ); |
|
1603 } |
|
1604 } |
|
1605 |
|
1606 /* |
|
1607 if ( permittedRange & ERangeSymbol ) |
|
1608 { |
|
1609 rgninfo = rbinfo->FindRange( ERangeSymbol ); |
|
1610 if ( rgninfo && currentRange != ERangeSymbol ) |
|
1611 { |
|
1612 item.iCommand = EPeninputVkbLayoutSymbol; |
|
1613 item.iText.Copy( _L("#*") ); |
|
1614 iPopupWnd->AddItemL( item ); |
|
1615 } |
|
1616 } |
|
1617 */ |
|
1618 |
|
1619 iPopupWnd->SetListColumnNumWithLafL( iPopupWnd->ItemsCount() ); |
|
1620 |
|
1621 iPopupWnd->SetCurrentFocusedIndex( - 1 ); //no active item |
1493 iPopupWnd->SetCurrentFocusedIndex( - 1 ); //no active item |
1622 iPopupWnd->Display( btn->Rect() ); |
1494 iPopupWnd->Display( btn->Rect() ); |
1623 iUiStateMgr->SetCurrentUiState( EPeninputVkbUiStatePopup ); |
1495 iUiStateMgr->SetCurrentUiState( EPeninputVkbUiStatePopup ); |
1624 } |
1496 } |
1625 |
1497 |
1832 ); |
1698 ); |
1833 } |
1699 } |
1834 } |
1700 } |
1835 |
1701 |
1836 // --------------------------------------------------------------------------- |
1702 // --------------------------------------------------------------------------- |
|
1703 // Utils to get context value |
|
1704 // --------------------------------------------------------------------------- |
|
1705 // |
|
1706 TInt CPeninputSplitQwertyWindow::IntContext( TPeninputDataType aDataIndex ) |
|
1707 { |
|
1708 return CPeninputDataConverter::AnyToInt( |
|
1709 iLayoutContext->RequestData( aDataIndex ) |
|
1710 ); |
|
1711 } |
|
1712 |
|
1713 // --------------------------------------------------------------------------- |
1837 // Handle range list event |
1714 // Handle range list event |
1838 // --------------------------------------------------------------------------- |
1715 // --------------------------------------------------------------------------- |
1839 // |
1716 // |
1840 void CPeninputSplitQwertyWindow::HandleRangeListSelectedL( CFepUiBaseCtrl* /*aCtrl*/, |
1717 void CPeninputSplitQwertyWindow::HandleRangeListSelectedL( CFepUiBaseCtrl* /*aCtrl*/, |
1841 const TDesC& aData ) |
1718 const TDesC& aData ) |
1842 { |
1719 { |
1843 CFepLayoutChoiceList::SEvent* event = (CFepLayoutChoiceList::SEvent*)aData.Ptr(); |
1720 CFepLayoutChoiceList::SEvent* event = (CFepLayoutChoiceList::SEvent*)aData.Ptr(); |
1844 |
1721 |
1845 TInt index = -1; |
1722 TInt index = -1; |
1846 TInt range = ERangeInvalid; |
1723 TInt range = ERangeInvalid; |
1911 ChangeRange( ERangeAccent, EPeninputVkbLayoutAccented1 + 2 * index, ETrue ); |
1788 ChangeRange( ERangeAccent, EPeninputVkbLayoutAccented1 + 2 * index, ETrue ); |
1912 } |
1789 } |
1913 UpdateRangeCtrlsL(); |
1790 UpdateRangeCtrlsL(); |
1914 } |
1791 } |
1915 |
1792 |
|
1793 //todo new rangelist |
|
1794 // --------------------------------------------------------------------------- |
|
1795 // Get resource ids of range button icon |
|
1796 // --------------------------------------------------------------------------- |
|
1797 // |
|
1798 void CPeninputSplitQwertyWindow::GetRangeIconResource( TInt aLangId, |
|
1799 TInt& aAlphaRange, |
|
1800 TInt& aOtherRange ) |
|
1801 { |
|
1802 switch ( aLangId ) |
|
1803 { |
|
1804 case ELangRussian: //Cyrillic |
|
1805 case ELangBulgarian: |
|
1806 case ELangUkrainian: |
|
1807 { |
|
1808 aAlphaRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_CYRILLIC_ALPHA; |
|
1809 aOtherRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_CYRILLIC_NUMERIC; |
|
1810 } |
|
1811 break; |
|
1812 case ELangGreek: //Greek |
|
1813 case ELangCyprusGreek: |
|
1814 { |
|
1815 aAlphaRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_GREEK_ALPHA; |
|
1816 aOtherRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_GREEK_NUMERIC; |
|
1817 } |
|
1818 break; |
|
1819 case ELangHebrew: //Hebrew |
|
1820 { |
|
1821 aAlphaRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_HEBREW_ALPHA; |
|
1822 aOtherRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_HEBREW_NUMERIC; |
|
1823 } |
|
1824 break; |
|
1825 case ELangArabic: //Arabic |
|
1826 case ELangFarsi: //Farsi |
|
1827 case ELangUrdu: //Urdu |
|
1828 { |
|
1829 aAlphaRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_ARABIC_ALPHA; |
|
1830 aOtherRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_ARABIC_NUMERIC; |
|
1831 } |
|
1832 break; |
|
1833 case ELangThai: //Thai |
|
1834 { |
|
1835 aAlphaRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_THAI_ALPHA; |
|
1836 aOtherRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_THAI_NUMERIC; |
|
1837 } |
|
1838 break; |
|
1839 default: //others |
|
1840 { |
|
1841 aAlphaRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_LATIN_ALPHA; |
|
1842 aOtherRange = R_PENINPUT_LAYOUT_VKB_RANGECTRL_LATIN_NUMERIC; |
|
1843 } |
|
1844 } |
|
1845 } |
|
1846 |
|
1847 //todo new rangelist |
|
1848 // --------------------------------------------------------------------------- |
|
1849 // Prepare range list items |
|
1850 // --------------------------------------------------------------------------- |
|
1851 // |
|
1852 void CPeninputSplitQwertyWindow::PrepareRangeListItems( |
|
1853 RArray<CFepLayoutChoiceList::SItem>& aRangeItems ) |
|
1854 { |
|
1855 aRangeItems.Reset(); |
|
1856 TInt currentRange = IntContext( EPeninputDataTypeCurrentRange ); |
|
1857 TInt permittedRange = IntContext( EPeninputDataTypePermittedRange ); |
|
1858 TInt currentAccent = IntContext( EPeninputDataTypeCurrentAccent ); |
|
1859 |
|
1860 CPeninputRangeBarInfo* rbinfo= ConfigInfo()->RangeBarInfo(); |
|
1861 CPeninputRangeInfo* rgninfo = NULL; |
|
1862 |
|
1863 //add accent items |
|
1864 if ( permittedRange & ERangeAccent ) |
|
1865 { |
|
1866 rgninfo = rbinfo->FindRange( ERangeAccent ); |
|
1867 if ( rgninfo ) |
|
1868 { |
|
1869 for ( TInt i = 0; i < iAccentCmdList.Count(); i++ ) |
|
1870 { |
|
1871 if( currentRange != ERangeAccent || currentAccent != i ) |
|
1872 { |
|
1873 aRangeItems.Append( iAccentCmdList[i] ); |
|
1874 } |
|
1875 } |
|
1876 } |
|
1877 } |
|
1878 |
|
1879 //add range items |
|
1880 |
|
1881 CFepLayoutChoiceList::SItem item; |
|
1882 |
|
1883 if ( permittedRange & ERangeNative ) |
|
1884 { |
|
1885 rgninfo = rbinfo->FindRange( ERangeNative ); |
|
1886 if ( rgninfo && currentRange != ERangeNative ) |
|
1887 { |
|
1888 item.iCommand = EPeninputVkbLayoutNativeChar; |
|
1889 item.iText.Copy( iRangeLabels.iLabelNativeChar ); |
|
1890 aRangeItems.Append( item ); |
|
1891 } |
|
1892 } |
|
1893 |
|
1894 if ( permittedRange & ERangeNativeNumber ) |
|
1895 { |
|
1896 rgninfo = rbinfo->FindRange( ERangeNativeNumber ); |
|
1897 if ( rgninfo && currentRange != ERangeNativeNumber ) |
|
1898 { |
|
1899 item.iCommand = EPeninputVkbLayoutNativeNumber; |
|
1900 item.iText.Copy( iRangeLabels.iLabelNativeNumber ); |
|
1901 aRangeItems.Append( item ); |
|
1902 } |
|
1903 } |
|
1904 |
|
1905 if ( permittedRange & ERangeEnglish ) |
|
1906 { |
|
1907 rgninfo = rbinfo->FindRange( ERangeEnglish ); |
|
1908 if ( rgninfo && currentRange != ERangeEnglish ) |
|
1909 { |
|
1910 item.iCommand = EPeninputVkbLayoutLatinChar; |
|
1911 item.iText.Copy( iRangeLabels.iLabelLatinChar ); |
|
1912 aRangeItems.Append( item ); |
|
1913 } |
|
1914 } |
|
1915 |
|
1916 if ( permittedRange & ERangeNumber ) |
|
1917 { |
|
1918 rgninfo = rbinfo->FindRange( ERangeNumber ); |
|
1919 if ( rgninfo && currentRange != ERangeNumber ) |
|
1920 { |
|
1921 item.iCommand = EPeninputVkbLayoutLatinNumber; |
|
1922 item.iText.Copy( iRangeLabels.iLabelLatinNumber ); |
|
1923 aRangeItems.Append( item ); |
|
1924 } |
|
1925 } |
|
1926 } |
1916 // End Of File |
1927 // End Of File |