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

scim::FrontEndBase Class Reference
[FrontEnd]

The base class to implement the FrontEnd objects. More...

#include <scim_frontend.h>

Inheritance diagram for scim::FrontEndBase:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FrontEndBase (const BackEndPointer &backend)
 Constructor.

virtual ~FrontEndBase ()
 Virtual destructor.

virtual void init (int argc, char **argv)=0
 init the frontend.

virtual void run ()=0
 run the frontend.


Protected Member Functions

functions can be used by derived classes.
uint32 get_server_factory_list (std::vector< String > &uuids, const String &encoding) const
 Get the server factories list for specific encoding.

WideString get_server_factory_name (const String &uuid) const
 get the name of a server factory.

WideString get_server_factory_authors (const String &uuid) const
 get the authors info of a server factory.

WideString get_server_factory_credits (const String &uuid) const
 get the credits info of a server factory.

WideString get_server_factory_help (const String &uuid) const
 get the help info of a server factory.

String get_server_factory_icon_file (const String &uuid) const
 get the icon file of a server factory.

String get_server_factory_locales (const String &uuid) const
 get the supported locales of a server factory.

String get_all_locales () const
 get all locales supported by BackEnd.

int new_server_instance (const String &sf_uuid, const String &encoding)
 create a new server instance for specific encoding.

bool replace_server_instance (int si_id, const String &sf_uuid)
 replace a server instance by a new instance created by another factory.

bool delete_server_instance (int id)
 delete a server instance according to its id.

void delete_all_server_instances ()
 delete all server instances.

String get_server_instance_encoding (int id) const
 get the working encoding of a server instance.

WideString get_server_instance_name (int id) const
 get the name of a server instance.

WideString get_server_instance_authors (int id) const
 get the authors info of a server instance.

WideString get_server_instance_credits (int id) const
 get the credits info of a server instance.

WideString get_server_instance_help (int id) const
 get the help of a server instance.

String get_server_instance_icon_file (int id) const
 get the icon file of a server instance.

bool process_key_event (int id, const KeyEvent &key) const
 process a key event using specific server instance.

void move_preedit_caret (int id, unsigned int pos) const
 let a specific server instance move its preedit caret.

void select_lookup_table (int id, unsigned int item) const
 let a specific server instance select an item 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 server instance's lookup table.

void reset_server_instance (int id) const
 reset a specific server instance.

void focus_in_server_instance (int id) const
 focus in a specific server instance.

void focus_out_server_instance (int id) const
 focus out a specific server instance.

void toggle_full_width_punctuation (int id) const
 let a specific server instance toggle its full/half width punctuation state.

void toggle_full_width_letter (int id) const
 let a specific server instance toggle its full/half width letter state.

void toggle_input_status (int id) const
 let a specific server instance toggle its input status.

Pure virtual protected methods.
The following methods should be implemented by derivation classes. these functions handle the real things.

virtual void show_preedit_string (int id)=0
 show preedit string area for a server instance.

virtual void show_status_string (int id)=0
 show status string area for a server instance.

virtual void show_aux_string (int id)=0
 show aux string area for a server instance.

virtual void show_lookup_table (int id)=0
 show lookup table area for a server instance.

virtual void hide_preedit_string (int id)=0
 hide preedit string area for a server instance.

virtual void hide_status_string (int id)=0
 hide status string area for a server instance.

virtual void hide_aux_string (int id)=0
 hide aux string area for a server instance.

virtual void hide_lookup_table (int id)=0
 hide lookup table area for a server instance.

virtual void update_preedit_caret (int id, int caret)=0
 update the position of preedit caret for a server instance.

virtual void update_preedit_string (int id, const WideString &str, const AttributeList &attrs)=0
 update the content of preedit string for a server instance.

virtual void update_status_string (int id, const WideString &str, const AttributeList &attrs)=0
 update the content of status string for a server instance.

virtual void update_aux_string (int id, const WideString &str, const AttributeList &attrs)=0
 update the content of aux string for a server instance.

virtual void update_lookup_table (int id, const LookupTable &table)=0
 update the content of lookup table for a server instance.

virtual void commit_string (int id, const WideString &str)=0
 commit a string to client for a server instance.

virtual void forward_keyevent (int id, const KeyEvent &key)=0
 forward a keyevent to the client of a server instance.

virtual void update_full_width_punctuation (int id, bool full)=0
 update the full width punctuation status for a server instance.

virtual void update_full_width_letter (int id, bool full)=0
 update the full width letter status for a server instance.


Detailed Description

The base class to implement the FrontEnd objects.

FrontEnd is an interface between ServerFactory/ServerInstance objects and the user applications. It forward the user requests to ServerFactory/ServerInstance objects, and handle the requests sent back.

Definition at line 72 of file scim_frontend.h.


Constructor & Destructor Documentation

scim::FrontEndBase::FrontEndBase const BackEndPointer backend  ) 
 

Constructor.

Parameters:
backend A BackEnd object which holds all ServerFactory objects.

virtual scim::FrontEndBase::~FrontEndBase  )  [virtual]
 

Virtual destructor.


Member Function Documentation

uint32 scim::FrontEndBase::get_server_factory_list std::vector< String > &  uuids,
const String encoding
const [protected]
 

Get the server 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 server factories will be returned.
Returns:
the number of server factories found.

WideString scim::FrontEndBase::get_server_factory_name const String uuid  )  const [protected]
 

get the name of a server factory.

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

WideString scim::FrontEndBase::get_server_factory_authors const String uuid  )  const [protected]
 

get the authors info of a server factory.

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

WideString scim::FrontEndBase::get_server_factory_credits const String uuid  )  const [protected]
 

get the credits info of a server factory.

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

WideString scim::FrontEndBase::get_server_factory_help const String uuid  )  const [protected]
 

get the help info of a server factory.

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

String scim::FrontEndBase::get_server_factory_icon_file const String uuid  )  const [protected]
 

get the icon file of a server factory.

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

String scim::FrontEndBase::get_server_factory_locales const String uuid  )  const [protected]
 

get the supported locales of a server factory.

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

String scim::FrontEndBase::get_all_locales  )  const [protected]
 

get all locales supported by BackEnd.

Returns:
a comman separated list of all supported locales.

int scim::FrontEndBase::new_server_instance const String sf_uuid,
const String encoding
[protected]
 

create a new server instance for specific encoding.

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

bool scim::FrontEndBase::replace_server_instance int  si_id,
const String sf_uuid
[protected]
 

replace a server 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 server instance to be replaced.
sf_uuid the new server factory to be used.

bool scim::FrontEndBase::delete_server_instance int  id  )  [protected]
 

delete a server instance according to its id.

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

void scim::FrontEndBase::delete_all_server_instances  )  [protected]
 

delete all server instances.

This function should be called just before quitting the FrontEnd.

String scim::FrontEndBase::get_server_instance_encoding int  id  )  const [protected]
 

get the working encoding of a server instance.

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

WideString scim::FrontEndBase::get_server_instance_name int  id  )  const [protected]
 

get the name of a server instance.

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

WideString scim::FrontEndBase::get_server_instance_authors int  id  )  const [protected]
 

get the authors info of a server instance.

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

WideString scim::FrontEndBase::get_server_instance_credits int  id  )  const [protected]
 

get the credits info of a server instance.

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

WideString scim::FrontEndBase::get_server_instance_help int  id  )  const [protected]
 

get the help of a server instance.

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

String scim::FrontEndBase::get_server_instance_icon_file int  id  )  const [protected]
 

get the icon file of a server instance.

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

bool scim::FrontEndBase::process_key_event int  id,
const KeyEvent key
const [protected]
 

process a key event using specific server instance.

Parameters:
id the server 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::FrontEndBase::move_preedit_caret int  id,
unsigned int  pos
const [protected]
 

let a specific server instance move its preedit caret.

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

void scim::FrontEndBase::select_lookup_table int  id,
unsigned int  item
const [protected]
 

let a specific server instance select an item in its current lookup table.

Parameters:
id the server instance id.
item the lookup table item to be selected.

void scim::FrontEndBase::update_lookup_table_page_size int  id,
unsigned int  page_size
const [protected]
 

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

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

void scim::FrontEndBase::reset_server_instance int  id  )  const [protected]
 

reset a specific server instance.

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

void scim::FrontEndBase::focus_in_server_instance int  id  )  const [protected]
 

focus in a specific server instance.

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

void scim::FrontEndBase::focus_out_server_instance int  id  )  const [protected]
 

focus out a specific server instance.

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

void scim::FrontEndBase::toggle_full_width_punctuation int  id  )  const [protected]
 

let a specific server instance toggle its full/half width punctuation state.

Parameters:
id the server instance id.

void scim::FrontEndBase::toggle_full_width_letter int  id  )  const [protected]
 

let a specific server instance toggle its full/half width letter state.

Parameters:
id the server instance id.

void scim::FrontEndBase::toggle_input_status int  id  )  const [protected]
 

let a specific server instance toggle its input status.

Parameters:
id the server instance id.

virtual void scim::FrontEndBase::show_preedit_string int  id  )  [protected, pure virtual]
 

show preedit string area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::show_status_string int  id  )  [protected, pure virtual]
 

show status string area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::show_aux_string int  id  )  [protected, pure virtual]
 

show aux string area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::show_lookup_table int  id  )  [protected, pure virtual]
 

show lookup table area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::hide_preedit_string int  id  )  [protected, pure virtual]
 

hide preedit string area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::hide_status_string int  id  )  [protected, pure virtual]
 

hide status string area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::hide_aux_string int  id  )  [protected, pure virtual]
 

hide aux string area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::hide_lookup_table int  id  )  [protected, pure virtual]
 

hide lookup table area for a server instance.

Parameters:
id the id of the server instance, it must be focused in.

virtual void scim::FrontEndBase::update_preedit_caret int  id,
int  caret
[protected, pure virtual]
 

update the position of preedit caret for a server instance.

Parameters:
id the id of the server instance, it must be focused in.
caret the new caret position.

virtual void scim::FrontEndBase::update_preedit_string int  id,
const WideString str,
const AttributeList attrs
[protected, pure virtual]
 

update the content of preedit string for a server instance.

Parameters:
id the id of the server instance, it must be focused in.
str the new content of preedit string.
attrs the string attributes.

virtual void scim::FrontEndBase::update_status_string int  id,
const WideString str,
const AttributeList attrs
[protected, pure virtual]
 

update the content of status string for a server instance.

Parameters:
id the id of the server instance, it must be focused in.
str the new content of status string.
attrs the string attributes.

virtual void scim::FrontEndBase::update_aux_string int  id,
const WideString str,
const AttributeList attrs
[protected, pure virtual]
 

update the content of aux string for a server instance.

Parameters:
id the id of the server instance, it must be focused in.
str the new content of aux string.
attrs the string attributes.

virtual void scim::FrontEndBase::update_lookup_table int  id,
const LookupTable table
[protected, pure virtual]
 

update the content of lookup table for a server instance.

Parameters:
id the id of the server instance, it must be focused in.
table the new lookup table.

virtual void scim::FrontEndBase::commit_string int  id,
const WideString str
[protected, pure virtual]
 

commit a string to client for a server instance.

Parameters:
id the id of the server instance to commit the string.
str the string to be committed.

virtual void scim::FrontEndBase::forward_keyevent int  id,
const KeyEvent key
[protected, pure virtual]
 

forward a keyevent to the client of a server instance.

Parameters:
id the id of the server instance, it must be focused in.
key the key event to be forwarded.

virtual void scim::FrontEndBase::update_full_width_punctuation int  id,
bool  full
[protected, pure virtual]
 

update the full width punctuation status for a server instance.

Parameters:
id the id of the server instance, it must be focused in.
full indicates the punctuation input status, true = full width, false = half width.

virtual void scim::FrontEndBase::update_full_width_letter int  id,
bool  full
[protected, pure virtual]
 

update the full width letter status for a server instance.

Parameters:
id the id of the server instance, it must be focused in.
full indicates the letter input status, true = full width, false = half width.

virtual void scim::FrontEndBase::init int  argc,
char **  argv
[pure virtual]
 

init the frontend.

This method must be implemented by derivation classes.

virtual void scim::FrontEndBase::run  )  [pure virtual]
 

run the frontend.

This method must be implemented by derivation classes.


The documentation for this class was generated from the following file:
Generated on Fri May 7 17:27:28 2004 for scim by doxygen 1.3.6