|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows;
namespace CodeBoxControl.Decorations
{
/// <summary>
/// Abstract base class for decorations
/// </summary>
public abstract class Decoration:DependencyObject
{
/// <summary>
/// EDecoration Type of the decoration , Default is TextColor
/// </summary>
public static DependencyProperty DecorationTypeProperty = DependencyProperty.Register("DecorationType", typeof(EDecorationType), typeof(Decoration),
new PropertyMetadata(EDecorationType.TextColor));
public EDecorationType DecorationType
{
get { return (EDecorationType)GetValue(DecorationTypeProperty); }
set { SetValue(DecorationTypeProperty, value); }
}
/// <summary>
/// Brushed used for the decoration
/// </summary>
public static DependencyProperty BrushProperty = DependencyProperty.Register("Brush", typeof(Brush), typeof(Decoration),
new PropertyMetadata(null));
public Brush Brush
{
get { return (Brush)GetValue(BrushProperty); }
set { SetValue(BrushProperty, value); }
}
public abstract List<Pair> Ranges(string Text);
public abstract bool AreRangesSorted{get;}
public bool IsDirty { get; protected set; }
public Decoration()
{
IsDirty = true;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Written software for what seems like forever. I'm currenly infatuated with WPF. Hopefully my affections are returned.