enum Termisu::Attribute

Overview

Text attributes for terminal cells.

Attributes can be combined using bitwise OR (|). Multiple attributes are supported, but only one color can be set per foreground/background.

Example:

attr = Termisu::Attribute::Bold | Termisu::Attribute::Underline

Defined in:

termisu/attribute.cr

Enum Members

None = 0_u16

No attributes

Bold = 1_u16

Bold/bright text

Underline = 2_u16

Underlined text (not supported on all terminals)

Reverse = 4_u16

Reverse video (swap fg/bg colors)

Blink = 8_u16

Blinking text

Dim = 16_u16

Dim/faint text

Cursive = 32_u16

Italic/cursive text (not supported on all terminals)

Italic = 32_u16

Alias for Cursive (more common name)

Hidden = 64_u16

Hidden/invisible text

Strikethrough = 128_u16

Strikethrough text (crossed-out)

All = 255_u16

Instance Method Summary

Instance Method Detail

def blink? #

Returns true if this enum value contains Blink


[View source]
def bold? #

Returns true if this enum value contains Bold


[View source]
def cursive? #

Returns true if this enum value contains Cursive


[View source]
def dim? #

Returns true if this enum value contains Dim


[View source]
def hidden? #

Returns true if this enum value contains Hidden


[View source]
def italic? #

Returns true if this enum value contains Italic


[View source]
def none? #

Returns true if this enum value contains None


[View source]
def reverse? #

Returns true if this enum value contains Reverse


[View source]
def strikethrough? #

Returns true if this enum value contains Strikethrough


[View source]
def underline? #

Returns true if this enum value contains Underline


[View source]