summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/PYPPinyinEditor.cc73
-rw-r--r--src/PYPPinyinEditor.h6
2 files changed, 1 insertions, 78 deletions
diff --git a/src/PYPPinyinEditor.cc b/src/PYPPinyinEditor.cc
index 5599416..817f621 100644
--- a/src/PYPPinyinEditor.cc
+++ b/src/PYPPinyinEditor.cc
@@ -298,34 +298,7 @@ LibPinyinPinyinEditor::updateLookupTable ()
LibPinyinPhoneticEditor::updateLookupTable ();
}
-gboolean
-LibPinyinPinyinEditor::removeCharBefore (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return FALSE;
-
- m_cursor --;
- m_text.erase (m_cursor, 1);
-
- updatePinyin ();
- update ();
-
- return TRUE;
-}
-
-gboolean
-LibPinyinPinyinEditor::removeCharAfter (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- m_text.erase (m_cursor, 1);
-
- updatePinyin ();
- update ();
-
- return TRUE;
-}
+/* move cursor functions */
guint
LibPinyinPinyinEditor::getCursorLeftByWord (void)
@@ -398,28 +371,6 @@ LibPinyinPinyinEditor::removeWordAfter (void)
}
gboolean
-LibPinyinPinyinEditor::moveCursorLeft (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return FALSE;
-
- m_cursor --;
- update ();
- return TRUE;
-}
-
-gboolean
-LibPinyinPinyinEditor::moveCursorRight (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- m_cursor ++;
- update ();
- return TRUE;
-}
-
-gboolean
LibPinyinPinyinEditor::moveCursorLeftByWord (void)
{
if (G_UNLIKELY (m_cursor == 0))
@@ -444,25 +395,3 @@ LibPinyinPinyinEditor::moveCursorRightByWord (void)
update ();
return TRUE;
}
-
-gboolean
-LibPinyinPinyinEditor::moveCursorToBegin (void)
-{
- if (G_UNLIKELY (m_cursor == 0))
- return TRUE;
-
- m_cursor = 0;
- update ();
- return TRUE;
-}
-
-gboolean
-LibPinyinPinyinEditor::moveCursorToEnd (void)
-{
- if (G_UNLIKELY (m_cursor == m_text.length ()))
- return FALSE;
-
- m_cursor = m_text.length ();
- update ();
- return TRUE;
-}
diff --git a/src/PYPPinyinEditor.h b/src/PYPPinyinEditor.h
index 974d2a5..87fe210 100644
--- a/src/PYPPinyinEditor.h
+++ b/src/PYPPinyinEditor.h
@@ -36,17 +36,11 @@ public:
LibPinyinPinyinEditor (PinyinProperties & props, Config & config);
public:
- gboolean removeCharBefore (void);
- gboolean removeCharAfter (void);
gboolean removeWordBefore (void);
gboolean removeWordAfter (void);
- gboolean moveCursorLeft (void);
- gboolean moveCursorRight (void);
gboolean moveCursorLeftByWord (void);
gboolean moveCursorRightByWord (void);
- gboolean moveCursorToBegin (void);
- gboolean moveCursorToEnd (void);
protected: