summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-04-18 14:32:40 +0800
committerPeng Wu <alexepico@gmail.com>2014-04-18 14:32:40 +0800
commit1332a6ac060631e76ae64650e1e4997b90bae2e4 (patch)
treec49828768513d9348911af37c581ef0ff7c94c45
parent4a72d7e978f6348d93fe6a3c0c0916cc9ff882c9 (diff)
downloadibus-libzhuyin-1332a6ac060631e76ae64650e1e4997b90bae2e4.tar.gz
ibus-libzhuyin-1332a6ac060631e76ae64650e1e4997b90bae2e4.tar.xz
ibus-libzhuyin-1332a6ac060631e76ae64650e1e4997b90bae2e4.zip
add m_props member variable to sections
-rw-r--r--src/ZYZBuiltinSymbolSection.cc5
-rw-r--r--src/ZYZBuiltinSymbolSection.h5
-rw-r--r--src/ZYZPhoneticEditor.cc4
-rw-r--r--src/ZYZPhoneticSection.cc5
-rw-r--r--src/ZYZPhoneticSection.h3
-rw-r--r--src/ZYZSymbolSection.h6
6 files changed, 19 insertions, 9 deletions
diff --git a/src/ZYZBuiltinSymbolSection.cc b/src/ZYZBuiltinSymbolSection.cc
index 189f937..7053e00 100644
--- a/src/ZYZBuiltinSymbolSection.cc
+++ b/src/ZYZBuiltinSymbolSection.cc
@@ -25,8 +25,9 @@
namespace ZY {
-BuiltinSymbolSection::BuiltinSymbolSection (PhoneticEditor & editor) :
- SymbolSection (editor)
+BuiltinSymbolSection::BuiltinSymbolSection (PhoneticEditor & editor,
+ ZhuyinProperties & props) :
+ SymbolSection (editor, props)
{
m_type = "builtin";
}
diff --git a/src/ZYZBuiltinSymbolSection.h b/src/ZYZBuiltinSymbolSection.h
index 5b60d4d..c4973ba 100644
--- a/src/ZYZBuiltinSymbolSection.h
+++ b/src/ZYZBuiltinSymbolSection.h
@@ -27,11 +27,14 @@
namespace ZY {
+class ZhuyinProperties;
+
class BuiltinSymbolSection : public SymbolSection {
typedef std::vector<String>::iterator iterator_t;
public:
- BuiltinSymbolSection (PhoneticEditor & editor);
+ BuiltinSymbolSection (PhoneticEditor & editor,
+ ZhuyinProperties & props);
virtual ~BuiltinSymbolSection ();
public:
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc
index 2a80263..9c8a8e6 100644
--- a/src/ZYZPhoneticEditor.cc
+++ b/src/ZYZPhoneticEditor.cc
@@ -49,10 +49,10 @@ PhoneticEditor::PhoneticEditor (ZhuyinProperties & props, Config & config)
/* init symbols sections here. */
m_symbol_sections[STATE_BUILTIN_SYMBOL_SHOWN].reset
- (new BuiltinSymbolSection (*this));
+ (new BuiltinSymbolSection (*this, props));
m_phonetic_section.reset
- (new PhoneticSection (*this));
+ (new PhoneticSection (*this, props));
}
PhoneticEditor::~PhoneticEditor (void)
diff --git a/src/ZYZPhoneticSection.cc b/src/ZYZPhoneticSection.cc
index aedbd31..ed3505e 100644
--- a/src/ZYZPhoneticSection.cc
+++ b/src/ZYZPhoneticSection.cc
@@ -23,8 +23,9 @@
namespace ZY {
-PhoneticSection::PhoneticSection (PhoneticEditor & editor) :
- m_editor (editor)
+PhoneticSection::PhoneticSection (PhoneticEditor & editor,
+ ZhuyinProperties & props) :
+ m_editor (editor), m_props (props)
{
}
diff --git a/src/ZYZPhoneticSection.h b/src/ZYZPhoneticSection.h
index f4d9702..9033cf6 100644
--- a/src/ZYZPhoneticSection.h
+++ b/src/ZYZPhoneticSection.h
@@ -30,7 +30,7 @@ namespace ZY {
class PhoneticSection {
public:
- PhoneticSection (PhoneticEditor & editor);
+ PhoneticSection (PhoneticEditor & editor, ZhuyinProperties & props);
virtual ~PhoneticSection ();
public:
@@ -44,6 +44,7 @@ protected:
protected:
PhoneticEditor & m_editor;
+ ZhuyinProperties & m_props;
/* other variables. */
zhuyin_instance_t * m_instance;
diff --git a/src/ZYZSymbolSection.h b/src/ZYZSymbolSection.h
index 2f6d6ca..42e4ef8 100644
--- a/src/ZYZSymbolSection.h
+++ b/src/ZYZSymbolSection.h
@@ -27,9 +27,12 @@
namespace ZY {
+class ZhuyinProperties;
+
class SymbolSection {
public:
- SymbolSection (PhoneticEditor & editor) : m_editor (editor) {}
+ SymbolSection (PhoneticEditor & editor, ZhuyinProperties & props) :
+ m_editor (editor), m_props(props) {}
virtual ~SymbolSection () {}
public:
@@ -47,6 +50,7 @@ protected:
protected:
PhoneticEditor & m_editor;
+ ZhuyinProperties & m_props;
/* other variables. */
String m_type;