module
Swarmy::Views
Extended Modules
Defined in:
swarmy/views.crInstance Method Summary
- #columns : Array(Tui::Table::Column)
-
#filter_badge(filter : String | Nil, hint_color : String) : String
Renders the "· filter: x" badge shown next to the service count when a filter is active, or "" when there is none.
- #header(table : Tui::Table) : String
- #row_cells(svc : Service) : Array(String)
-
#scroll_window(total : Int32, cursor : Int32, visible : Int32) : Tuple(Int32, Int32)
Computes the [first, last) row range to render so that cursor stays visible within a window of visible rows out of total, scrolling only as needed (keeps the cursor centered once it outgrows the top or bottom edge) rather than jumping straight to either end.
-
#search_prompt(buffer : String, key_color : String, hint_color : String) : String
Renders the inline "/query any key applies esc cancels" prompt shown while editing the filter.
- #server_columns : Array(Tui::Table::Column)
- #server_row(table : Tui::Table, name : String, hint : String, active : Bool, selected : Bool) : String
- #server_table(rows : Array(Array(String)), term_width : Int32) : Tui::Table
- #service_detail(svc : Service, tasks : Array(Task), running : Array(Task), task_cursor : Int32, width : Int32 = 60) : String
- #service_row(table : Tui::Table, svc : Service, selected : Bool) : String
- #table(services : Array(Service), term_width : Int32) : Tui::Table
Instance Method Detail
Renders the "· filter: x" badge shown next to the service count when a filter is active, or "" when there is none.
Computes the [first, last) row range to render so that cursor stays visible within a window of visible rows out of total, scrolling only as needed (keeps the cursor centered once it outgrows the top or bottom edge) rather than jumping straight to either end.
Renders the inline "/query any key applies esc cancels" prompt shown while editing the filter.