#include <scim_lookup_table.h>
Inherits scim::LookupTable.
Public Member Functions | |
CommonLookupTable (int page_size=10) | |
CommonLookupTable (int page_size, const std::vector< WideString > &labels) | |
Constructor. | |
~CommonLookupTable () | |
virtual WideString | get_candidate (int index) const |
Get a candidate. | |
virtual AttributeList | get_attributes (int index) const |
Get the attributes of a candidate. | |
virtual uint32 | number_of_candidates () const |
Return the number of candidates in this table. | |
virtual void | clear () |
Clear the table. | |
bool | append_candidate (const WideString &cand, const AttributeList &attrs=AttributeList()) |
Append a candidate string into the table. | |
bool | append_candidate (ucs4_t cand, const AttributeList &attrs=AttributeList()) |
Append a candidate char into the table. |
This class implements the LookupTable interface in a common way.
scim::CommonLookupTable::CommonLookupTable | ( | int | page_size = 10 |
) |
scim::CommonLookupTable::CommonLookupTable | ( | int | page_size, | |
const std::vector< WideString > & | labels | |||
) |
Constructor.
page_size | - the maximum page size, can be set by set_page_size () later. | |
labels | - the strings to label the candidates in one page. |
scim::CommonLookupTable::~CommonLookupTable | ( | ) |
virtual WideString scim::CommonLookupTable::get_candidate | ( | int | index | ) | const [virtual] |
Get a candidate.
index | - the candidate index in the lookup table. |
Implements scim::LookupTable.
virtual AttributeList scim::CommonLookupTable::get_attributes | ( | int | index | ) | const [virtual] |
Get the attributes of a candidate.
index | - the index in the lookup table. |
Implements scim::LookupTable.
virtual uint32 scim::CommonLookupTable::number_of_candidates | ( | ) | const [virtual] |
Return the number of candidates in this table.
Implements scim::LookupTable.
virtual void scim::CommonLookupTable::clear | ( | ) | [virtual] |
bool scim::CommonLookupTable::append_candidate | ( | const WideString & | cand, | |
const AttributeList & | attrs = AttributeList() | |||
) |
Append a candidate string into the table.
cand | - a candidate string to be added into the table. | |
attrs | - the attributes to control the display effect of this entry. It can be omitted if no attribute. |
bool scim::CommonLookupTable::append_candidate | ( | ucs4_t | cand, | |
const AttributeList & | attrs = AttributeList() | |||
) |
Append a candidate char into the table.
cand | - a candidate char to be added into the table. | |
attrs | - the attributes to control the display effect of this entry. It can be omitted if no attribute. |