コード例 #1
0
ファイル: TerminalBase.cs プロジェクト: nwtajcky/RDManager
        protected virtual ProcessCharResult ProcessNormalChar(char ch)
        {
            //既に画面右端にキャレットがあるのに文字が来たら改行をする
            int tw = _tag.Connection.TerminalWidth;

            if (_manipulator.CaretColumn + GLine.CalcDisplayLength(ch) > tw)
            {
                GLine l = _manipulator.Export();
                l.EOLType = EOLType.Continue;
                GetDocument().ReplaceCurrentLine(l);
                GetDocument().LineFeed();
                _manipulator.Load(GetDocument().CurrentLine, 0);
            }

            //画面のリサイズがあったときは、_manipulatorのバッファサイズが不足の可能性がある
            if (tw > _manipulator.BufferSize)
            {
                _manipulator.ExpandBuffer(tw);
            }

            //通常文字の処理
            _manipulator.PutChar(ch, _currentdecoration);

            return(ProcessCharResult.Processed);
        }
コード例 #2
0
        protected override ProcessCharResult ProcessNormalChar(char ch)
        {
            //WrapAroundがfalseで、キャレットが右端のときは何もしない
            if (!_wrapAroundMode && _manipulator.CaretColumn >= GetDocument().TerminalWidth - 1)
            {
                return(ProcessCharResult.Processed);
            }

            if (_insertMode)
            {
                _manipulator.InsertBlanks(_manipulator.CaretColumn, GLine.CalcDisplayLength(ch), _currentdecoration);
            }
            return(base.ProcessNormalChar(ch));
        }
コード例 #3
0
        protected override ProcessCharResult ProcessNormalChar(char ch)
        {
            //WrapAround��false�ŁA�L�����b�g���E�[�̂Ƃ��͉������Ȃ�
            if (!_wrapAroundMode && _manipulator.CaretColumn >= GetConnection().TerminalWidth - 1)
            {
                return(ProcessCharResult.Processed);
            }

            if (_insertMode)
            {
                _manipulator.InsertBlanks(_manipulator.CaretColumn, GLine.CalcDisplayLength(ch));
            }
            return(base.ProcessNormalChar(ch));
        }