scim 1.4.18
|
The base class of the real input methods' IMEngineFactory classes. More...
#include <scim_imengine.h>
Public Member Functions | |
IMEngineFactoryBase () | |
virtual | ~IMEngineFactoryBase () |
Virtual destructor. | |
virtual bool | validate_encoding (const String &encoding) const |
Check if an encoding is supported by this IMEngineFactory. | |
virtual bool | validate_locale (const String &locale) const |
Check if a locale is supported by this IMEngineFactory. | |
virtual String | get_language () const |
Get the supported language of this input method engine. | |
virtual WideString | inverse_query (const WideString &str) |
Get the original key string of a composed string. | |
String | get_default_locale () const |
Get the default locale of this input method engine. | |
String | get_default_encoding () const |
Get the default encoding of this input method engine. | |
String | get_locales () const |
Get a list of all supported locales, separated by comma. | |
String | get_encodings () const |
Get a list of all supported encodings, separated by comma. | |
Pure virtual members. | |
These member functions must be implemented in derived classes. | |
virtual WideString | get_name () const =0 |
Get the name of this input method engine. | |
virtual String | get_uuid () const =0 |
Get the UUID of this input method engine. | |
virtual String | get_icon_file () const =0 |
Get the icon file path of this input method engine. | |
virtual WideString | get_authors () const =0 |
Get the authors information of this input method engine. | |
virtual WideString | get_credits () const =0 |
Get the credits information of this input method engine. | |
virtual WideString | get_help () const =0 |
Get the help information of this input method engine. | |
virtual IMEngineInstancePointer | create_instance (const String &encoding, int id=-1)=0 |
Create a new IMEngineInstance object. | |
![]() | |
bool | is_referenced () const |
void | ref () |
Increase an object's reference count by one. | |
void | unref () |
Protected Member Functions | |
void | set_locales (const String &locales) |
Set the locales supported by this input method engine. | |
void | set_languages (const String &languages) |
Set the languages supported by this input method engine. | |
![]() | |
ReferencedObject () | |
Constructor. | |
virtual | ~ReferencedObject ()=0 |
Destructor. | |
void | set_referenced (bool reference) |
The base class of the real input methods' IMEngineFactory classes.
Each input method should implement a class derived from scim::IMEngineFactoryBase, which takes charge of holding shared data, creating IMEngineInstances etc.
scim::IMEngineFactoryBase::IMEngineFactoryBase | ( | ) |
|
virtual |
Virtual destructor.
|
pure virtual |
Get the name of this input method engine.
This name should be a localized string.
Implemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
Get the UUID of this input method engine.
Each input method engine has an unique UUID to distinguish itself from other engines.
You may use uuidgen command shipped with e2fsprogs package to generate this UUID.
Implemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
Get the icon file path of this input method engine.
Implemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
|
pure virtual |
Get the authors information of this input method engine.
This string should be a localized string.
Implemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
|
pure virtual |
Get the credits information of this input method engine.
This string should be a localized string.
Implemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
|
pure virtual |
Get the help information of this input method engine.
This string should be a localized string.
Implemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
|
pure virtual |
Create a new IMEngineInstance object.
This method creates a new scim::IMEngineInstanceBase object with the given encoding and id.
encoding | - the encoding supported by the client. |
id | - the instance id, should be unique. |
Implemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
Check if an encoding is supported by this IMEngineFactory.
The default implementation of this virtual function validates the encoding against the locale list set by method set_locales.
It should be enough in most case.
encoding | - the encoding name to be checked. |
Reimplemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
Check if a locale is supported by this IMEngineFactory.
The default implementation of this virtual function validates the locale against the locale list set by method set_locales.
It should be enough in most case.
locale | - the locale name to be checked. |
Reimplemented in scim::ComposeKeyFactory, scim::FilterFactoryBase, and scim::DummyIMEngineFactory.
Get the supported language of this input method engine.
The language name conforms to glibc locale naming standard, like: zh_CN Simplified Chinese zh_TW Traditional Chinese ja_JP Japanese ru_RU for Russian
The second part of the name (territory id) can be omitted.
The default implementation of this method will get the language name according to the return value of get_default_locale () method.
This method maybe overwrited to return another language name, for example returning "~other" means other uncategorized languages.
Reimplemented in scim::FilterFactoryBase.
|
virtual |
Get the original key string of a composed string.
For example, in the pinyin input method of Simplified Chinese: the key string of composed string "中国" can be "zhongguo".
The default implementation just returns a empty string.
str | The composed string to be queried. |
Reimplemented in scim::FilterFactoryBase.
String scim::IMEngineFactoryBase::get_default_locale | ( | ) | const |
Get the default locale of this input method engine.
The default locale is the first locale in the locale list, which is set by method set_locales.
String scim::IMEngineFactoryBase::get_default_encoding | ( | ) | const |
Get the default encoding of this input method engine.
The default encoding is the first locale's encoding in the locale list, which is set by method set_locales.
String scim::IMEngineFactoryBase::get_locales | ( | ) | const |
Get a list of all supported locales, separated by comma.
String scim::IMEngineFactoryBase::get_encodings | ( | ) | const |
Get a list of all supported encodings, separated by comma.
Set the locales supported by this input method engine.
This method should be called within the constructors of the derived classes.
set_locales () and set_languages () are exclusive with each other. Only one method should be used for one Factory object.
locales | - a comma separated list containing all valid locales should be supported by this input method engine. The first locale is the default one. |
Set the languages supported by this input method engine.
This method should be called within the constructors of the derived classes.
set_locales () and set_languages () are exclusive with each other. Only one method should be used for one Factory object.
languages | - a comma separated list containing all valid languages should be supported by this input method engine. The first language is the default one. |