protected override void ChangeMode(TerminalMode mode) { if (_terminalMode == mode) { return; } if (mode == TerminalMode.Normal) { GetDocument().ClearScrollingRegion(); GetConnection().TerminalOutput.Resize(GetDocument().TerminalWidth, GetDocument().TerminalHeight); //たとえばemacs起動中にリサイズし、シェルへ戻るとシェルは新しいサイズを認識していない //RMBoxで確認されたことだが、無用に後方にドキュメントを広げてくる奴がいる。カーソルを123回後方へ、など。 //場当たり的だが、ノーマルモードに戻る際に後ろの空行を削除することで対応する。 GLine l = GetDocument().LastLine; while (l != null && l.DisplayLength == 0 && l.ID > GetDocument().CurrentLineNumber) { l = l.PrevLine; } if (l != null) { l = l.NextLine; } if (l != null) { GetDocument().RemoveAfter(l.ID); } } else { GetDocument().SetScrollingRegion(0, GetDocument().TerminalHeight - 1); } _terminalMode = mode; }
public AbstractTerminal(TerminalInitializeInfo info) { //TerminalEmulatorPlugin.Instance.LaterInitialize(); _session = info.Session; // //_invalidateParam = new InvalidateParam(); _document = new TerminalDocument(info.InitialWidth, info.InitialHeight); //_document.SetOwner(_session.ISession); _afterExitLockActions = new List <AfterExitLockDelegate>(); _decoder = new ISO2022CharDecoder(this, EncodingProfile.Get(info.Session.TerminalSettings.Encoding)); _terminalMode = TerminalMode.Normal; _logService = new LogService(info.TerminalParameter, _session.TerminalSettings, _session.TerminalOptions); //_promptRecognizer = new PromptRecognizer(this); //if (info.Session.TerminalSettings.LogSettings != null) //{ // _logService.ApplyLogSettings(_session.TerminalSettings.LogSettings, false); //} //event handlers ITerminalSettings ts = info.Session.TerminalSettings; ts.ChangeEncoding += delegate(EncodingType t) { this.Reset(); }; _document.DebugFlag = ts.DebugFlag; _document.LineFeedRule = GetTerminalSettings().LineFeedRule; //(Telnet.LineFeedRule) //ToDo: Set Encoding //_document.Encoding = Encoding.GetEncoding("iso-2022-jp") }
protected override void ChangeMode(TerminalMode mode) { if (_terminalMode == mode) { return; } if (mode == TerminalMode.Normal) { GetDocument().ClearScrollingRegion(); GetConnection().TerminalOutput.Resize(GetDocument().TerminalWidth, GetDocument().TerminalHeight); //‚½‚Æ‚¦‚Îemacs‹N“®’†‚ɃŠƒTƒCƒY‚µAƒVƒFƒ‹‚Ö–ß‚é‚ƃVƒFƒ‹‚ÍV‚µ‚¢ƒTƒCƒY‚ð”FŽ¯‚µ‚Ä‚¢‚È‚¢ //RMBox‚ÅŠm”F‚³‚ꂽ‚±‚Æ‚¾‚ªA–³—p‚ÉŒã•û‚ɃhƒLƒ…ƒƒ“ƒg‚ðL‚°‚Ä‚‚é“z‚ª‚¢‚éBƒJ[ƒ\ƒ‹‚ð123‰ñŒã•û‚ÖA‚È‚ÇB //ê“–‚½‚è“I‚¾‚ªAƒm[ƒ}ƒ‹ƒ‚[ƒh‚É–ß‚éÛ‚ÉŒã‚ë‚Ì‹ós‚ð휂·‚邱‚ƂőΉž‚·‚éB int l = GetDocument().TopLineNumber + GetDocument().TerminalHeight; // .LastLine; while (l > GetDocument().CurrentLineNumber) { l--; } l++; GetDocument().ClearAfter(l); // .RemoveAfter(l); } else { GetDocument().SetScrollingRegion(0, GetDocument().TerminalHeight - 1); } _terminalMode = mode; }
/// <summary> /// 操作の対象になるドキュメントと文字のエンコーディングを指定して構築 /// </summary> public AbstractTerminal(ConnectionTag tag, ICharDecoder decoder) { _tag = tag; _decoder = decoder; _terminalMode = TerminalMode.Normal; _currentdecoration = TextDecoration.Default; _manipulator = new GLineManipulator(80); _bufferForMacro = new StringBuilder(); _signalForMacro = new AutoResetEvent(false); }
/// <summary> /// ����̑ΏۂɂȂ�h�L�������g�ƕ����̃G���R�[�f�B���O��w�肵�č\�z /// </summary> public AbstractTerminal(ConnectionTag tag, ICharDecoder decoder) { _tag = tag; _decoder = decoder; _terminalMode = TerminalMode.Normal; _currentdecoration = TextDecoration.Default; _manipulator = new GLineManipulator(80); _bufferForMacro = new StringBuilder(); _signalForMacro = new AutoResetEvent(false); }
public AbstractTerminal(TerminalInitializeInfo info) { TerminalEmulatorPlugin.Instance.LaterInitialize(); _session = info.Session; //_invalidateParam = new InvalidateParam(); _document = new TerminalDocument(info.InitialWidth, info.InitialHeight); _document.SetOwner(_session.ISession); _afterExitLockActions = new List <AfterExitLockDelegate>(); _encodingProfile = EncodingProfile.Create(info.Session.TerminalSettings.Encoding); _decoder = new ISO2022CharDecoder(this, _encodingProfile); _unicodeCharConverter = _encodingProfile.CreateUnicodeCharConverter(); _terminalMode = TerminalMode.Normal; _currentdecoration = TextDecoration.Default; _manipulator = new GLineManipulator(); _scrollBarValues = new ScrollBarValues(); _logService = new LogService(info.TerminalParameter, _session.TerminalSettings); _promptRecognizer = new PromptRecognizer(this); _intelliSense = new IntelliSense(this); _commandResultRecognizer = new PopupStyleCommandResultRecognizer(this); if (info.Session.TerminalSettings.LogSettings != null) { _logService.ApplyLogSettings(_session.TerminalSettings.LogSettings, false); } //event handlers ITerminalSettings ts = info.Session.TerminalSettings; ts.ChangeEncoding += delegate(EncodingType t) { this.Reset(); }; ts.ChangeRenderProfile += delegate(RenderProfile prof) { TerminalControl tc = _session.TerminalControl; if (tc != null) { tc.ApplyRenderProfile(prof); } }; }
protected TerminalMode _cursorKeyMode; //_terminalMode‚Í•Ê•¨BAIX‚Å‚Ìvi‚ÅAƒJ[ƒ\ƒ‹ƒL[‚Í•s•Ï‚Æ‚¢‚¤—ႪŠm”F‚³‚ê‚Ä‚¢‚é protected abstract void ChangeMode(TerminalMode tm);
protected virtual void ChangeCursorKeyMode(TerminalMode tm) { _cursorKeyMode = tm; }
protected override void ChangeMode(TerminalMode mode) { if (_terminalMode == mode) return; if (mode == TerminalMode.Normal) { GetDocument().ClearScrollingRegion(); GetConnection().TerminalOutput.Resize(GetDocument().TerminalWidth, GetDocument().TerminalHeight); //たとえばemacs起動中にリサイズし、シェルへ戻るとシェルは新しいサイズを認識していない //RMBoxで確認されたことだが、無用に後方にドキュメントを広げてくる奴がいる。カーソルを123回後方へ、など。 //場当たり的だが、ノーマルモードに戻る際に後ろの空行を削除することで対応する。 GLine l = GetDocument().LastLine; while (l != null && l.DisplayLength == 0 && l.ID > GetDocument().CurrentLineNumber) l = l.PrevLine; if (l != null) l = l.NextLine; if (l != null) GetDocument().RemoveAfter(l.ID); GetDocument().IsApplicationMode = false; } else { GetDocument().ApplicationModeBackColor = Color.Empty; GetDocument().SetScrollingRegion(0, GetDocument().TerminalHeight - 1); GetDocument().IsApplicationMode = true; } GetDocument().InvalidateAll(); _terminalMode = mode; }
protected abstract void ChangeMode(TerminalMode tm);
public AbstractTerminal(TerminalInitializeInfo info) { TerminalEmulatorPlugin.Instance.LaterInitialize(); _session = info.Session; //_invalidateParam = new InvalidateParam(); _document = new TerminalDocument(info.InitialWidth, info.InitialHeight); _document.SetOwner(_session.ISession); _afterExitLockActions = new List<AfterExitLockDelegate>(); _decoder = new ISO2022CharDecoder(this, EncodingProfile.Get(info.Session.TerminalSettings.Encoding)); _terminalMode = TerminalMode.Normal; _currentdecoration = TextDecoration.Default; _manipulator = new GLineManipulator(); _scrollBarValues = new ScrollBarValues(); _logService = new LogService(info.TerminalParameter, _session.TerminalSettings); _promptRecognizer = new PromptRecognizer(this); _intelliSense = new IntelliSense(this); _commandResultRecognizer = new PopupStyleCommandResultRecognizer(this); if (info.Session.TerminalSettings.LogSettings != null) _logService.ApplyLogSettings(_session.TerminalSettings.LogSettings, false); //event handlers ITerminalSettings ts = info.Session.TerminalSettings; ts.ChangeEncoding += delegate(EncodingType t) { this.Reset(); }; ts.ChangeRenderProfile += delegate(RenderProfile prof) { TerminalControl tc = _session.TerminalControl; if (tc != null) tc.ApplyRenderProfile(prof); }; }
protected override void ChangeMode(TerminalMode mode) { if(_terminalMode==mode) return; if(mode==TerminalMode.Normal) { GetDocument().ClearScrollingRegion(); GetConnection().Resize(GetConnection().TerminalWidth, GetConnection().TerminalHeight); //���Ƃ���emacs�N�����Ƀ��T�C�Y���A�V�F���֖߂�ƃV�F���͐V�����T�C�Y��F�����Ă��Ȃ� //RMBox�Ŋm�F���ꂽ���Ƃ����A���p�Ɍ���Ƀh�L�������g��L���Ă���z������B�J�[�\����123�����ցA�ȂǁB //�ꓖ����I�����A�m�[�}�����[�h�ɖ߂�ۂɌ��̋�s��폜���邱�ƂőΉ�����B GLine l = GetDocument().LastLine; while(l!=null && l.DisplayLength==0 && l.ID>GetDocument().CurrentLineNumber) l = l.PrevLine; if(l!=null) l = l.NextLine; if(l!=null) GetDocument().RemoveAfter(l.ID); } else GetDocument().SetScrollingRegion(0, _tag.Connection.TerminalHeight-1); _terminalMode = mode; }