void HandleTextEditorDataDocumentFolded(object sender, FoldSegmentEventArgs e) { int start = OffsetToLineNumber(e.FoldSegment.StartLine.Offset); int end = OffsetToLineNumber(e.FoldSegment.EndLine.Offset); if (e.FoldSegment.IsFolded) { if (e.FoldSegment.Marker != null) { heightTree.Unfold(e.FoldSegment.Marker, start, end - start); } e.FoldSegment.Marker = heightTree.Fold(start, end - start); } else { heightTree.Unfold(e.FoldSegment.Marker, start, end - start); e.FoldSegment.Marker = null; } }
void HandleFolded (object sender, FoldSegmentEventArgs e) { RequestRedraw (); }
void HandleTextEditorDataDocumentFolded (object sender, FoldSegmentEventArgs e) { int start = OffsetToLineNumber (e.FoldSegment.StartLine.Offset); int end = OffsetToLineNumber (e.FoldSegment.EndLine.Offset); if (e.FoldSegment.IsFolded) { if (e.FoldSegment.Marker != null) heightTree.Unfold (e.FoldSegment.Marker, start, end - start); e.FoldSegment.Marker = heightTree.Fold (start, end - start); } else { heightTree.Unfold (e.FoldSegment.Marker, start, end - start); e.FoldSegment.Marker = null; } }
internal void InformFoldChanged (FoldSegmentEventArgs args) { if (args.FoldSegment.IsFolded) { foldedSegments.Add (args.FoldSegment); } else { foldedSegments.Remove (args.FoldSegment); } var handler = Folded; if (handler != null) handler (this, args); }
internal void InformFoldChanged (FoldSegmentEventArgs args) { lock (foldSegmentTaskLock) { if (foldSegmentTask != null) { foldSegmentTask.ContinueWith (delegate { Gtk.Application.Invoke (delegate { InternalInformFoldChanged (args); }); }); } else { InternalInformFoldChanged (args); } } }