textinput/peninputarc/gsplugin/gspeninputplugin/src/gspeninputcontainer.cpp
branchRCL_3
changeset 43 ebd48d2de13c
parent 10 6defe5d1bd39
child 44 ecbabf52600f
equal deleted inserted replaced
39:ac7e4d1d9209 43:ebd48d2de13c
   516         iListboxItemArray->SetDynamicTextL(EGSDefaultChineseOnscreenKeyboard, ptrBuffer);
   516         iListboxItemArray->SetDynamicTextL(EGSDefaultChineseOnscreenKeyboard, ptrBuffer);
   517         }
   517         }
   518     CleanupStack::PopAndDestroy(dynamicText);
   518     CleanupStack::PopAndDestroy(dynamicText);
   519 
   519 
   520     // And add to listbox
   520     // And add to listbox
   521     if( iListboxItemArray != NULL )
   521     iListboxItemArray->SetItemVisibilityL(
   522         {
       
   523         iListboxItemArray->SetItemVisibilityL(
       
   524             EGSDefaultChineseOnscreenKeyboard, 
   522             EGSDefaultChineseOnscreenKeyboard, 
   525             bVisible ? CGSItemTextArray::EVisible : CGSItemTextArray::EInvisible);
   523             bVisible ? CGSItemTextArray::EVisible : CGSItemTextArray::EInvisible);
   526         }
       
   527     }
   524     }
   528 
   525 
   529 // ---------------------------------------------------------
   526 // ---------------------------------------------------------
   530 // Create listbox writing speed item 
   527 // Create listbox writing speed item 
   531 // ---------------------------------------------------------
   528 // ---------------------------------------------------------
   761         if( iChineseFindMethodItems != NULL )
   758         if( iChineseFindMethodItems != NULL )
   762             {
   759             {
   763             ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod];
   760             ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod];
   764             }
   761             }
   765 
   762 
   766         if ( !ptrBuffer.Length() && iChineseFindMethodItems != NULL && 
   763         if (!ptrBuffer.Length() && iChineseFindMethodItems->Count() > 0)
   767                                     iChineseFindMethodItems->Count() > 0 )
       
   768             {
   764             {
   769             ptrBuffer = (*iChineseFindMethodItems)[0];
   765             ptrBuffer = (*iChineseFindMethodItems)[0];
   770             }
   766             }
   771 
   767 
   772         // Finally, set the dynamic text
   768         // Finally, set the dynamic text
  1123 // ---------------------------------------------------------
  1119 // ---------------------------------------------------------
  1124 //
  1120 //
  1125 void CGSPenInputContainer::ShowGuideLinePageL()
  1121 void CGSPenInputContainer::ShowGuideLinePageL()
  1126     {
  1122     {
  1127     TInt currentItem = iModel->GuideLine();
  1123     TInt currentItem = iModel->GuideLine();
  1128     currentItem = ( 0 == currentItem ) ? 1 : 0;
  1124     
  1129     
  1125     if (currentItem == 1)
  1130     iModel->SetGuideLine(currentItem);
  1126         {
  1131     UpdateListBoxL(EGSInputpenIdGuidLine);
  1127         currentItem = 0;
  1132     
  1128         }
  1133 //    if (currentItem == 1)
  1129     else
  1134 //        {
  1130         {
  1135 //        currentItem = 0;
  1131         currentItem = 1;
  1136 //        }
  1132         }
  1137 //    else
  1133 
  1138 //        {
  1134     CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage(
  1139 //        currentItem = 1;
  1135                                       R_GS_GUIDLINE_TEXT_SETTING_PAGE, 
  1140 //        }
  1136                                       currentItem, 
  1141 //
  1137                                       iGuideLineItems);
  1142 //    CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage(
  1138 
  1143 //                                      R_GS_GUIDLINE_TEXT_SETTING_PAGE, 
  1139     CleanupStack::PushL(dlg);
  1144 //                                      currentItem, 
  1140     
  1145 //                                      iGuideLineItems);
  1141     if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
  1146 //
  1142         {
  1147 //    CleanupStack::PushL(dlg);
  1143         if(currentItem == iModel->GuideLine())
  1148 //    
  1144             {
  1149 //    if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
  1145             iModel->SetGuideLine(currentItem == 0? 1:0);
  1150 //        {
  1146             UpdateListBoxL(EGSInputpenIdGuidLine);
  1151 //        if(currentItem == iModel->GuideLine())
  1147             }
  1152 //            {
  1148         }
  1153 //            iModel->SetGuideLine(currentItem == 0? 1:0);
  1149  
  1154 //            UpdateListBoxL(EGSInputpenIdGuidLine);
  1150     CleanupStack::Pop(dlg);  
  1155 //            }
       
  1156 //        }
       
  1157 // 
       
  1158 //    CleanupStack::Pop(dlg);  
       
  1159     }
  1151     }
  1160 
  1152 
  1161 // ---------------------------------------------------------
  1153 // ---------------------------------------------------------
  1162 // Display recognition with dictionary setting page
  1154 // Display recognition with dictionary setting page
  1163 // ---------------------------------------------------------
  1155 // ---------------------------------------------------------
  1164 //
  1156 //
  1165 void CGSPenInputContainer::ShowRecognitionWithDictionaryL()
  1157 void CGSPenInputContainer::ShowRecognitionWithDictionaryL()
  1166     {
  1158     {
  1167     TInt currentItem = iModel->RecognitionWithDictionary();
  1159     TInt currentItem = iModel->RecognitionWithDictionary();
  1168     currentItem = ( 0 == currentItem ) ? 1 : 0;
  1160     
  1169     iModel->SetRecognitionWithDictionary(currentItem);
  1161     if (currentItem == 1)
  1170     UpdateListBoxL(EGSInputpenIdRecognitionWithDictionary);
  1162         {
  1171     
  1163         currentItem = 0;
       
  1164         }
       
  1165     else
       
  1166         {
       
  1167         currentItem = 1;
       
  1168         }
       
  1169 
       
  1170     CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage(
       
  1171             R_GS_RECOGNITIONWITHDICTIONARY_TEXT_SETTING_PAGE,  
       
  1172                                       currentItem, 
       
  1173                                       iRecognitionWithDictionaryItems);
       
  1174 
       
  1175     CleanupStack::PushL(dlg);
       
  1176     
       
  1177     if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
       
  1178         {
       
  1179         if(currentItem == iModel->RecognitionWithDictionary())
       
  1180             {
       
  1181             iModel->SetRecognitionWithDictionary(currentItem == 0? 1:0);
       
  1182             UpdateListBoxL(EGSInputpenIdRecognitionWithDictionary);
       
  1183             }
       
  1184         }
       
  1185  
       
  1186     CleanupStack::Pop(dlg);  
  1172     }
  1187     }
  1173 
  1188 
  1174 // ---------------------------------------------------------
  1189 // ---------------------------------------------------------
  1175 // Display input method for find setting page
  1190 // Display input method for find setting page
  1176 // ---------------------------------------------------------
  1191 // ---------------------------------------------------------
  1177 //
  1192 //
  1178 void CGSPenInputContainer::ShowInputMethodForFindPageL()
  1193 void CGSPenInputContainer::ShowInputMethodForFindPageL()
  1179     {
  1194     {
  1180     TInt currentItem = iModel->InputMethodForFind();
  1195     TInt currentItem = iModel->InputMethodForFind();
  1181     currentItem = ( 0 == currentItem ) ? 1 : 0;
  1196 
  1182 
  1197     CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage(
  1183     iModel->SetInputMethodForFind(currentItem);
  1198                                       R_GS_INPUTMETHODFORFIND_TEXT_SETTING_PAGE, 
  1184     UpdateListBoxL(EGSInputpenIdInputMethodForFind);
  1199                                       currentItem, 
  1185 
  1200                                       iInputMethodForFindItems);
  1186 //    CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage(
  1201 
  1187 //                                      R_GS_INPUTMETHODFORFIND_TEXT_SETTING_PAGE, 
  1202     CleanupStack::PushL(dlg);
  1188 //                                      currentItem, 
  1203     
  1189 //                                      iInputMethodForFindItems);
  1204     if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
  1190 //
  1205         {
  1191 //    CleanupStack::PushL(dlg);
  1206         if(currentItem != iModel->InputMethodForFind())
  1192 //    
  1207             {
  1193 //    if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
  1208             iModel->SetInputMethodForFind(currentItem);
  1194 //        {
  1209             UpdateListBoxL(EGSInputpenIdInputMethodForFind);
  1195 //        if(currentItem != iModel->InputMethodForFind())
  1210             }
  1196 //            {
  1211         }
  1197 //            iModel->SetInputMethodForFind(currentItem);
  1212  
  1198 //            UpdateListBoxL(EGSInputpenIdInputMethodForFind);
  1213     CleanupStack::Pop(dlg);
  1199 //            }
       
  1200 //        }
       
  1201 // 
       
  1202 //    CleanupStack::Pop(dlg);
       
  1203     }
  1214     }
  1204 
  1215 
  1205 // ---------------------------------------------------------
  1216 // ---------------------------------------------------------
  1206 // Display chinese find method setting page
  1217 // Display chinese find method setting page
  1207 // ---------------------------------------------------------
  1218 // ---------------------------------------------------------