// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Text.RegularExpressions; namespace ICSharpCode.AvalonEdit.Highlighting { /// /// A highlighting span is a region with start+end expression that has a different RuleSet inside /// and colors the region. /// [Serializable] public class HighlightingSpan { /// /// Gets/Sets the start expression. /// public Regex StartExpression { get; set; } /// /// Gets/Sets the end expression. /// public Regex EndExpression { get; set; } /// /// Gets/Sets the rule set that applies inside this span. /// public HighlightingRuleSet RuleSet { get; set; } /// /// Gets the color used for the text matching the start expression. /// public HighlightingColor StartColor { get; set; } /// /// Gets the color used for the text between start and end. /// public HighlightingColor SpanColor { get; set; } /// /// Gets the color used for the text matching the end expression. /// public HighlightingColor EndColor { get; set; } /// public override string ToString() { return "[" + GetType().Name + " Start=" + StartExpression + ", End=" + EndExpression + "]"; } } }