Table of Contents

Constructor StyledSegment

Namespace
Terminal.Gui.Drawing
Assembly
Terminal.Gui.dll

StyledSegment(string, MarkdownStyleRole, string?, string?, Attribute?)

Initializes a new StyledSegment.

public StyledSegment(string text, MarkdownStyleRole styleRole, string? url = null, string? imageSource = null, Attribute? attribute = null)

Parameters

text string

The display text of the segment.

styleRole MarkdownStyleRole

The semantic role that controls rendering style.

url string

Optional hyperlink URL. null for non-link segments.

imageSource string

Optional image source path. null for non-image segments.

attribute Attribute?

Optional explicit Attribute. When non-null, this attribute is used directly for rendering, bypassing the StyleRole-based resolution in GetAttributeForSegment(View, StyledSegment, ISyntaxHighlighter, Color?).