struct

Tea::View

Inherits Struct < Value < Object

View represents a terminal view that can be composed of multiple layers. In v2-exp, View is a struct with many optional fields.

Constructors

new(content : String)

Create a new view with the given content

Source
new(content : String = "")
Source

Instance methods

alt_screen=(alt_screen : Bool)

AltScreen puts the program in the alternate screen buffer

Source
alt_screen?

AltScreen puts the program in the alternate screen buffer

Source
background_color

BackgroundColor sets terminal background color

Source
background_color=(background_color : Colorful::Color | Nil)

BackgroundColor sets terminal background color

Source
content

Content is the screen content as styled strings with ANSI escape codes

Source
content=(content : String)

Content is the screen content as styled strings with ANSI escape codes

Source
cursor

Cursor represents cursor position, style, and visibility

Source
cursor=(cursor : Cursor | Nil)

Cursor represents cursor position, style, and visibility

Source
disable_bracketed_paste=(disable_bracketed_paste : Bool)

DisableBracketedPasteMode disables bracketed paste

Source
disable_bracketed_paste?

DisableBracketedPasteMode disables bracketed paste

Source
foreground_color

ForegroundColor sets terminal foreground color

Source
foreground_color=(foreground_color : Colorful::Color | Nil)

ForegroundColor sets terminal foreground color

Source
keyboard_enhancements

KeyboardEnhancements requests keyboard enhancement features

Source
keyboard_enhancements=(keyboard_enhancements : KeyboardEnhancements)

KeyboardEnhancements requests keyboard enhancement features

Source
mouse_mode

MouseMode sets the mouse handling mode

Source
mouse_mode=(mouse_mode : MouseMode)

MouseMode sets the mouse handling mode

Source
on_mouse

OnMouse is an optional mouse message handler

Source
on_mouse=(on_mouse : Proc(MouseMsg, Cmd | Nil) | Nil)

OnMouse is an optional mouse message handler

Source
progress_bar

ProgressBar shows a progress bar in the terminal

Source
progress_bar=(progress_bar : ProgressBar | Nil)

ProgressBar shows a progress bar in the terminal

Source
report_focus=(report_focus : Bool)

ReportFocus enables focus/blur message reporting

Source
report_focus?

ReportFocus enables focus/blur message reporting

Source
set_content(content : String) : self

Go parity helper for View.SetContent(). ameba:disable Naming/AccessorMethodName

Source
window_title

WindowTitle sets the terminal window title

Source
window_title=(window_title : String)

WindowTitle sets the terminal window title

Source