using Annulus;
using Azimuth;
using Prism;
namespace Glass.Blacklight
{
///
/// A filled rectangle with rounded corners and an outline, drawn as vector art.
///
public record RoundedRectMaterial : Material
{
public Color FillColor { get; init; }
public Color OutlineColor { get; init; }
public Scalar CornerRadius { get; init; } = 6;
public Scalar OutlineWidth { get; init; } = 1;
///
/// Gets the size it wants to be when nothing around it asks for more, such as a button with no content to fit.
///
public Vector Size { get; init; }
protected override Vector PreferredSizeInModelSpace(Constraints constraints)
{
return Vector.Max(Size, base.PreferredSizeInModelSpace(constraints));
}
}
///
/// A circle with an outline, and a dot in the middle when it is checked. Its size is its diameter.
///
public record RadioIndicatorMaterial : Material
{
public Color FillColor { get; init; }
public Color OutlineColor { get; init; }
public Color DotColor { get; init; }
public bool IsChecked { get; init; }
public Scalar Diameter { get; init; } = 16;
public Scalar OutlineWidth { get; init; } = 1.5;
protected override Vector PreferredSizeInModelSpace(Constraints constraints)
{
return new Vector(Diameter, Diameter);
}
}
///
/// A rounded rectangle with an outline and a chevron in it, which points up or down.
///
public record ArrowIndicatorMaterial : Material
{
public Color FillColor { get; init; }
public Color OutlineColor { get; init; }
public Color ArrowColor { get; init; }
public bool PointsUp { get; init; }
public Scalar Width { get; init; } = 16;
public Scalar Height { get; init; } = 10;
protected override Vector PreferredSizeInModelSpace(Constraints constraints)
{
return new Vector(Width, Height);
}
}
///
/// A rounded square with an outline, and a tick in it when it is checked. Its size is its side.
///
public record CheckIndicatorMaterial : Material
{
public Color FillColor { get; init; }
public Color OutlineColor { get; init; }
public Color TickColor { get; init; }
public bool IsChecked { get; init; }
public Scalar Side { get; init; } = 16;
public Scalar OutlineWidth { get; init; } = 1.5;
protected override Vector PreferredSizeInModelSpace(Constraints constraints)
{
return new Vector(Side, Side);
}
}
}