#include <scim_imengine.h>
Inheritance diagram for scim::IMEngineInstanceBase:
Public Member Functions | |
IMEngineInstanceBase (IMEngineFactoryBase *factory, const String &encoding, int id=-1) | |
Constructor. | |
virtual | ~IMEngineInstanceBase () |
Virtual destructor. | |
bool | set_encoding (const String &encoding) |
Set the working encoding for this instance. | |
String | get_encoding () const |
Get the working encoding of this instance. | |
int | get_id () const |
Get the unique id of this instance. | |
String | get_factory_uuid () const |
Get the UUID of the engine factory. | |
Signal connection functions. | |
These functions are used by FrontEnds to connect their corresponding slots to this IMEngineInstance's signals. | |
Connection | signal_connect_show_preedit_string (IMEngineSlotVoid *slot) |
Connection | signal_connect_show_aux_string (IMEngineSlotVoid *slot) |
Connection | signal_connect_show_lookup_table (IMEngineSlotVoid *slot) |
Connection | signal_connect_hide_preedit_string (IMEngineSlotVoid *slot) |
Connection | signal_connect_hide_aux_string (IMEngineSlotVoid *slot) |
Connection | signal_connect_hide_lookup_table (IMEngineSlotVoid *slot) |
Connection | signal_connect_update_preedit_caret (IMEngineSlotInt *slot) |
Connection | signal_connect_update_preedit_string (IMEngineSlotWideStringAttributeList *slot) |
Connection | signal_connect_update_aux_string (IMEngineSlotWideStringAttributeList *slot) |
Connection | signal_connect_update_lookup_table (IMEngineSlotLookupTable *slot) |
Connection | signal_connect_commit_string (IMEngineSlotWideString *slot) |
Connection | signal_connect_forward_key_event (IMEngineSlotKeyEvent *slot) |
Connection | signal_connect_register_properties (IMEngineSlotPropertyList *slot) |
Connection | signal_connect_update_property (IMEngineSlotProperty *slot) |
Action functions. | |
These functions will be called by FrontEnds to send events to this IMEngineInstance. | |
virtual bool | process_key_event (const KeyEvent &key)=0 |
Process a key event. | |
virtual void | move_preedit_caret (unsigned int pos)=0 |
Move the preedit caret in the preedit string. | |
virtual void | select_candidate (unsigned int index)=0 |
Select a candidate in current lookup table. | |
virtual void | update_lookup_table_page_size (unsigned int page_size)=0 |
Update the page size of current lookup table. | |
virtual void | lookup_table_page_up ()=0 |
Flip the lookup table to the previous page. | |
virtual void | lookup_table_page_down ()=0 |
Flip the lookup table to the next page. | |
virtual void | reset ()=0 |
Reset this engine instance. | |
virtual void | focus_in ()=0 |
Focus in this engine instance. | |
virtual void | focus_out ()=0 |
Focus out this engine instance. | |
virtual void | trigger_property (const String &property)=0 |
Trigger a property. | |
Protected Member Functions | |
Signal activation functions | |
These functions should be called by derived classes to fire the corresponding signals. The FrontEnd connected to those signals will receive and process them. | |
void | show_preedit_string () |
Show the preedit string area. | |
void | show_aux_string () |
Show the aux string area. | |
void | show_lookup_table () |
Show the lookup table area. | |
void | hide_preedit_string () |
Hide the preedit string area. | |
void | hide_aux_string () |
Hide the aux string area. | |
void | hide_lookup_table () |
Hide the lookup table area. | |
void | update_preedit_caret (int caret) |
Update the preedit caret position in the preedit string. | |
void | update_preedit_string (const WideString &str, const AttributeList &attrs=AttributeList()) |
Update the content of the preedit string,. | |
void | update_aux_string (const WideString &str, const AttributeList &attrs=AttributeList()) |
Update the content of the aux string,. | |
void | update_lookup_table (const LookupTable &table) |
Update the content of the lookup table,. | |
void | commit_string (const WideString &str) |
Commit a string to the client application. | |
void | forward_key_event (const KeyEvent &key) |
Forward a key event to the client application. | |
void | register_properties (const PropertyList &properties) |
Register all properties of this IMEngineInstance into the FrontEnd. | |
void | update_property (const Property &property) |
Update a registered property. |
Each input method should implement a class derived from scim::IMEngineInstanceBase, which takes charge of recording Input Context status and processing user input events.
Definition at line 331 of file scim_imengine.h.
|
Constructor.
|
|
Virtual destructor.
|
|
Set the working encoding for this instance. One engine instance can only support one client encoding at the same time. This encoding must be supported by the IMEngineFactory as well.
|
|
Get the working encoding of this instance.
|
|
Get the unique id of this instance.
|
|
Get the UUID of the engine factory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Process a key event.
Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Move the preedit caret in the preedit string.
Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Select a candidate in current lookup table. When user click a candidate directly, this method will be invoked by FrontEnd.
Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Update the page size of current lookup table. In the next time, the lookup table should page down by this size.
Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Flip the lookup table to the previous page. The method will be invoked by FrontEnd when user click the lookup table page up button. Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Flip the lookup table to the next page. The method will be invoked by FrontEnd when user click the lookup table page down button. Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Reset this engine instance. All status of this engine instance should be reset, including the working encoding. Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Focus in this engine instance. This function should update/show/hide the status area, preedit area and lookup table, and update the full width punctuation/letter state. Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Focus out this engine instance.
Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Trigger a property. This function should do some action according to the triggered property. For example toggle the input mode, etc.
Implemented in scim::ComposeKeyInstance, and scim::DummyIMEngineInstance. |
|
Show the preedit string area. The preedit string should be updated by calling update_preedit_string before or right after this call. |
|
Show the aux string area. The aux string should be updated by calling update_aux_string before or right after this call. The aux string can contain any additional information whatever the input method engine want. |
|
Show the lookup table area. The lookup table should be updated by calling update_lookup_table before or right after this call. |
|
Hide the preedit string area.
|
|
Hide the aux string area.
|
|
Hide the lookup table area.
|
|
Update the preedit caret position in the preedit string.
|
|
Update the content of the preedit string,.
|
|
Update the content of the aux string,.
|
|
Update the content of the lookup table,. FrontEnd may reduce the page size of the table according to screen resolution. If the page size is changed, FrontEnd will inform this engine instance by calling update_lookup_table_page_size method.
|
|
Commit a string to the client application. The preedit string should be hid before calling this method. Otherwise the clients which use OnTheSpot input mode will flicker annoyingly.
|
|
Forward a key event to the client application.
|
|
Register all properties of this IMEngineInstance into the FrontEnd. The old properties previously registered by other IMEngineInstance will be discarded.
|
|
Update a registered property. Update a property which already registered by register_properties () method.
|