Tizen 2.1 base
[framework/uifw/ise-engine-anthy.git] / src / scim_anthy_key2kana_base.h
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  *  Copyright (C) 2004 Hiroyuki Ikezoe
4  *  Copyright (C) 2004 Takuro Ashie
5  *
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)
9  *  any later version.
10  *
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.
15  *
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.
19  */
20
21 #ifndef __SCIM_ANTHY_KEY2KANA_BASE_H__
22 #define __SCIM_ANTHY_KEY2KANA_BASE_H__
23
24 #define Uses_SCIM_EVENT
25 #include <scim.h>
26
27 using namespace scim;
28
29 namespace scim_anthy {
30
31 class Key2KanaConvertorBase
32 {
33 public:
34     Key2KanaConvertorBase                 ()
35         : m_case_sensitive (true)
36         {};
37     virtual ~Key2KanaConvertorBase        () {};
38
39     virtual bool       can_append         (const KeyEvent   & key,
40                                            bool               ignore_space = false) = 0;
41     virtual bool       append             (const KeyEvent   & key,
42                                            WideString       & result,
43                                            WideString       & pending,
44                                            String           & raw)       = 0;
45     virtual bool       append             (const String     & raw,
46                                            WideString       & result,
47                                            WideString       & pending)   = 0;
48     virtual void       clear              (void)                         = 0;
49
50     virtual bool       is_pending         (void)                         = 0;
51     virtual WideString get_pending        (void)                         = 0;
52     virtual WideString flush_pending      (void)                         = 0;
53     virtual void       reset_pending      (const WideString & result,
54                                            const String     & raw)       = 0;
55
56     virtual void       reset_pseudo_ascii_mode       (void)
57         {}
58     virtual bool       process_pseudo_ascii_mode     (const WideString & wstr)
59         { return false; }
60
61     virtual void       set_case_sensitive (bool               sensitive)
62         { m_case_sensitive = sensitive; }
63     virtual bool       get_case_sensitive (void)
64         { return m_case_sensitive; }
65
66 protected:
67     bool m_case_sensitive;
68 };
69
70 }
71 #endif /* __SCIM_ANTHY_KEY2KANA_BASE_H__ */
72 /*
73 vi:ts=4:nowrap:ai:expandtab
74 */