internal void ScrollDown(int from, int to) { GLine top = FindLineOrEdge(from); GLine bottom = FindLineOrEdge(to); int top_id = top.ID; GLine newtop = top.NextLine; if (from == to) { _currentLine = top; _currentLine.Clear(); } else { Remove(top); //_topLineの調整は必要ならここで行われる _currentLine = new GLine(_connection.TerminalWidth); InsertAfter(bottom, _currentLine); //id maintainance GLine c = newtop; GLine end = _currentLine.NextLine; while (c != end) { c.ID = top_id++; c = c.NextLine; } } AssertValid(); _invalidatedAll = true; }
internal void ScrollUp(int from, int to) { GLine top = FindLineOrEdge(from); GLine bottom = FindLineOrEdge(to); if (top == null || bottom == null) { return; //エラーハンドリングはFindLineの中で。ここではクラッシュ回避だけを行う } int bottom_id = bottom.ID; int topline_id = _topLine.ID; GLine nextbottom = bottom.NextLine; if (from == to) { _currentLine = top; _currentLine.Clear(); } else { Remove(bottom); _currentLine = new GLine(_connection.TerminalWidth); InsertBefore(top, _currentLine); GLine c = _currentLine; do { c.ID = from++; c = c.NextLine; } while(c != nextbottom); Debug.Assert(nextbottom == null || nextbottom.ID == from); } /* * //id maintainance * GLine c = newbottom; * GLine end = _currentLine.PrevLine; * while(c != end) { * c.ID = bottom_id--; * c = c.PrevLine; * } */ //!!次の2行はxtermをやっている間に発見して修正。 VT100では何かの必要があってこうなったはずなので後で調べること //if(_scrollingTop<=_topLine.ID && _topLine.ID<=_scrollingBottom) // _topLine = _currentLine; while (topline_id < _topLine.ID) { _topLine = _topLine.PrevLine; } AssertValid(); _invalidatedAll = true; }
internal void ClearRange(int from, int to, TextDecoration dec) { GLine l = FindLineOrEdge(from); if (l == null) { return; } while (l.ID < to) { l.Clear(dec); InvalidateLine(l.ID); l = l.NextLine; } AssertValid(); }
internal void ClearAfter(int from, TextDecoration dec) { if (from > _lastLine.ID) { return; } GLine l = FindLineOrEdge(from); if (l == null) { return; } while (l != null) { l.Clear(dec); l = l.NextLine; } AssertValid(); _invalidatedAll = true; }
internal void ScrollUp(int from, int to) { GLine top = FindLineOrEdge(from); GLine bottom = FindLineOrEdge(to); if(top==null || bottom==null) return; //�G���[�n���h�����O��FindLine�̒��ŁB�����ł̓N���b�V����������s�� int bottom_id = bottom.ID; int topline_id = _topLine.ID; GLine nextbottom = bottom.NextLine; if(from==to) { _currentLine = top; _currentLine.Clear(); } else { Remove(bottom); _currentLine = new GLine(_connection.TerminalWidth); InsertBefore(top, _currentLine); GLine c = _currentLine; do { c.ID = from++; c = c.NextLine; } while(c!=nextbottom); Debug.Assert(nextbottom==null || nextbottom.ID==from); } /* //id maintainance GLine c = newbottom; GLine end = _currentLine.PrevLine; while(c != end) { c.ID = bottom_id--; c = c.PrevLine; } */ //!!���̂Q�s��xterm�����Ă���Ԃɔ������ďC���B VT100�ł͉����̕K�v�������Ă����Ȃ����͂��Ȃ̂Ō�Œ��ׂ邱�� //if(_scrollingTop<=_topLine.ID && _topLine.ID<=_scrollingBottom) // _topLine = _currentLine; while(topline_id<_topLine.ID) _topLine = _topLine.PrevLine; AssertValid(); _invalidatedAll = true; }
internal void ScrollDown(int from, int to) { GLine top = FindLineOrEdge(from); GLine bottom = FindLineOrEdge(to); int top_id = top.ID; GLine newtop = top.NextLine; if(from==to) { _currentLine = top; _currentLine.Clear(); } else { Remove(top); //_topLine�̒����͕K�v�Ȃ炱���ōs���� _currentLine = new GLine(_connection.TerminalWidth); InsertAfter(bottom, _currentLine); //id maintainance GLine c = newtop; GLine end = _currentLine.NextLine; while(c != end) { c.ID = top_id++; c = c.NextLine; } } AssertValid(); _invalidatedAll = true; }