Skip to content

SizeHint ​

Namespace: Hex1b.Layout

Assembly: Hex1b.dll

Specifies how a widget wants to be sized along one axis.

csharp
public readonly struct SizeHint : IEquatable<SizeHint>

Implements ​

Properties ​

Content ​

Size to fit content (intrinsic size).

Returns: SizeHint

csharp
public static SizeHint Content { get; }

Fill ​

Fill available space. Multiple Fill children share space equally.

Returns: SizeHint

csharp
public static SizeHint Fill { get; }

FillWeight ​

The fill weight (only valid if IsFill is true).

Returns: Int32

csharp
public int FillWeight { get; }

FixedValue ​

The fixed size value (only valid if IsFixed is true).

Returns: Int32

csharp
public int FixedValue { get; }

IsContent ​

True if this hint requests content-based sizing.

Returns: Boolean

csharp
public bool IsContent { get; }

IsFill ​

True if this hint requests filling available space.

Returns: Boolean

csharp
public bool IsFill { get; }

IsFixed ​

True if this hint specifies a fixed size.

Returns: Boolean

csharp
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.

csharp
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.

csharp
public bool Equals(SizeHint other)

Fixed(int) ​

Fixed size in characters.

Parameters:

Returns: SizeHint

csharp
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.

csharp
public override int GetHashCode()

ToString() ​

Returns the fully qualified type name of this instance.

Returns: String

The fully qualified type name.

csharp
public override string ToString()

Weighted(int) ​

Fill available space with a weight. Higher weight = more space.

Parameters:

Returns: SizeHint

csharp
public static SizeHint Weighted(int weight)

Members ​

operator !=(SizeHint, SizeHint) ​

Parameters:

Returns: Boolean

csharp
public static bool operator !=(SizeHint left, SizeHint right)

operator ==(SizeHint, SizeHint) ​

Parameters:

Returns: Boolean

csharp
public static bool operator ==(SizeHint left, SizeHint right)

Released under the MIT License.