class

Tui::ListView(T)

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

Constants

DOUBLE_CLICK_MS = 400

Constructors

new(id : String | Nil = nil, items : Array(T) = [] of T)
Source

Instance methods

hover_style
Source
hover_style=(hover_style : Style)
Source
item_height

Styling

Source
item_height=(item_height : Int32)

Styling

Source
item_renderer

Set custom item renderer

Source
items
Source
items=(items : Array(T))
Source
min_size
Source
normal_style
Source
normal_style=(normal_style : Style)
Source
on_activate

Callback when item is activated (Enter)

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_select

Callback when selection changes

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

Override to render widget content

Source
scroll_offset
Source
scroll_offset=(scroll_offset : Int32)
Source
select_first
Source
select_index(index : Int32) : Nil

Selection methods

Source
select_last
Source
select_next
Source
select_prev
Source
selected_index
Source
selected_index=(selected_index : Int32)
Source
selected_item

Get selected item

Source
selected_style
Source
selected_style=(selected_style : Style)
Source
visible_count

Number of visible items

Source