//再接続用に現在ドキュメントの前に挿入 public void InsertBefore(TerminalDocument olddoc, int paneheight) { lock (this) { GLine c = olddoc.LastLine; int offset = _currentLine.ID - _topLine.ID; bool flag = false; while (c != null) { if (flag || c.Text[0] != '\0') { flag = true; GLine nl = c.Clone(); nl.ID = _firstLine.ID - 1; InsertBefore(_firstLine, nl); //最初に空でない行があれば以降は全部挿入 offset++; } c = c.PrevLine; } //IDが負になるのはちょっと怖いので修正 if (_firstLine.ID < 0) { int t = -_firstLine.ID; c = _firstLine; while (c != null) { c.ID += t; c = c.NextLine; } } _topLine = FindLineOrEdge(_currentLine.ID - Math.Min(offset, paneheight)); //Dump("insert doc"); } }
public SelectionKeyProcessor(TerminalPane owner, TerminalDocument doc, GLine line, int pos) { _owner = owner; _document = doc; Debug.Assert(line != null); _currentLine = line; _caretPos = pos; }
//�����̊e���\�b�h�͂��ꂼ�ꃍ�b�N���Ȃ�����s����� internal void Warning(TerminalDocument doc, string msg) { Monitor.Exit(doc); lock(this) { _msg = msg; SendMessageCore(Service.Warning); } Monitor.Enter(doc); }
internal void UnsupportedEscapeSequence(TerminalDocument doc, string msg) { Monitor.Exit(doc); lock(this) { _msg = msg; SendMessageCore(Service.UnsupportedEscapeSequence); } Monitor.Enter(doc); }
internal void UnsupportedCharSetDetected(TerminalDocument doc, string msg) { Monitor.Exit(doc); lock(this) { _msg = msg; SendMessageCore(Service.UnsupportedCharSetDetected); } Monitor.Enter(doc); }
internal void ToggleTextSelectionMode(IntPtr hWnd, TerminalDocument doc) { Monitor.Exit(doc); lock(this) { Win32.SendMessage(hWnd, GConst.WMG_MAINTHREADTASK, new IntPtr(GConst.WPG_TOGGLESELECTIONMODE), IntPtr.Zero); } Monitor.Enter(doc); }
internal void ReportCriticalError(TerminalDocument doc, Exception ex) { Monitor.Exit(doc); lock(this) { _exception = ex; SendMessageCore(Service.CriticalError); } Monitor.Enter(doc); }
internal void InvalidDocumentOperation(TerminalDocument doc, string msg) { Monitor.Exit(doc); lock(this) { _msg = msg; SendMessageCore(Service.InvalidDocumentOperation); } Monitor.Enter(doc); }
internal void InvalidCharDetected(TerminalDocument doc, string msg) { Monitor.Exit(doc); lock(this) { _msg = msg; SendMessageCore(Service.InvalidCharDetected); } Monitor.Enter(doc); }
internal void IndicateBell(TerminalDocument doc) { Monitor.Exit(doc); lock(this) { SendMessageCore(Service.IndicateBell); } Monitor.Enter(doc); }
internal void AdjustIMEComposition(IntPtr hWnd, TerminalDocument doc) { Monitor.Exit(doc); lock(this) { Win32.SendMessage(hWnd, GConst.WMG_MAINTHREADTASK, new IntPtr(GConst.WPG_ADJUSTIMECOMPOSITION), IntPtr.Zero); } Monitor.Enter(doc); }
//�Đڑ��p�Ɍ��݃h�L�������g�̑O�ɑ}�� public void InsertBefore(TerminalDocument olddoc, int paneheight) { lock(this) { GLine c = olddoc.LastLine; int offset = _currentLine.ID - _topLine.ID; bool flag = false; while(c!=null) { if(flag || c.Text[0]!='\0') { flag = true; GLine nl = c.Clone(); nl.ID = _firstLine.ID-1; InsertBefore(_firstLine, nl); //�ŏ��ɋ�łȂ��s������Έȍ~�͑S���}�� offset++; } c = c.PrevLine; } //ID�����ɂȂ�̂͂�����ƕ|���̂ŏC�� if(_firstLine.ID<0) { int t = -_firstLine.ID; c = _firstLine; while(c!=null) { c.ID += t; c = c.NextLine; } } _topLine = FindLineOrEdge(_currentLine.ID - Math.Min(offset, paneheight)); //Dump("insert doc"); } }