#nullable enable using System.Drawing; namespace Terminal.Gui.Text; /// /// Interface for text formatting. Separates formatting concerns from rendering. /// public interface ITextFormatter { /// Gets or sets the text to be formatted. string Text { get; set; } /// Gets or sets the size constraint for formatting. Size? ConstrainToSize { get; set; } /// Gets or sets the horizontal text alignment. Alignment Alignment { get; set; } /// Gets or sets the vertical text alignment. Alignment VerticalAlignment { get; set; } /// Gets or sets the text direction. TextDirection Direction { get; set; } /// Gets or sets whether word wrap is enabled. bool WordWrap { get; set; } /// Gets or sets whether multi-line text is allowed. bool MultiLine { get; set; } /// Gets or sets the HotKey specifier character. Rune HotKeySpecifier { get; set; } /// Gets or sets the tab width. int TabWidth { get; set; } /// Gets or sets whether trailing spaces are preserved in word-wrapped lines. bool PreserveTrailingSpaces { get; set; } /// /// Formats the text and returns the formatted result. /// /// The formatted text result containing lines, size, and metadata. FormattedText Format(); /// /// Gets the size required to display the formatted text. /// /// The size required for the formatted text. Size GetFormattedSize(); }