class

Tui::ScrollArea

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

Constructors

new(id : String | Nil = nil)
Source

Instance methods

content_height
Source
content_height=(content_height : Int32)
Source
content_width

Content dimensions (set by content widget or manually)

Source
content_width=(content_width : Int32)

Content dimensions (set by content widget or manually)

Source
ensure_visible(x : Int32, y : Int32, width : Int32 = 1, height : Int32 = 1) : Nil

Ensure a position is visible

Source
h_policy
Source
h_policy=(h_policy : ScrollBarPolicy)
Source
h_scrollbar
Source
max_scroll_x

Max scroll values

Source
max_scroll_y
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
on_scroll
Source
page_down
Source
page_left
Source
page_right
Source
page_up
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
scroll_by(dx : Int32, dy : Int32) : Nil
Source
scroll_to(x : Int32, y : Int32) : Nil

Scroll methods

Source
scroll_to_bottom
Source
scroll_to_left
Source
scroll_to_right
Source
scroll_to_top
Source
scroll_x

Scroll position

Source
scroll_x=(scroll_x : Int32)

Scroll position

Source
scroll_y
Source
scroll_y=(scroll_y : Int32)
Source
show_h_scrollbar?
Source
show_v_scrollbar?

Check if scrollbars should be shown

Source
thumb_active_color=(color : Color)
Source
thumb_color=(color : Color)
Source
track_color=(color : Color)

Colors (delegated to scrollbars)

Source
update_content_size(width : Int32, height : Int32) : Nil

Update content size (call when content changes)

Source
v_policy
Source
v_policy=(v_policy : ScrollBarPolicy)
Source
v_scrollbar

Getters for scrollbars (for customization)

Source
viewport_height
Source
viewport_width

Viewport dimensions (visible area minus scrollbars)

Source

Nested types