DimFill.cs 669 B

123456789101112131415161718
  1. #nullable enable
  2. namespace Terminal.Gui;
  3. /// <summary>
  4. /// Represents a dimension that fills the dimension, leaving the specified margin.
  5. /// </summary>
  6. /// <remarks>
  7. /// This is a low-level API that is typically used internally by the layout system. Use the various static
  8. /// methods on the <see cref="Dim"/> class to create <see cref="Dim"/> objects instead.
  9. /// </remarks>
  10. /// <param name="Margin">The margin to not fill.</param>
  11. public record DimFill (Dim Margin) : Dim
  12. {
  13. /// <inheritdoc/>
  14. public override string ToString () { return $"Fill({Margin})"; }
  15. internal override int GetAnchor (int size) { return size - Margin.GetAnchor(0); }
  16. }