SizeHint
Namespace: Hex1b.Layout
Assembly: Hex1b.dll
Specifies how a widget wants to be sized along one axis.
public readonly struct SizeHint : IEquatable<SizeHint>Implements
Properties
Content
Size to fit content (intrinsic size).
Returns: SizeHint
public static SizeHint Content { get; }Fill
Fill available space. Multiple Fill children share space equally.
Returns: SizeHint
public static SizeHint Fill { get; }FillWeight
The fill weight (only valid if IsFill is true).
Returns: Int32
public int FillWeight { get; }FixedValue
The fixed size value (only valid if IsFixed is true).
Returns: Int32
public int FixedValue { get; }IsContent
True if this hint requests content-based sizing.
Returns: Boolean
public bool IsContent { get; }IsFill
True if this hint requests filling available space.
Returns: Boolean
public bool IsFill { get; }IsFixed
True if this hint specifies a fixed size.
Returns: Boolean
public bool IsFixed { get; }Methods
Equals(object?)
Indicates whether this instance and a specified object are equal.
Parameters:
obj(Object): The object to compare with the current instance.
Returns: Boolean
true if obj and this instance are the same type and represent the same value; otherwise, false.
public override bool Equals(object? obj)Equals(SizeHint)
Indicates whether the current object is equal to another object of the same type.
Parameters:
other(SizeHint): An object to compare with this object.
Returns: Boolean
true if the current object is equal to the other parameter; otherwise, false.
public bool Equals(SizeHint other)Fixed(int)
Fixed size in characters.
Parameters:
size(Int32):
Returns: SizeHint
public static SizeHint Fixed(int size)GetHashCode()
Returns the hash code for this instance.
Returns: Int32
A 32-bit signed integer that is the hash code for this instance.
public override int GetHashCode()ToString()
Returns the fully qualified type name of this instance.
Returns: String
The fully qualified type name.
public override string ToString()Weighted(int)
Fill available space with a weight. Higher weight = more space.
Parameters:
weight(Int32):
Returns: SizeHint
public static SizeHint Weighted(int weight)Members
operator !=(SizeHint, SizeHint)
Parameters:
Returns: Boolean
public static bool operator !=(SizeHint left, SizeHint right)operator ==(SizeHint, SizeHint)
Parameters:
Returns: Boolean
public static bool operator ==(SizeHint left, SizeHint right)