internal void Redraw(FoldingSection fs) { foreach (TextView textView in textViews) textView.Redraw(fs); }
/// <summary> /// Creates a folding for the specified text section. /// </summary> public FoldingSection CreateFolding(int startOffset, int endOffset) { if (startOffset >= endOffset) throw new ArgumentException("startOffset must be less than endOffset"); if (startOffset < 0 || endOffset > document.TextLength) throw new ArgumentException("Folding must be within document boundary"); FoldingSection fs = new FoldingSection(this, startOffset, endOffset); foldings.Add(fs); Redraw(fs); return fs; }
/// <summary> /// Removes a folding section from this manager. /// </summary> public void RemoveFolding(FoldingSection fs) { if (fs == null) throw new ArgumentNullException("fs"); fs.IsFolded = false; foldings.Remove(fs); Redraw(fs); }
public FoldingLineElement(FoldingSection fs, TextLine text, int documentLength) : base(text, documentLength) { this.fs = fs; }