|
scim 1.4.18
|
A common lookup table class. More...
#include <scim_lookup_table.h>
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. | |
| Public Member Functions inherited from scim::LookupTable | |
| LookupTable (int page_size=10) | |
| Constructor. | |
| virtual | ~LookupTable () |
| Virtual destructor. | |
| void | set_candidate_labels (const std::vector< WideString > &labels) |
| Set the strings to label the candidates in one page. | |
| WideString | get_candidate_label (int page_index) const |
| Get the label string of a candidate in a page. | |
| void | set_page_size (int page_size) |
| Set the maximum page size. | |
| int | get_page_size () const |
| Get the maximum page size. | |
| int | get_current_page_size () const |
| Get current page size,. | |
| int | get_current_page_start () const |
| Get the start index of current page. | |
| bool | is_cursor_visible () const |
| Check if the cursor is visible. | |
| bool | is_page_size_fixed () const |
| Check if the page size is fixed, aka. couldn't reduced by FrontEnd. | |
| int | get_cursor_pos () const |
| Get current cursor position. | |
| int | get_cursor_pos_in_current_page () const |
| Get the cursor position in current page. | |
| bool | page_up () |
| Flip to the previous page. | |
| bool | page_down () |
| Flip to the next page. | |
| bool | cursor_up () |
| Move cursor position to the previous entry. | |
| bool | cursor_down () |
| Move cursor position to the next entry. | |
| void | show_cursor (bool show=true) |
| Set the cursor visibility. | |
| void | fix_page_size (bool fixed=true) |
| Set the page size to be fixed, aka. prevent from being changed by FrontEnd. | |
| void | set_cursor_pos (int pos) |
| Set the cursor position. | |
| void | set_cursor_pos_in_current_page (int pos) |
| Set the cursor position in current page. | |
| WideString | get_candidate_in_current_page (int page_index) const |
| Get a candidate in current page. | |
| AttributeList | get_attributes_in_current_page (int page_index) const |
| Get the display attributes of a candidate in current page. | |
A common lookup table class.
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 |
Get a candidate.
| index | - the candidate index in the lookup table. |
Implements scim::LookupTable.
|
virtual |
Get the attributes of a candidate.
| index | - the index in the lookup table. |
Implements scim::LookupTable.
|
virtual |
Return the number of candidates in this table.
Implements scim::LookupTable.
|
virtual |
Clear the table.
Implements scim::LookupTable.
| 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. |