class

Tui::View

Inherits Tui::Widget / Tui::Reactive / Reference / Object

Constructors

new(id : String | Nil = nil)
Source

Instance methods

append_content(text : String) : Nil

Append content (override in subclasses)

Source
auto_scroll
Source
auto_scroll=(auto_scroll : Bool)
Source
clear_content

Clear content (override in subclasses)

Source
content_bg

Content area background

Source
content_bg=(content_bg : Color)

Content area background

Source
ensure_visible(line_index : Int32) : Nil

Ensure a specific line is visible

Source
line_count

Total number of lines in content

Source
max_scroll_offset
Source
needs_scrollbar?
Source
on_event(event : Event) : Bool

Override to handle events for this widget (target/bubble phase) Called after children have had a chance to handle the event

Source
page_down
Source
page_up
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
render_line(buffer : Buffer, clip : Rect, y : Int32, line_index : Int32, width : Int32) : Nil

Render a single line at given position @param buffer - render buffer @param clip - clipping rect @param y - screen Y position @param line_index - 0-based line index in content @param width - available width (excluding scrollbar)

Source
scroll_down(lines : Int32 = 1) : Nil
Source
scroll_offset
Source
scroll_offset=(value : Int32)
Source
scroll_to_bottom
Source
scroll_to_top
Source
scroll_up(lines : Int32 = 1) : Nil
Source
scrollbar_focused_color
Source
scrollbar_focused_color=(scrollbar_focused_color : Color)
Source
scrollbar_thumb_char
Source
scrollbar_thumb_char=(scrollbar_thumb_char : Char)
Source
scrollbar_thumb_color
Source
scrollbar_thumb_color=(scrollbar_thumb_color : Color)
Source
scrollbar_track_char
Source
scrollbar_track_char=(scrollbar_track_char : Char)
Source
scrollbar_track_color
Source
scrollbar_track_color=(scrollbar_track_color : Color)
Source
scrollbar_width
Source
scrollbar_width=(scrollbar_width : Int32)
Source
set_content(text : String) : Nil

Set content from string (override in subclasses)

Source
show_scrollbar

Scrollbar styling

Source
show_scrollbar=(show_scrollbar : Bool)

Scrollbar styling

Source
visible_lines
Source