fixes compile
[platform/upstream/ibus-libpinyin.git] / src / PYPBopomofoEditor.h
1 /* vim:set et ts=4 sts=4:
2  *
3  * ibus-libpinyin - Intelligent Pinyin engine based on libpinyin for IBus
4  *
5  * Copyright (c) 2011 Peng Wu <alexepico@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20  */
21 #ifndef __PY_LIB_PINYIN_BOPOMOFO_EDITOR_H_
22 #define __PY_LIB_PINYIN_BOPOMOFO_EDITOR_H_
23
24 #include "PYPPhoneticEditor.h"
25
26 namespace PY {
27
28 class Config;
29
30 #define MAX_PINYIN_LEN 64
31
32 class LibPinyinBopomofoEditor : public LibPinyinPhoneticEditor {
33
34 public:
35     LibPinyinBopomofoEditor (PinyinProperties & props, Config & config);
36     ~LibPinyinBopomofoEditor (void);
37
38 protected:
39     String bopomofo;
40     gboolean m_select_mode;
41
42     gboolean processGuideKey (guint keyval, guint keycode, guint modifiers);
43     gboolean processAuxiliarySelectKey (guint keyval, guint keycode,
44                                         guint modifiers);
45     gboolean processSelectKey (guint keyval, guint keycode, guint modifiers);
46     gboolean processBopomofo (guint keyval, guint keycode, guint modifiers);
47     gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers);
48
49
50     virtual void updatePreeditText ();
51     virtual void updateAuxiliaryText ();
52     virtual void updatePinyin (void);
53
54     void commit ();
55     void reset ();
56
57     gboolean insert (gint ch);
58
59 };
60
61 };
62
63
64 #endif