From 70306d06f3eac8a6ee8754d981c724cc29db060b Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 1 Jul 2014 15:12:28 +0800 Subject: import ZYZBopomofoSymbolSection.h --- src/ZYZBopomofoSymbolSection.cc | 21 +++++++++++++++++ src/ZYZBopomofoSymbolSection.h | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 src/ZYZBopomofoSymbolSection.cc create mode 100644 src/ZYZBopomofoSymbolSection.h (limited to 'src') diff --git a/src/ZYZBopomofoSymbolSection.cc b/src/ZYZBopomofoSymbolSection.cc new file mode 100644 index 0000000..acb91fd --- /dev/null +++ b/src/ZYZBopomofoSymbolSection.cc @@ -0,0 +1,21 @@ +/* vim:set et ts=4 sts=4: + * + * ibus-libzhuyin - New Zhuyin engine based on libzhuyin for IBus + * + * Copyright (c) 2014 Peng Wu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + diff --git a/src/ZYZBopomofoSymbolSection.h b/src/ZYZBopomofoSymbolSection.h new file mode 100644 index 0000000..de3b1cb --- /dev/null +++ b/src/ZYZBopomofoSymbolSection.h @@ -0,0 +1,52 @@ +/* vim:set et ts=4 sts=4: + * + * ibus-libzhuyin - New Zhuyin engine based on libzhuyin for IBus + * + * Copyright (c) 2014 Peng Wu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __ZY_LIB_ZHUYIN_BOPOMOFO_SYMBOL_SECTION_H_ +#define __ZY_LIB_ZHUYIN_BOPOMOFO_SYMBOL_SECTION_H_ + +#include "ZYZSymbolSection.h" +#include + +namespace ZY { + +class ZhuyinProperties; + +class BopomofoSymbolSection : public SymbolSection { + typedef std::vector::iterator iterator_t; + +public: + BopomofoSymbolSection (PhoneticEditor & editor, + ZhuyinProperties & props); + virtual ~BopomofoSymbolSection (); + +public: + virtual bool initCandidates (const String & lookup); + virtual bool fillLookupTableByPage (); + virtual int selectCandidate (guint index); + +protected: + String m_lookup; + std::vector m_candidates; +}; + +}; + +#endif -- cgit