View represents a terminal view that can be composed of multiple layers.
In v2-exp, View is a struct with many optional fields.
Constructors
Create a new view with the given content
SourceInstance methods
alt_screen=(alt_screen :
Bool)
AltScreen puts the program in the alternate screen buffer
Sourcealt_screen?
AltScreen puts the program in the alternate screen buffer
Sourcebackground_color
BackgroundColor sets terminal background color
Sourcebackground_color=(background_color : Colorful::Color | Nil)
BackgroundColor sets terminal background color
Sourcecontent
Content is the screen content as styled strings with ANSI escape codes
SourceContent is the screen content as styled strings with ANSI escape codes
Sourcecursor
Cursor represents cursor position, style, and visibility
Sourcecursor=(cursor : Cursor | Nil)
Cursor represents cursor position, style, and visibility
Sourcedisable_bracketed_paste=(disable_bracketed_paste :
Bool)
DisableBracketedPasteMode disables bracketed paste
Sourcedisable_bracketed_paste?
DisableBracketedPasteMode disables bracketed paste
Sourceforeground_color
ForegroundColor sets terminal foreground color
Sourceforeground_color=(foreground_color : Colorful::Color | Nil)
ForegroundColor sets terminal foreground color
Sourcekeyboard_enhancements
KeyboardEnhancements requests keyboard enhancement features
Sourcekeyboard_enhancements=(keyboard_enhancements : KeyboardEnhancements)
KeyboardEnhancements requests keyboard enhancement features
Sourcemouse_mode
MouseMode sets the mouse handling mode
Sourcemouse_mode=(mouse_mode : MouseMode)
MouseMode sets the mouse handling mode
Sourceon_mouse
OnMouse is an optional mouse message handler
Sourceon_mouse=(on_mouse :
Proc(
MouseMsg,
Cmd |
Nil) |
Nil)
OnMouse is an optional mouse message handler
Sourceprogress_bar
ProgressBar shows a progress bar in the terminal
Sourceprogress_bar=(progress_bar : ProgressBar | Nil)
ProgressBar shows a progress bar in the terminal
Sourcereport_focus=(report_focus :
Bool)
ReportFocus enables focus/blur message reporting
Sourcereport_focus?
ReportFocus enables focus/blur message reporting
Sourceset_content(content :
String) : self
Go parity helper for View.SetContent().
ameba:disable Naming/AccessorMethodName
Sourcewindow_title
WindowTitle sets the terminal window title
Sourcewindow_title=(window_title :
String)
WindowTitle sets the terminal window title
Source