Paragraph Class
A paragraph of text where different parts
of the paragraph can have individual styling.
[DebuggerDisplay("{_text,nq}")]
public sealed class Paragraph : Renderable, IRenderable, IAlignable, IOverflowable
- Namespace
- Spectre
.Console - Interfaces
- Base Types
Attributes
-
Debugger
Display Attribute
Constructors
-
Paragraph
() -
Initializes a new instance of the
Paragraph
class. -
Paragraph
(string, Style) -
Initializes a new instance of the
Paragraph
class.
Properties
Methods
-
Paragraph Append
(string, Style) - Appends some text to this paragraph.
-
protected override Measurement Measure
(RenderContext, int) - Measures the renderable object.
-
protected override IEnumerable<Segment> Render
(RenderContext, int) - Renders the object.
Extension Methods
-
T Alignment
<Paragraph> (Justify?) -
Sets the alignment for an
IAlignable
object. -
T Centered
<Paragraph> () -
Sets the
IAlignable
object to be centered. -
T Crop
<Paragraph> () - Crops any overflowing text.
-
T Ellipsis
<Paragraph> () - Crops any overflowing text and adds an ellipsis to the end.
-
T Fold
<Paragraph> () - Folds any overflowing text.
-
IEnumerable<Segment> GetSegments
(IAnsiConsole) - Gets the segments for a renderable using the specified console.
-
T LeftAligned
<Paragraph> () -
Sets the
IAlignable
object to be left aligned. -
T Overflow
<Paragraph> (Overflow) - Sets the overflow strategy.
-
T RightAligned
<Paragraph> () -
Sets the
IAlignable
object to be right aligned.