add aux and preedit text.
authorPeng Wu <alexepico@gmail.com>
Thu, 13 May 2010 10:56:13 +0000 (18:56 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 19 May 2010 02:09:33 +0000 (10:09 +0800)
src/ExtEditor.cc

index b8cf0c3..8e39fae 100644 (file)
@@ -220,8 +220,10 @@ ExtEditor::fillCommand(std::string command_name, const char * argument){
 
     int result_num = ibus_engine_plugin_call(m_lua_plugin, command->lua_function_name, argument);
 
+    if ( 1 == result_num )
+        m_mode = LABEL_LIST_SINGLE;
 
-        
+    
 
     return true;
 }
@@ -246,6 +248,29 @@ ExtEditor::sendLookupTable()
     }
 }
 
+void
+ExtEditor::updatePreeditText(){
+    if( G_UNLIKELY(m_preedit_text.empty()) ){
+        hidePreeditText ();
+        return;
+    }
+
+    StaticText preedit_text(m_preedit_text);
+    Editor::updatePreeditText(preedit_text, m_cursor, TRUE);
+}
+
+void
+ExtEditor::updateAuxiliaryText(){
+    if( G_UNLIKELY(m_auxiliary_text.empty()) ){
+        hideAuxiliaryText ();
+        return;
+    }
+
+    StaticText aux_text (m_auxiliary_text);
+    Editor::updateAuxiliaryText (aux_text, TRUE);
+}
+
+
 };