コード例 #1
0
 internal void Redraw(FoldingSection fs)
 {
     foreach (TextView textView in textViews)
         textView.Redraw(fs);
 }
コード例 #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;
 }
コード例 #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);
 }
コード例 #4
0
 public FoldingLineElement(FoldingSection fs, TextLine text, int documentLength)
     : base(text, documentLength)
 {
     this.fs = fs;
 }