Skip to main content

Module interactive

Module interactive 

Source
Expand description

Full-screen terminal views (feature tui), and line prompts for when there is no terminal.

Open a view only when tui_available; otherwise fall back to text.

The views run in a legume-tui session (TOOL): a command opens it first thing and hands it to ui::Tui or ui::run_screen_in; where the session is hosted, the command keeps running when the connection drops. ui::run_screen runs a view in a plain session of its own (legume_tui::Session::plain).

Modules§

cutoff_tui
Full-screen nnz cutoff picker for squeeze --interactive.
stat_tui
Full-screen explorer for per-row and per-column statistics.
ui
Shared pieces of the full-screen views: the palette, panels, header and help lines, the event loop, histogram scales and binning, and a histogram plot with a y gutter, an x axis, and markers.

Enums§

UserAction
User action after viewing histogram or other interactive prompts

Constants§

TOOL
The tool data-beans’ sessions belong to: they are named data-beans-squeeze-1, data-beans-stat-2, and data-beans attach finds them.

Functions§

confirm
Simple yes/no confirmation prompt
prompt_user_action
Prompt user for action in interactive mode after showing histogram
session_help
The paragraph a command’s long help ends with about its session: lead first, for a command whose view is optional (when it runs as a session), then how it runs, the detach and switch keys, how to return, and more at the end. Its views are always opened on something named, so a new start never offers the live sessions; data-beans attach does.
session_keys
The detach and switch keys for a title bar (ui::title_bar), each with what it does in a word (detach, switch); none when the views run plain.
tui_available
Whether a full-screen session can run: both stdin and stdout are a terminal. Otherwise callers fall back to the line prompts below.