Logo Search packages:      
Sourcecode: ibus-sunpinyin version File versions  Download package

int SunPinyinLookupTable::update_candidates ( const ICandidateList &  cl )

update lookup table with given candidate list

clcandidate list
the number of candidates updated

Definition at line 49 of file sunpinyin_lookup_table.cpp.

References append_candidate().

    const int size = cl.size();
    if (size <= 0)
        return size;
    const int total = cl.total();    
    // expand the array in lookup_table
    // we will fill the missing items in when we have them
    ibus_lookup_table_set_page_size(*this, size);
    g_array_set_size((*this)->candidates, total);

    for (int i = 0, begin = 0; i < size; ++i) {
        const int len = append_candidate(cl, i, begin);
        if (len)
            begin += len;
    return size;
    //ibus_lookup_table_set_cursor_pos (m_lookup_table, index);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index