class

Tui::SelectionList(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

checkbox_style
Source
checkbox_style=(checkbox_style : Style)
Source
cursor_first
Source
cursor_index
Source
cursor_index=(cursor_index : Int32)
Source
cursor_last
Source
cursor_next
Source
cursor_prev
Source
cursor_style
Source
cursor_style=(cursor_style : Style)
Source
deselect_all
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
move_cursor(index : Int32) : Nil

Cursor movement

Source
normal_style
Source
normal_style=(normal_style : Style)
Source
on_activate

Callback when Enter is pressed (returns all selected items)

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_selection_change

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_all
Source
select_range(from : Int32, to : Int32) : Nil
Source
selected?(index : Int32) : Bool

Check if item is selected

Source
selected_indices
Source
selected_indices=(selected_indices : Set(Int32))
Source
selected_items

Get selected items

Source
selected_style
Source
selected_style=(selected_style : Style)
Source
toggle_current
Source
toggle_selection(index : Int32) : Nil

Selection methods

Source
visible_count

Number of visible items

Source