summaryrefslogtreecommitdiffstats
path: root/src/PYPBopomofoEditor.cc
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-09-22 14:35:40 +0800
committerPeng Wu <alexepico@gmail.com>2011-12-22 12:23:12 +0800
commit204a6f858e9a2e6577f78d2368474d048b643098 (patch)
tree9e3a8a7de8d05f075d036ed08ddf6fc2ea7933f1 /src/PYPBopomofoEditor.cc
parentcb25a0b9ee36d12d09ef9a0644888bfd2066252a (diff)
downloadibus-libpinyin-204a6f858e9a2e6577f78d2368474d048b643098.tar.gz
ibus-libpinyin-204a6f858e9a2e6577f78d2368474d048b643098.tar.xz
ibus-libpinyin-204a6f858e9a2e6577f78d2368474d048b643098.zip
begin to write bopomofo editor
Diffstat (limited to 'src/PYPBopomofoEditor.cc')
-rw-r--r--src/PYPBopomofoEditor.cc119
1 files changed, 0 insertions, 119 deletions
diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc
index 35c9ed2..9efd8f1 100644
--- a/src/PYPBopomofoEditor.cc
+++ b/src/PYPBopomofoEditor.cc
@@ -72,125 +72,6 @@ LibPinyinBopomofoEditor::insert (gint ch)
return TRUE;
}
-gboolean
-LibPinyinBopomofoEditor::removeCharBefore (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return FALSE;
-
- m_cursor --;
- m_text.erase (m_cursor, 1);
- update();
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::removeCharAfter (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- m_text.erase (m_cursor, 1);
- update ();
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::removeWordBefore (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return FALSE;
-
- /* TODO: to be implemented. */
- g_assert(FALSE);
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::removeWordAfter (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- /* TODO: remove one word instead of the sentence. */
- g_assert(FALSE);
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::moveCursorLeft (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return FALSE;
-
- m_cursor --;
- update ();
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::moveCursorRight (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- m_cursor ++;
- update ();
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::moveCursorLeftByWord (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return FALSE;
-
- /* TODO: to be implemented. */
- g_assert(FALSE);
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::moveCursorRightByWord (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- /* TODO: to be implemented. */
- g_assert(FALSE);
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::moveCursorToBegin (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return FALSE;
-
- m_cursor = 0;
- update();
-
- return TRUE;
-}
-
-gboolean
-LibPinyinBopomofoEditor::moveCursorToEnd (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- m_cursor = m_text.length ();
- update();
- return TRUE;
-}
gboolean
LibPinyinBopomofoEditor::processGuideKey (guint keyval, guint keycode,