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

scim_compose_key.h

Go to the documentation of this file.
00001 /** 00002 * @file scim_compose_key.h 00003 * @brief Defines scim::ComposeKeyFactory and scim::ComposeKeyInstance. 00004 */ 00005 00006 /* 00007 * Smart Common Input Method 00008 * 00009 * Copyright (c) 2004 James Su <suzhe@tsinghua.org.cn> 00010 * Copyright (c) 2004 James Su <suzhe@turbolinux.com.cn> 00011 * Copyright (c) 2003 James Su <suzhe@turbolinux.com.cn> 00012 * Copyright (c) 2002 James Su <suzhe@turbolinux.com.cn> 00013 * 00014 * 00015 * This library is free software; you can redistribute it and/or 00016 * modify it under the terms of the GNU Lesser General Public 00017 * License as published by the Free Software Foundation; either 00018 * version 2 of the License, or (at your option) any later version. 00019 * 00020 * This library is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU Lesser General Public License for more details. 00024 * 00025 * You should have received a copy of the GNU Lesser General Public 00026 * License along with this program; if not, write to the 00027 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 00028 * Boston, MA 02111-1307 USA 00029 * 00030 * $Id: scim_compose_key.h,v 1.2 2004/08/10 08:04:34 suzhe Exp $ 00031 */ 00032 00033 #ifndef __SCIM_COMPOSE_KEY_H 00034 #define __SCIM_COMPOSE_KEY_H 00035 00036 namespace scim { 00037 /** 00038 * @addtogroup IMEngine 00039 * @{ 00040 */ 00041 00042 /** 00043 * @brief A simple IMEngine to deal with the Compose keys. 00044 */ 00045 class ComposeKeyFactory : public IMEngineFactoryBase 00046 { 00047 public: 00048 ComposeKeyFactory (); 00049 virtual ~ComposeKeyFactory (); 00050 00051 virtual WideString get_name () const; 00052 virtual String get_uuid () const; 00053 virtual String get_icon_file () const; 00054 virtual WideString get_authors () const; 00055 virtual WideString get_credits () const; 00056 virtual WideString get_help () const; 00057 00058 virtual bool validate_encoding (const String& encoding) const; 00059 virtual bool validate_locale (const String& locale) const; 00060 00061 virtual IMEngineInstancePointer create_instance (const String& encoding, int id = -1); 00062 }; 00063 00064 class ComposeKeyInstance : public IMEngineInstanceBase 00065 { 00066 uint32 m_compose_buffer [8]; 00067 00068 public: 00069 ComposeKeyInstance (ComposeKeyFactory *factory, 00070 const String &encoding, 00071 int id = -1); 00072 00073 virtual ~ComposeKeyInstance (); 00074 00075 virtual bool process_key_event (const KeyEvent& key); 00076 virtual void move_preedit_caret (unsigned int pos); 00077 virtual void select_candidate (unsigned int index); 00078 virtual void update_lookup_table_page_size (unsigned int page_size); 00079 virtual void lookup_table_page_up (); 00080 virtual void lookup_table_page_down (); 00081 virtual void reset (); 00082 virtual void focus_in (); 00083 virtual void focus_out (); 00084 virtual void trigger_property (const String& property); 00085 }; 00086 00087 /** @} */ 00088 00089 } // namespace scim 00090 00091 #endif //__SCIM_COMPOSE_KEY_H 00092 00093 /* 00094 vi:ts=4:nowrap:ai:expandtab 00095 */ 00096

Generated on Thu Dec 30 21:03:17 2004 for scim by doxygen 1.3.8