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

int SunPinyinLookupTable::append_candidate ( const ICandidateList &  cl,
int  index,
int  begin 
) [private]

set the candidate in lookup table

cl the candidate list including all available candidates in current page
index the candidate's index in page
begin the begin position in candidates
the length of candidate string

Definition at line 109 of file sunpinyin_lookup_table.cpp.

References decorate_candidate(), and get_current_page_start().

Referenced by update_candidates().

    const TWCHAR* cand = 0;
    int len = 0;
    cand = cl.candiString(item);
    if (!cand)
        return len;
    len = cl.candiSize(item);
    ibus::Text text(ibus_text_new_from_ucs4(cand));
    decorate_candidate(text, cl.candiType(item));
    int index = get_current_page_start() + item;
    ibus_lookup_table_set_candidate(*this, index, text);
    return len;

Generated by  Doxygen 1.6.0   Back to index