| |
---|
| | if (!m_rk.getTextLength()) { |
---|
| | return(false); |
---|
| | } |
---|
| | startConversion(m_rk.getText(true)); |
---|
| | alp_count ++; |
---|
| | show_preedit_string(); |
---|
| | if (m_conversion) { |
---|
| | update_preedit_string(wnn.getText(),wnn.getAttributeList()); |
---|
| | update_preedit_caret(wnn.getCaretPos()); |
---|
| |
---|
| | \fn WnnInstance::process_conversion_key_event(const KeyEvent &key) |
---|
| | */ |
---|
| | bool WnnInstance::process_conversion_key_event(const KeyEvent &key) |
---|
| | { |
---|
| | if ((alp < alp_count) && (alp != 0)) { |
---|
| | if ((alp <= alp_count) && (alp != 0)) { |
---|
| | if (!m_lookup) startLookup(); |
---|
| | } |
---|
| | |
---|
| | if (k_lookup_popup.comp(key)) { |
---|
| |
---|
| | hide_preedit_string(); |
---|
| | hide_lookup_table(); |
---|
| | hide_aux_string(); |
---|
| | m_lookup = false; |
---|
| | alp_count = 0; |
---|
| | alp_count = 1; |
---|
| | return(true); |
---|
| | } else |
---|
| | if (k_cancel.comp(key) || k_backspace.comp(key)) { |
---|
| | wnn.reset(); |
---|
| |
---|
| | update_preedit_caret(wnn.getCaretPos()); |
---|
| | hide_lookup_table(); |
---|
| | hide_aux_string(); |
---|
| | m_lookup = false; |
---|
| | alp_count = 0; |
---|
| | alp_count = 1; |
---|
| | return(true); |
---|
| | } else |
---|
| | if (k_conversion_forward.comp(key) || k_conversion_backward.comp(key)) { |
---|
| | k_conversion_backward.comp(key) ? wnn.setPos(wnn.getPos() - 1) : wnn.setPos(wnn.getPos() + 1); |
---|
| |
---|
| | update_preedit_caret(wnn.getCaretPos()); |
---|
| | hide_lookup_table(); |
---|
| | hide_aux_string(); |
---|
| | m_lookup = false; |
---|
| | alp_count = 0; |
---|
| | alp_count = 1; |
---|
| | return(true); |
---|
| | } else |
---|
| | if (isprint(key.code)) { |
---|
| | if (key.mask & (SCIM_KEY_AltMask | SCIM_KEY_ControlMask)) return(false); |
---|
| |
---|
| | } |
---|
| | m_convList = wnn.getConversionList(); |
---|
| | m_conversion = true; |
---|
| | |
---|
| | alp_count = 0; |
---|
| | alp_count = 1; |
---|
| | } |
---|
| | |
---|
| | |
---|
| | /*! |
---|
| |
---|
| | |