diff options
author | Peng Wu <alexepico@gmail.com> | 2014-04-16 14:58:08 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-04-16 14:58:08 +0800 |
commit | 741ac19c54f0cf8d3ac16819a2de34c9c3b79023 (patch) | |
tree | 537d409342399149c97435476ea36e35bc6d7048 | |
parent | 63f62cc58c3bde41e94196c93735b788502b9e40 (diff) | |
download | ibus-libzhuyin-741ac19c54f0cf8d3ac16819a2de34c9c3b79023.tar.gz ibus-libzhuyin-741ac19c54f0cf8d3ac16819a2de34c9c3b79023.tar.xz ibus-libzhuyin-741ac19c54f0cf8d3ac16819a2de34c9c3b79023.zip |
fixes compile
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/ZYZEnhancedEditor.cc | 2 | ||||
-rw-r--r-- | src/ZYZPhoneticEditor.cc | 35 | ||||
-rw-r--r-- | src/ZYZPhoneticEditor.h | 5 |
4 files changed, 41 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index f86fc95..80963ca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,6 +33,7 @@ ibus_engine_libzhuyin_c_sources = \ ZYZhuyinProperties.cc \ ZYTradSimpConverter.cc \ ZYEnhancedText.cc \ + ZYZEnhancedEditor.cc \ ZYZPhoneticEditor.cc \ ZYSymbols.cc \ ZYZBuiltinSymbolSection.cc \ diff --git a/src/ZYZEnhancedEditor.cc b/src/ZYZEnhancedEditor.cc index e2b239b..3b882ad 100644 --- a/src/ZYZEnhancedEditor.cc +++ b/src/ZYZEnhancedEditor.cc @@ -36,7 +36,7 @@ EnhancedEditor::~EnhancedEditor (void) } gboolean -EnhancedEditor::processEvent (guint keyval, guint keycode, guint modifiers) +EnhancedEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers) { modifiers &= (IBUS_CONTROL_MASK | IBUS_MOD1_MASK | diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc index 778c56d..d8241c8 100644 --- a/src/ZYZPhoneticEditor.cc +++ b/src/ZYZPhoneticEditor.cc @@ -20,8 +20,43 @@ */ #include "ZYZPhoneticEditor.h" +#include <assert.h> #include "ZYConfig.h" #include "ZYZhuyinProperties.h" +#include "ZYZPhoneticSection.h" +#include "ZYZBuiltinSymbolSection.h" namespace ZY { + +/** + * Implementation Notes: + * 1. support input editing; + * 2. support phonetic candidates; + * 3. support built-in symbols candidates; + * 4. support list all user symbols; + * 5. support show user symbols; + * 6. support easy symbols input; + */ + +/* init static members */ +PhoneticEditor::PhoneticEditor (ZhuyinProperties & props, Config & config) + : EnhancedEditor (props, config), + m_lookup_table (m_config.pageSize ()) +{ + /* TODO: alloc one instance here. */ + m_instance = NULL; + assert (NULL != m_instance); + + /* init symbols sections here. */ + m_symbol_sections[STATE_BUILTIN_SYMBOL_SHOWN].reset + (new BuiltinSymbolSection (*this)); + + m_phonetic_section.reset + (new PhoneticSection (*this)); +} + +PhoneticEditor::~PhoneticEditor (void) +{ +} + }; diff --git a/src/ZYZPhoneticEditor.h b/src/ZYZPhoneticEditor.h index bcba643..ecd6f85 100644 --- a/src/ZYZPhoneticEditor.h +++ b/src/ZYZPhoneticEditor.h @@ -25,6 +25,7 @@ #include <zhuyin.h> #include "ZYLookupTable.h" #include "ZYZEnhancedEditor.h" +#include <vector> namespace ZY { @@ -40,7 +41,7 @@ class PhoneticEditor : public EnhancedEditor { public: PhoneticEditor (ZhuyinProperties & props, Config & config); - virtual ~PhoneticEditor (); + virtual ~PhoneticEditor (void); public: /* virtual functions */ @@ -95,6 +96,8 @@ protected: SymbolSectionPtr m_symbol_sections[STATE_LAST]; PhoneticSectionPtr m_phonetic_section; + + std::vector<zhuyin_instance_t *> m_instances; }; }; |