Esempio n. 1
0
 internal void Redraw(FoldingSection fs)
 {
     foreach (TextView textView in textViews)
         textView.Redraw(fs);
 }
Esempio n. 2
0
 /// <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;
 }
Esempio n. 3
0
 /// <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;
 }