コード例 #1
0
        bool SetBackgroundRenderer()
        {
            List <FoldSegment> curFolds = new List <FoldSegment> (foldings);

            if (oldFolds != null && oldFolds.Count == curFolds.Count)
            {
                bool same = true;
                for (int i = 0; i < curFolds.Count; i++)
                {
                    if (oldFolds[i] != curFolds [i])
                    {
                        same = false;
                        break;
                    }
                }

                if (same)
                {
                    timerId = 0;
                    return(false);
                }
            }

            oldFolds = curFolds;
            editor.TextViewMargin.DisposeLayoutDict();
            editor.TextViewMargin.BackgroundRenderer = new FoldingScreenbackgroundRenderer(editor, foldings);
            editor.QueueDraw();
            timerId = 0;
            return(false);
        }
コード例 #2
0
 public void ClearMarkers()
 {
     foreach (HighlightSegmentMarker m in _markers)
         _document.RemoveMarker(m);
     _markers.Clear();
     _editor.QueueDraw();
 }
コード例 #3
0
 public override void Update(MonoTextEditor editor)
 {
     if (RemoveLineCache)
     {
         editor.TextViewMargin.PurgeLayoutCache();
     }
     editor.QueueDraw();
 }
コード例 #4
0
 bool UpdateLineHighlight(int lineNumber, HighlightedLine oldLine, HighlightedLine newLine)
 {
     if (oldLine != null && ShouldUpdateSpan(oldLine, newLine))
     {
         textEditor.TextViewMargin.PurgeLayoutCacheAfter(lineNumber);
         textEditor.QueueDraw();
         HasUpdatedMultilineSpan = true;
         return(false);
     }
     return(true);
 }
コード例 #5
0
 public FoldingScreenbackgroundRenderer(MonoTextEditor editor, IEnumerable <FoldSegment> foldSegments)
 {
     this.editor       = editor;
     this.foldSegments = new List <FoldSegment> (foldSegments);
     startTime         = DateTime.Now;
     timeout           = GLib.Timeout.Add(30, delegate {
         editor.QueueDraw();
         var cont = (DateTime.Now - startTime).TotalMilliseconds < animationLength;
         if (!cont)
         {
             timeout = 0;
         }
         return(cont);
     });
 }
コード例 #6
0
 public override void Update(MonoTextEditor editor)
 {
     editor.QueueDraw();
 }
コード例 #7
0
 void HandleVScroll(object sender, EventArgs e)
 {
     editor.QueueDraw();
 }