#nullable enable
namespace Terminal.Gui;
///
/// Represents a dimension that is a fixed size.
///
///
///
/// 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.
///
///
///
public class DimAbsolute (int size) : Dim
{
///
public override bool Equals (object? other) { return other is DimAbsolute abs && abs.Size == Size; }
///
public override int GetHashCode () { return Size.GetHashCode (); }
///
/// Gets the size of the dimension.
///
public int Size { get; } = size;
///
public override string ToString () { return $"Absolute({Size})"; }
internal override int GetAnchor (int size) { return Size; }
internal override int Calculate (int location, int superviewContentSize, View us, Dimension dimension)
{
return Math.Max (GetAnchor (0), 0);
}
}