Exemple #1
0
        private void IMEEndComposition(int lParam)
        {
            InputMethod.ClearCandidates();
            ClearComposition();

            InputMethod.OnTextCompositionEnded(this);
        }
Exemple #2
0
        private void IMENotify(int WParam)
        {
            switch (WParam)
            {
            case NativeMethods.IMN_OPENCANDIDATE:
            case NativeMethods.IMN_CHANGECANDIDATE:
                IMEChangeCandidate();
                break;

            case NativeMethods.IMN_CLOSECANDIDATE:
                InputMethod.ClearCandidates();
                break;

            default:
                break;
            }
        }
Exemple #3
0
        public void OnEndComposition(ITfCompositionView view)
        {
            var range    = view.Range;
            var rangeacp = range.QueryInterface <ITfRangeACP>();

            rangeacp.GetExtent(out _commitStart, out _commitLength);
            rangeacp.Dispose();
            range.Dispose();

            // Ensure composition string reset
            _compositionStart = _compositionLength = 0;
            _currentComposition.Clear();

            InputMethod.ClearCandidates();
            InputMethod.OnTextCompositionEnded(this);
            view.Dispose();
            foreach (var item in _compViews)
            {
                item.Dispose();
            }
            _compViews.Clear();
        }