/// <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); }
public GLine UpdateCurrentLine(GLineManipulator manipulator) { GLine line = _currentLine; if (line != null) { manipulator.ExportTo(line); _invalidatedRegion.InvalidateLine(line.ID); } return(line); }
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); } }; }