DimFill.cs 661 B

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