Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
			void HandleFolded (object sender, FoldSegmentEventArgs e)
			{
				RequestRedraw ();
			}
Esempio n. 3
0
		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;
			}
		}
Esempio n. 4
0
		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);
		}
Esempio n. 5
0
		internal void InformFoldChanged (FoldSegmentEventArgs args)
		{
			lock (foldSegmentTaskLock) {
				if (foldSegmentTask != null) {
					foldSegmentTask.ContinueWith (delegate {
						Gtk.Application.Invoke (delegate {
							InternalInformFoldChanged (args);	
						});
					});
				} else {
					InternalInformFoldChanged (args);
				}
			}
		}