#nullable enable namespace Terminal.Gui; /// /// Represents a dimension that fills the dimension, leaving the specified margin. /// /// /// This is a low-level API that is typically used internally by the layout system. Use the various static /// methods on the class to create objects instead. /// /// The margin to not fill. public class DimFill (int margin) : Dim { /// public override bool Equals (object? other) { return other is DimFill fill && fill.Margin == Margin; } /// public override int GetHashCode () { return Margin.GetHashCode (); } /// /// Gets the margin to not fill. /// public int Margin { get; } = margin; /// public override string ToString () { return $"Fill({Margin})"; } internal override int GetAnchor (int size) { return size - Margin; } }