1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * Copyright (C) 2004 Hiroyuki Ikezoe
4 * Copyright (C) 2004 Takuro Ashie
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The original code is scim_uim_imengine.cpp in scim-uim-0.1.3.
23 * Copyright (C) 2004 James Su <suzhe@tsinghua.org.cn>
26 #ifndef __SCIM_ANTHY_FACTORY_H__
27 #define __SCIM_ANTHY_FACTORY_H__
29 #define Uses_SCIM_IMENGINE
30 #define Uses_SCIM_CONFIG_BASE
31 #include <anthy/anthy.h>
33 #include "scim_anthy_action.h"
34 #include "scim_anthy_style_file.h"
35 #include "scim_anthy_key2kana_table.h"
38 using namespace scim_anthy;
40 class AnthyFactory : public IMEngineFactoryBase
43 AnthyFactory (const String &lang,
45 const ConfigPointer &config);
46 virtual ~AnthyFactory ();
48 virtual WideString get_name () const;
49 virtual WideString get_authors () const;
50 virtual WideString get_credits () const;
51 virtual WideString get_help () const;
52 virtual String get_uuid () const;
53 virtual String get_icon_file () const;
55 virtual IMEngineInstancePointer create_instance (const String& encoding,
58 virtual void append_config_listener (AnthyInstance *listener);
59 virtual void remove_config_listener (AnthyInstance *listener);
62 void reload_config (const ConfigPointer &config);
66 Connection m_reload_signal_connection;
67 std::vector<AnthyInstance*> m_config_listeners;
71 ConfigPointer m_config;
75 String m_typing_method;
76 String m_conversion_mode;
77 String m_period_style;
78 String m_symbol_style;
80 String m_ten_key_type;
81 String m_behavior_on_period;
82 String m_behavior_on_focus_out;
84 bool m_show_candidates_label;
85 bool m_close_cand_win_on_select;
86 int m_cand_win_page_size;
87 int m_n_triggers_to_show_cand_win;
89 bool m_learn_on_manual_commit;
90 bool m_learn_on_auto_commit;
92 bool m_romaji_half_symbol;
93 bool m_romaji_half_number;
94 bool m_romaji_allow_split;
96 bool m_romaji_pseudo_ascii_mode;
97 bool m_romaji_pseudo_ascii_blank_behavior;
100 KeyEventList m_left_thumb_keys;
101 KeyEventList m_right_thumb_keys;
103 String m_dict_encoding;
104 String m_dict_admin_command;
105 String m_add_word_command;
107 bool m_predict_on_input;
108 bool m_use_direct_key_on_predict;
110 bool m_show_input_mode_label;
111 bool m_show_conv_mode_label;
112 bool m_show_typing_method_label;
113 bool m_show_period_style_label;
114 bool m_show_symbol_style_label;
115 bool m_show_dict_label;
116 bool m_show_dict_admin_label;
117 bool m_show_add_word_label;
119 String m_preedit_style;
120 unsigned int m_preedit_fg_color;
121 unsigned int m_preedit_bg_color;
122 String m_conversion_style;
123 unsigned int m_conversion_fg_color;
124 unsigned int m_conversion_bg_color;
125 String m_selected_segment_style;
126 unsigned int m_selected_segment_fg_color;
127 unsigned int m_selected_segment_bg_color;
129 Key2KanaTable *m_custom_romaji_table;
130 Key2KanaTable *m_custom_kana_table;
131 Key2KanaTable *m_custom_nicola_table;
133 String m_kana_layout_ro_key;
135 /* for key bindings */
136 std::vector<Action> m_actions;
139 #endif /* __SCIM_ANTHY_FACTORY_H__ */
141 vi:ts=4:nowrap:ai:expandtab