Class Line
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
A single line of styled spans.
[SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Spans or a string: the first parameter's type picks the constructor, so calls are never ambiguous.")]
public sealed record Line : IEquatable<Line>
- Inheritance
-
Line
- Implements
- Inherited Members
Constructors
Line(IReadOnlyList<Span>, Alignment)
A single line of styled spans.
public Line(IReadOnlyList<Span> Spans, Alignment Alignment = Alignment.Left)
Parameters
SpansIReadOnlyList<Span>The spans, drawn left to right.
AlignmentAlignmentAlignment used by widgets that lay out lines, such as Paragraph.
Line(string, Style)
A line with a single span.
[SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Spans or a string: the first parameter's type picks the constructor, so calls are never ambiguous.")]
public Line(string content, Style style = default)
Parameters
Properties
Alignment
Alignment used by widgets that lay out lines, such as Paragraph.
public Alignment Alignment { get; init; }
Property Value
Spans
The spans, drawn left to right.
public IReadOnlyList<Span> Spans { get; init; }
Property Value
Width
Display width in columns.
public int Width { get; }
Property Value
Operators
implicit operator Line(string)
An unstyled line.
public static implicit operator Line(string s)
Parameters
sstring