void WZLookupTable::regenerateCandidateLabels() { candidate_labels.clear(); for (int i = 0; i <= 9; ++i) { wchar_t* num_str = new wchar_t[2]; num_str [0] = '1' + i; if (i==9) num_str [0] = '0'; num_str[1] = 0x0000; candidate_labels.push_back (num_str); } set_candidate_labels (candidate_labels); }
//implementation of NativeLookupTable NativeLookupTable::NativeLookupTable (int page_size) : LookupTable (page_size) { std::vector <WideString> labels; char buf [2] = { 0, 0 }; for (int i = 0; i < 9; ++i) { buf [0] = '1' + i; labels.push_back (utf8_mbstowcs (buf)); } buf [0] = '0'; labels.push_back (utf8_mbstowcs (buf)); set_candidate_labels (labels); }
void WZLookupTable::nullifyCandidateLabels() { candidate_labels.clear(); candidate_labels.push_back(L""); set_candidate_labels (candidate_labels); }