1 /* vim:set et ts=4 sts=4: 2 * 3 * libpyzy - The Chinese PinYin and Bopomofo conversion library. 4 * 5 * Copyright (c) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library 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 GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 20 * USA 21 */ 22 #ifndef __PYZY_FULL_PINYIN_CONTEXT_H_ 23 #define __PYZY_FULL_PINYIN_CONTEXT_H_ 24 25 #include "PinyinContext.h" 26 27 namespace PyZy { 28 29 class FullPinyinContext : public PinyinContext { 30 31 public: 32 explicit FullPinyinContext (PhoneticContext::Observer *observer); 33 virtual ~FullPinyinContext (void); 34 35 public: 36 virtual bool insert (char ch); 37 38 virtual bool removeCharBefore (void); 39 virtual bool removeCharAfter (void); 40 virtual bool removeWordBefore (void); 41 virtual bool removeWordAfter (void); 42 43 virtual bool moveCursorLeft (void); 44 virtual bool moveCursorRight (void); 45 virtual bool moveCursorLeftByWord (void); 46 virtual bool moveCursorRightByWord (void); 47 virtual bool moveCursorToBegin (void); 48 virtual bool moveCursorToEnd (void); 49 50 protected: 51 virtual void updatePinyin (void); 52 53 }; 54 55 }; // namespace PyZy 56 57 #endif // __PYZY_FULL_PINYIN_CONTEXT_H_ 58