IBus.LookupTable¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
candidates |
[ |
r |
Candidate words/phrases. |
cursor_pos |
r |
position index of cursor. |
|
cursor_visible |
r |
whether the cursor is visible. |
|
labels |
[ |
r |
Candidate labels which identify individual candidates in the same page. Default is 1, 2, 3, 4 … |
orientation |
r |
orientation of the table. |
|
page_size |
r |
number of candidate shown per page. |
|
parent |
r |
||
round |
r |
|
Class Details¶
- class IBus.LookupTable(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An IBusLookuptable stores the candidate words or phrases for users to choose from.
Use
IBus.Engine.update_lookup_table
(),IBus.Engine.show_lookup_table
(), andIBus.Engine.hide_lookup_table
() to update, show and hide the lookup table.see_also:
IBus.Engine
- classmethod new(page_size, cursor_pos, cursor_visible, round)¶
- Parameters:
- Returns:
A newly allocated
IBus.LookupTable
.- Return type:
Craetes a new
IBus.LookupTable
.
- append_candidate(text)¶
-
Append a candidate word/phrase to
IBus.LookupTable
, and increase reference.
- append_label(text)¶
-
Append a candidate word/phrase to
IBus.LookupTable
, and increase reference. This function is needed if the input method select candidate with non-numeric keys such as “asdfghjkl;”.
- clear()¶
Clear and remove all candidate from an
IBus.LookupTable
.
- cursor_down()¶
-
Go to next candidate of an
IBus.LookupTable
.It returns
False
if it is already at the last candidate, unless table>-round==:obj:True, where it will go to the first candidate.
- cursor_up()¶
-
Go to previous candidate of an
IBus.LookupTable
.It returns
False
if it is already at the first candidate, unless table>-round==:obj:True, where it will go to the last candidate.
- get_candidate(index)¶
- Parameters:
index (
int
) – Index in the Lookup table.- Returns:
- Return type:
Return
IBus.Text
at the given index. Borrowed reference.
- get_cursor_in_page()¶
- Returns:
The position of cursor in current page.
- Return type:
Gets the cursor position in current page of
IBus.LookupTable
.
- get_cursor_pos()¶
- Returns:
The position of cursor.
- Return type:
Gets the cursor position of
IBus.LookupTable
.
- get_label(index)¶
- Parameters:
index (
int
) – Index in the Lookup table.- Returns:
- Return type:
Return
IBus.Text
at the given index. Borrowed reference.
- get_number_of_candidates()¶
- Returns:
The number of candidates in the table
- Return type:
Return the number of candidate in the table.
- get_orientation()¶
- Returns:
The orientation of the self.
- Return type:
Returns the orientation of the
IBus.LookupTable
.
- get_page_size()¶
- Returns:
Page size, i.e., number of candidate shown per page. dd
- Return type:
Gets the number of candidate shown per page.
- is_cursor_visible()¶
- Returns:
Whether the cursor of self is visible.
- Return type:
Returns whether the cursor of an
IBus.LookupTable
is visible.
- is_round()¶
- Returns:
Whether the self is round.
- Return type:
Returns whether the
IBus.LookupTable
is round.
- page_down()¶
-
Go to next page of an
IBus.LookupTable
.It returns
False
if it is already at the last page, unless table>-round==:obj:True, where it will go to the first page.
- page_up()¶
-
Go to previous page of an
IBus.LookupTable
.It returns
False
if it is already at the first page, unless table>-round==:obj:True, where it will go to the last page.
- set_cursor_pos(cursor_pos)¶
- Parameters:
cursor_pos (
int
) – The position of cursor.
Set the cursor position of
IBus.LookupTable
.
- set_cursor_visible(visible)¶
- Parameters:
visible (
bool
) – Whether to make the cursor of self visible.
Set whether to make the cursor of an
IBus.LookupTable
visible or not.
- set_label(index, text)¶
- Parameters:
Append a candidate word/phrase to
IBus.LookupTable
, and increase reference. This function is needed if the input method select candidate with non-numeric keys such as “asdfghjkl;”.
- set_page_size(page_size)¶
- Parameters:
page_size (
int
) – number of candidate shown per page.
Set the number of candidate shown per page.
- set_round(round)¶
- Parameters:
round (
bool
) – Whether to make self round.
Set whether to make the
IBus.LookupTable
round or not.