protected BufferedTextFormatProvider(TextBuffer buffer) : base(buffer) { this.lockObject = new object(); this.currentChange = buffer.LastChange; this.data = new List<TextFormatInfo>(); }
void OnBufferChanged(TextBuffer oldBuffer, TextBuffer newBuffer) { if (oldBuffer != null) { oldBuffer.TextDataChanged -= OnBufferTextDataChanged; oldBuffer.Formatter.FormatDataChanged -= OnFormatDataChanged; oldBuffer.Formatter.HighlightRangesChanged -= OnHighlightRangesChanged; oldBuffer.StopObservingUndoRedo(this); } if (newBuffer != null) { newBuffer.TextDataChanged += OnBufferTextDataChanged; newBuffer.Formatter.FormatDataChanged += OnFormatDataChanged; newBuffer.Formatter.HighlightRangesChanged += OnHighlightRangesChanged; newBuffer.ObserveUndoRedo(this); } this.TopVisibleLine = 0; MoveCaret(new TextCoordinate(), false); UpdateLineLayout(true); RefreshHighlightVisuals(true); }
public Pencil(TextBuffer buffer, bool forUndoRedo) { this.buffer = buffer; this.firstChange = null; this.lastChange = null; if (!forUndoRedo) { this.undoUnit = new TextUndoUnit(); } }
public HighlightRange(TextBuffer buffer, TextRange range) { this.Buffer = buffer; this.Range = range; }
protected BufferedTextFormatProvider(TextBuffer buffer) : base(buffer) { this.lockObject = new object(); this.currentChange = buffer.LastChange; this.data = new List <TextFormatInfo>(); }
protected TextFormatProvider(TextBuffer buffer) { this.Buffer = buffer; buffer.TextDataChanged += OnBufferTextDataChanged; }
public TextFormatter(TextBuffer buffer) { this.providers = new List<TextFormatProvider>(); this.highlightRanges = new List<HighlightRange>(); this.Buffer = buffer; }
public TextFormatter(TextBuffer buffer) { this.providers = new List <TextFormatProvider>(); this.highlightRanges = new List <HighlightRange>(); this.Buffer = buffer; }
protected TextFormatProvider(TextBuffer buffer) { this.Buffer = buffer; buffer.TextDataChanged += OnBufferTextDataChanged; }