using System.Text.Json.Serialization; namespace Terminal.Gui.Drawing; /// /// Defines non-color style flags for an . /// /// /// /// Only a subset of ANSI SGR (Select Graphic Rendition) styles are represented. /// Styles that are poorly supported, non-visual, or redundant with other APIs are omitted. /// /// /// Multiple styles can be combined using bitwise operations. Use /// to get or set these styles on an . /// /// /// Note that and may be mutually exclusive depending on /// the user's terminal and its settings. For instance, if a terminal displays faint text as a darker color, and /// bold text as a lighter color, then both cannot /// be shown at the same time, and it will be up to the terminal to decide which to display. /// /// [Flags] [JsonConverter (typeof (JsonStringEnumConverter))] public enum TextStyle : byte { /// /// No text style. /// /// Corresponds to no active SGR styles. None = 0b_0000_0000, /// /// Bold text. /// /// /// SGR code: 1 (Bold). May be mutually exclusive with , see /// remarks. /// Bold = 0b_0000_0001, /// /// Faint (dim) text. /// /// /// SGR code: 2 (Faint). Not widely supported on all terminals. May be mutually exclusive with /// , see /// remarks. /// Faint = 0b_0000_0010, /// /// Italic text. /// /// SGR code: 3 (Italic). Some terminals may not support italic rendering. Italic = 0b_0000_0100, /// /// Underlined text. /// /// SGR code: 4 (Underline). Underline = 0b_0000_1000, /// /// Slow blinking text. /// /// SGR code: 5 (Slow Blink). Support varies; blinking is often disabled in modern terminals. Blink = 0b_0001_0000, /// /// Reverse video (swaps foreground and background colors). /// /// SGR code: 7 (Reverse Video). Reverse = 0b_0010_0000, /// /// Strikethrough (crossed-out) text. /// /// SGR code: 9 (Crossed-out / Strikethrough). Strikethrough = 0b_0100_0000 }