Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

scim::BackEndBase Class Reference

The interface class to manage a set of IMEngineFactory and IMEngineInstance objects. More...

#include <scim_backend.h>

Inheritance diagram for scim::BackEndBase:

Inheritance graph
[legend]
Collaboration diagram for scim::BackEndBase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BackEndBase ()
 Default constructor.
virtual ~BackEndBase ()
 Virtual destructor.
String get_all_locales () const
 Get a list of all locales supported by all FrontEnds.
uint32 number_of_factories () const
 Return the number of factories held by this BackEnd.
IMEngineFactoryPointer get_factory_pointer (uint32 idx) const
Methods to manipulate IMEngine Factories.
uint32 get_factory_list (std::vector< String > &uuids, const String &encoding=String("")) const
 Get the IMEngine factories list for specific encoding.
WideString get_factory_name (const String &uuid) const
 get the name of an IMEngine factory.
WideString get_factory_authors (const String &uuid) const
 get the authors info of an IMEngine factory.
WideString get_factory_credits (const String &uuid) const
 get the credits info of an IMEngine factory.
WideString get_factory_help (const String &uuid) const
 get the help info of an IMEngine factory.
String get_factory_icon_file (const String &uuid) const
 get the icon file of an IMEngine factory.
String get_factory_locales (const String &uuid) const
 get the supported locales of an IMEngine factory.
String get_factory_language (const String &uuid) const
 get the language of an IMEngine factory.
Methods to manipulate IMEngine Instances.
int new_instance (const String &sf_uuid, const String &encoding)
 create a new IMEngine instance for specific encoding.
bool replace_instance (int si_id, const String &sf_uuid)
 replace an IMEngine instance by a new instance created by another factory.
bool delete_instance (int id)
 delete an IMEngine instance according to its id.
void delete_all_instances ()
 delete all IMEngine instances.
String get_instance_uuid (int id) const
 get the factory uuid of this instance.
String get_instance_encoding (int id) const
 get the working encoding of an IMEngine instance.
WideString get_instance_name (int id) const
 get the name of an IMEngine instance.
WideString get_instance_authors (int id) const
 get the authors info of an IMEngine instance.
WideString get_instance_credits (int id) const
 get the credits info of an IMEngine instance.
WideString get_instance_help (int id) const
 get the help of an IMEngine instance.
String get_instance_icon_file (int id) const
 get the icon file of an IMEngine instance.
bool process_key_event (int id, const KeyEvent &key) const
 process a key event using specific IMEngine instance.
void move_preedit_caret (int id, unsigned int pos) const
 let a specific IMEngine instance move its preedit caret.
void select_candidate (int id, unsigned int index) const
 let a specific IMEngine instance select a candidate in its current lookup table.
void update_lookup_table_page_size (int id, unsigned int page_size) const
 update the page size of a specific IMEngine instance's lookup table.
void lookup_table_page_up (int id) const
 Let a specific IMEngine instance flip its lookup table to the previous page.
void lookup_table_page_down (int id) const
 Let a specific IMEngine instance flip its lookup table to the previous page.
void reset (int id) const
 reset a specific IMEngine instance.
void focus_in (int id) const
 focus in a specific IMEngine instance.
void focus_out (int id) const
 focus out a specific IMEngine instance.
void trigger_property (int id, const String &property) const
 trigger a property of a specific IMEngine instance.
Signal connection methods.
These functions are used by FrontEnds to connect their corresponding slots to this BackEnd's signals.

The first parameter of these methods are the id of corresponding instance.

Connection signal_connect_show_preedit_string (BackEndSlotVoid *slot)
Connection signal_connect_show_aux_string (BackEndSlotVoid *slot)
Connection signal_connect_show_lookup_table (BackEndSlotVoid *slot)
Connection signal_connect_hide_preedit_string (BackEndSlotVoid *slot)
Connection signal_connect_hide_aux_string (BackEndSlotVoid *slot)
Connection signal_connect_hide_lookup_table (BackEndSlotVoid *slot)
Connection signal_connect_update_preedit_caret (BackEndSlotInt *slot)
Connection signal_connect_update_preedit_string (BackEndSlotWideStringAttributeList *slot)
Connection signal_connect_update_aux_string (BackEndSlotWideStringAttributeList *slot)
Connection signal_connect_update_lookup_table (BackEndSlotLookupTable *slot)
Connection signal_connect_commit_string (BackEndSlotWideString *slot)
Connection signal_connect_forward_key_event (BackEndSlotKeyEvent *slot)
Connection signal_connect_register_properties (BackEndSlotPropertyList *slot)
Connection signal_connect_update_property (BackEndSlotProperty *slot)

Protected Member Functions

Methods used by derived classes.
bool add_factory (const IMEngineFactoryPointer &factory)
 Add an IMEngineFactory object into BackEnd.
void set_supported_unicode_locales (const String &locales)
 Set the list of unicode locales to be supported.
void destroy_all_factories ()
 Destroy all factory instances.

Detailed Description

The interface class to manage a set of IMEngineFactory and IMEngineInstance objects.

This is mainly a helper interface class used by scim::FrontEndBase. Its responsibility is to hold a set of IMEngineFactory instances and manage the locales list supported by them.

Most developer should just use the default implementation scim::CommonBackEnd.

Definition at line 90 of file scim_backend.h.


Constructor & Destructor Documentation

scim::BackEndBase::BackEndBase  ) 
 

Default constructor.

virtual scim::BackEndBase::~BackEndBase  )  [virtual]
 

Virtual destructor.


Member Function Documentation

String scim::BackEndBase::get_all_locales  )  const
 

Get a list of all locales supported by all FrontEnds.

Returns:
A comma separated locales list.

uint32 scim::BackEndBase::number_of_factories  )  const
 

Return the number of factories held by this BackEnd.

IMEngineFactoryPointer scim::BackEndBase::get_factory_pointer uint32  idx  )  const
 

Returns:
Return the pointer of a Factory.

uint32 scim::BackEndBase::get_factory_list std::vector< String > &  uuids,
const String encoding = String("")
const
 

Get the IMEngine factories list for specific encoding.

Parameters:
uuids the vector to store the factories' uuids which support the encoding.
encoding the encoding to be queried. If empty, all IMEngine factories will be returned.
Returns:
the number of IMEngine factories found.

WideString scim::BackEndBase::get_factory_name const String uuid  )  const
 

get the name of an IMEngine factory.

Parameters:
uuid the uuid of the IMEngine factory
Returns:
the name of the IMEngine factory.

WideString scim::BackEndBase::get_factory_authors const String uuid  )  const
 

get the authors info of an IMEngine factory.

Parameters:
uuid the uuid of the IMEngine factory
Returns:
the authors info of the IMEngine factory.

WideString scim::BackEndBase::get_factory_credits const String uuid  )  const
 

get the credits info of an IMEngine factory.

Parameters:
uuid the uuid of the IMEngine factory
Returns:
the credits info of the IMEngine factory.

WideString scim::BackEndBase::get_factory_help const String uuid  )  const
 

get the help info of an IMEngine factory.

Parameters:
uuid the uuid of the IMEngine factory
Returns:
the help info of the IMEngine factory.

String scim::BackEndBase::get_factory_icon_file const String uuid  )  const
 

get the icon file of an IMEngine factory.

Parameters:
uuid the uuid of the IMEngine factory
Returns:
the icon file name of the IMEngine factory.

String scim::BackEndBase::get_factory_locales const String uuid  )  const
 

get the supported locales of an IMEngine factory.

Parameters:
uuid the uuid of the IMEngine factory
Returns:
a comma separated list of the supported locales.

String scim::BackEndBase::get_factory_language const String uuid  )  const
 

get the language of an IMEngine factory.

Parameters:
uuid the uuid of the IMEngine factory
Returns:
the language of this IMEngine factory.

int scim::BackEndBase::new_instance const String sf_uuid,
const String encoding
 

create a new IMEngine instance for specific encoding.

Parameters:
sf_uuid the IMEngineFactory UUID.
encoding the encoding to be used.
Returns:
the newly created IMEngine instance id, -1 means error occurred.

bool scim::BackEndBase::replace_instance int  si_id,
const String sf_uuid
 

replace an IMEngine instance by a new instance created by another factory.

This function is used to change the input method for an input context on the fly.

Parameters:
si_id the IMEngine instance to be replaced.
sf_uuid the new IMEngine factory to be used.

bool scim::BackEndBase::delete_instance int  id  ) 
 

delete an IMEngine instance according to its id.

Parameters:
id the id of the IMEngine instance to be deleted.
Returns:
true if success, false if there is no such instance.

void scim::BackEndBase::delete_all_instances  ) 
 

delete all IMEngine instances.

This function should be called just before quitting the FrontEnd.

String scim::BackEndBase::get_instance_uuid int  id  )  const
 

get the factory uuid of this instance.

Parameters:
id the IMEngine instance id.
Returns:
the factory uuid of this instance.

String scim::BackEndBase::get_instance_encoding int  id  )  const
 

get the working encoding of an IMEngine instance.

Parameters:
id the IMEngine instance id.
Returns:
the working encoding of this IMEngine instance.

WideString scim::BackEndBase::get_instance_name int  id  )  const
 

get the name of an IMEngine instance.

Parameters:
id the IMEngine instance id.
Returns:
the name of this IMEngine instance, aka. the name of its factory.

WideString scim::BackEndBase::get_instance_authors int  id  )  const
 

get the authors info of an IMEngine instance.

Parameters:
id the IMEngine instance id.
Returns:
the authors info of this IMEngine instance, aka. the authors of its factory.

WideString scim::BackEndBase::get_instance_credits int  id  )  const
 

get the credits info of an IMEngine instance.

Parameters:
id the IMEngine instance id.
Returns:
the credits info of this IMEngine instance, aka. the credits of its factory.

WideString scim::BackEndBase::get_instance_help int  id  )  const
 

get the help of an IMEngine instance.

Parameters:
id the IMEngine instance id.
Returns:
the help of this IMEngine instance, aka. the help of its factory.

String scim::BackEndBase::get_instance_icon_file int  id  )  const
 

get the icon file of an IMEngine instance.

Parameters:
id the IMEngine instance id.
Returns:
the icon file name of this IMEngine instance.

bool scim::BackEndBase::process_key_event int  id,
const KeyEvent key
const
 

process a key event using specific IMEngine instance.

Parameters:
id the IMEngine instance id.
key the key event to be processed.
Returns:
true if the event was processed successfully, false if the event was not processed and should be forward to the client application.

void scim::BackEndBase::move_preedit_caret int  id,
unsigned int  pos
const
 

let a specific IMEngine instance move its preedit caret.

Parameters:
id the IMEngine instance id.
pos the new preedit caret position.

void scim::BackEndBase::select_candidate int  id,
unsigned int  index
const
 

let a specific IMEngine instance select a candidate in its current lookup table.

Parameters:
id the IMEngine instance id.
index the candidate index in current lookup table page to be selected.

void scim::BackEndBase::update_lookup_table_page_size int  id,
unsigned int  page_size
const
 

update the page size of a specific IMEngine instance's lookup table.

Parameters:
id the IMEngine instance id.
page_size the new page size to be used.

void scim::BackEndBase::lookup_table_page_up int  id  )  const
 

Let a specific IMEngine instance flip its lookup table to the previous page.

void scim::BackEndBase::lookup_table_page_down int  id  )  const
 

Let a specific IMEngine instance flip its lookup table to the previous page.

void scim::BackEndBase::reset int  id  )  const
 

reset a specific IMEngine instance.

Parameters:
id the id of the IMEngine instance to be reset.

void scim::BackEndBase::focus_in int  id  )  const
 

focus in a specific IMEngine instance.

Parameters:
id the id of the IMEngine instance to be focused in.

void scim::BackEndBase::focus_out int  id  )  const
 

focus out a specific IMEngine instance.

Parameters:
id the id of the IMEngine instance to be focused out.

void scim::BackEndBase::trigger_property int  id,
const String property
const
 

trigger a property of a specific IMEngine instance.

Parameters:
id the id of the IMEngine instance.
property the key of the property to be triggered.

Connection scim::BackEndBase::signal_connect_show_preedit_string BackEndSlotVoid slot  ) 
 

Connection scim::BackEndBase::signal_connect_show_aux_string BackEndSlotVoid slot  ) 
 

Connection scim::BackEndBase::signal_connect_show_lookup_table BackEndSlotVoid slot  ) 
 

Connection scim::BackEndBase::signal_connect_hide_preedit_string BackEndSlotVoid slot  ) 
 

Connection scim::BackEndBase::signal_connect_hide_aux_string BackEndSlotVoid slot  ) 
 

Connection scim::BackEndBase::signal_connect_hide_lookup_table BackEndSlotVoid slot  ) 
 

Connection scim::BackEndBase::signal_connect_update_preedit_caret BackEndSlotInt slot  ) 
 

Connection scim::BackEndBase::signal_connect_update_preedit_string BackEndSlotWideStringAttributeList slot  ) 
 

Connection scim::BackEndBase::signal_connect_update_aux_string BackEndSlotWideStringAttributeList slot  ) 
 

Connection scim::BackEndBase::signal_connect_update_lookup_table BackEndSlotLookupTable slot  ) 
 

Connection scim::BackEndBase::signal_connect_commit_string BackEndSlotWideString slot  ) 
 

Connection scim::BackEndBase::signal_connect_forward_key_event BackEndSlotKeyEvent slot  ) 
 

Connection scim::BackEndBase::signal_connect_register_properties BackEndSlotPropertyList slot  ) 
 

Connection scim::BackEndBase::signal_connect_update_property BackEndSlotProperty slot  ) 
 

bool scim::BackEndBase::add_factory const IMEngineFactoryPointer factory  )  [protected]
 

Add an IMEngineFactory object into BackEnd.

void scim::BackEndBase::set_supported_unicode_locales const String locales  )  [protected]
 

Set the list of unicode locales to be supported.

void scim::BackEndBase::destroy_all_factories  )  [protected]
 

Destroy all factory instances.


The documentation for this class was generated from the following file:
Generated on Thu Dec 30 21:03:20 2004 for scim by doxygen 1.3.8