#include <scim_filter.h>
Inheritance diagram for scim::FilterInstanceBase:
Public Member Functions | |
FilterInstanceBase (FilterFactoryBase *factory, const IMEngineInstancePointer &orig_inst) | |
Constructor. | |
virtual | ~FilterInstanceBase () |
virtual bool | set_encoding (const String &encoding) |
Set the working encoding for this filter instance as well as the original instance which is currently filtered. | |
Action functions. | |
These functions will be called by FrontEnds to send events to this FilterInstance. These methods can be overrided, if the derived class wants to filter these events.
The default implementation of these methods are just to call the corresponding methods of the original IMEngineInstance object which is filtered by this filter. | |
virtual bool | process_key_event (const KeyEvent &key) |
Process a key event. | |
virtual void | move_preedit_caret (unsigned int pos) |
Move the preedit caret in the preedit string. | |
virtual void | select_candidate (unsigned int index) |
Select a candidate in current lookup table. | |
virtual void | update_lookup_table_page_size (unsigned int page_size) |
Update the page size of current lookup table. | |
virtual void | lookup_table_page_up () |
Flip the lookup table to the previous page. | |
virtual void | lookup_table_page_down () |
Flip the lookup table to the next page. | |
virtual void | reset () |
Reset this engine instance. | |
virtual void | focus_in () |
Focus in this engine instance. | |
virtual void | focus_out () |
Focus out this engine instance. | |
virtual void | trigger_property (const String &property) |
Trigger a property. | |
virtual void | process_helper_event (const String &helper_uuid, const Transaction &trans) |
Process the events sent from a Client Helper process. | |
virtual void | update_client_capabilities (unsigned int cap) |
Update the capabilities of current client application which is attached to this IMEngineInstance. | |
Protected Member Functions | |
Signal activation functions. | |
These methods will be called by FilterInstanceBase class when the corresponding signals are emitted by the original IMEngineInstance object which is filtered by this filter.
These methods can be overrided, if the derived class wants to filter these signals. The default implementation of these methods are just to deliver the signals to FrontEnd directly. | |
virtual void | filter_show_preedit_string () |
virtual void | filter_show_aux_string () |
virtual void | filter_show_lookup_table () |
virtual void | filter_hide_preedit_string () |
virtual void | filter_hide_aux_string () |
virtual void | filter_hide_lookup_table () |
virtual void | filter_update_preedit_caret (int caret) |
virtual void | filter_update_preedit_string (const WideString &str, const AttributeList &attrs=AttributeList()) |
virtual void | filter_update_aux_string (const WideString &str, const AttributeList &attrs=AttributeList()) |
virtual void | filter_update_lookup_table (const LookupTable &table) |
virtual void | filter_commit_string (const WideString &str) |
virtual void | filter_forward_key_event (const KeyEvent &key) |
virtual void | filter_register_properties (const PropertyList &properties) |
virtual void | filter_update_property (const Property &property) |
virtual void | filter_beep () |
virtual void | filter_start_helper (const String &helper_uuid) |
virtual void | filter_stop_helper (const String &helper_uuid) |
virtual void | filter_send_helper_event (const String &helper_uuid, const Transaction &trans) |
virtual bool | filter_get_surrounding_text (WideString &text, int &cursor, int maxlen_before=-1, int maxlen_after=-1) |
virtual bool | filter_delete_surrounding_text (int offset, int len) |
Friends | |
class | FilterInstanceBaseImpl |
All FilterInstance classes should derive from this base class, and some base methods should be override in the derived classes.
|
Constructor. The Constructor of derived class should call this Contructor with the following two parameters. The orig_inst should be created by invoking FilterFactoryBase::create_instance() within the same method of derived FilterFactory classes.
|
|
|
|
Set the working encoding for this filter instance as well as the original instance which is currently filtered. This method could be overrided in derived class to do some extra job. But the method of this base class must be invoked within the new method. After invoking this method, reset() should be invoked to let the new encoding take effect. If you want to use different encodings in this filter instance and the original instance which is currently filtered, this method should be overrided in the derived class and two different encodings should be set respectively by calling FilterInstanceBase::set_encoding() and IMEngineInstanceBase::set_encoding (); The code may look like: bool XXXFilterInstance::set_encoding (const String &encoding) { FilterInstanceBase::set_encoding ("Other Encoding"); // Set the encoding of the original instance to another one. return IMEngineInstanceBase::set_encoding (encoding); // Set the encoding of this filter instance to the desired one. }
Reimplemented from scim::IMEngineInstanceBase. |
|
Process a key event.
Implements scim::IMEngineInstanceBase. |
|
Move the preedit caret in the preedit string.
Reimplemented from scim::IMEngineInstanceBase. |
|
Select a candidate in current lookup table. When user click a candidate directly, this method will be invoked by FrontEnd.
Reimplemented from scim::IMEngineInstanceBase. |
|
Update the page size of current lookup table. In the next time, the lookup table should page down by this size.
Reimplemented from scim::IMEngineInstanceBase. |
|
Flip the lookup table to the previous page. The method will be invoked by FrontEnd when user click the lookup table page up button. Reimplemented from scim::IMEngineInstanceBase. |
|
Flip the lookup table to the next page. The method will be invoked by FrontEnd when user click the lookup table page down button. Reimplemented from scim::IMEngineInstanceBase. |
|
Reset this engine instance. All status of this engine instance should be reset, including the working encoding. Reimplemented from scim::IMEngineInstanceBase. |
|
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. Reimplemented from scim::IMEngineInstanceBase. |
|
Focus out this engine instance.
Reimplemented from scim::IMEngineInstanceBase. |
|
Trigger a property. This function should do some action according to the triggered property. For example toggle the input mode, etc.
Reimplemented from scim::IMEngineInstanceBase. |
|
Process the events sent from a Client Helper process.
Reimplemented from scim::IMEngineInstanceBase. |
|
Update the capabilities of current client application which is attached to this IMEngineInstance. Some client may not support all capabilities provided by the IMEngine API. For example:
This method will be called to inform this IMEngineInstance object which capabilities are supported by the client application. It may be called multiple times, if the capabilities was changed.
Reimplemented from scim::IMEngineInstanceBase. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|