Skip to main content

Crate tvui

Crate tvui 

Source

Re-exports§

pub use theme::ColorDepth;
pub use theme::DEFAULT_PRESET;
pub use theme::Role;
pub use theme::Theme;

Modules§

keymap
Data-driven key bindings: scope: chord [chord …] = action [arg] lines resolved against the scope chain the application builds.
theme
Named styles for every role the interface draws, read from a theme file.

Structs§

Button
A dialog button; the default one is the one Enter presses.
Caps
What a window can do besides move and close, as TV’s wfGrow, wfZoom and ofTileable.
Chrome
A window’s frame and fill. Icons, number and title are dropped as the rect shrinks. A caller that joins things to the frame lines draws them between the two render steps.
Desktop
The windows back to front: the last is the front (current) one.
Dialog
The frame, shadow and buttons of a modal; the caller renders its body into Dialog::body_area.
DropDown
A framed list with a shadow and a scrollbar when the items exceed the box, rendered in the area dropdown_area gives. The caller owns the [ListState]: the window stays put while the selection moves inside it and scrolls by the minimum past its edges.
FrameState
What the frame shows of a window besides its title.
History
The mark in the last HISTORY_CELLS cells of area; an area narrower than that gets none.
Image
A decoded PNG ready to draw into an area of the size it was built for.
InputLine
The text of a field and the cursor as a character index. Rendering scrolls the Viewport state the least that keeps the character under the cursor between the arrow cells, as TextView does; the terminal cursor itself is placed by the caller at InputLine::cursor.
Label
The text of a field caption, drawn as it is.
MenuBar
One row of menu titles, each padded by a space, the first one column in. The selected title, if any, is drawn in the menu-selected roles.
MenuItem
A drop-down row: the label with its ~X~ mark, the key text on the right, whether it is marked and whether it can be chosen.
MenuPopup
The drop-down under a menu title: a single-line box with a shadow, one item a row, the selected one in the menu-selected roles and the marked ones with a bullet. Rendered with the title’s area as its anchor.
Panel
ParseError
A theme or keymap file problem; line is 1-based and absent for whole-file problems.
Place
RowWindow
StatusBar
Hotkey and label pairs on one row: F1 Help M-x Exit, the key in the status-hotkey role. An item that does not fit the width is left out whole; later, shorter ones still show.
TextView
The lines of a text and the cursor in them as (line, character index). Rendering scrolls the Viewport state the least that keeps the character under the cursor in view, then draws through it; the terminal cursor itself is placed by the caller at TextView::cursor.
Viewport
The first line and first display column shown in the box.
Window
One window of the desktop. The place is where it sits when not zoomed, in screen-absolute cells (TV stores it relative to the desktop): the app draws the desktop at a fixed offset, and place_of limits it against whatever area it is handed.

Enums§

BarPart
A part of a scrollbar a click can land on.
ButtonRow
Where a dialog puts its buttons: centred under a message, or against the bottom right corner of a form.
Change
One step of the size/move mode, in cells.
FrameMode
How a frame is drawn.
ImageBackend
How the picture reaches the terminal.
ImageError

Constants§

ARROW_CELLS
The cells an input line keeps at its two ends for the scroll arrows.
HISTORY_CELLS
The cells the ▐↓▌ history mark of a form select field takes after its input line.

Functions§

changed
from with change applied: the size within min (the area where that is smaller) and the area’s size, then the origin within the limits.
close_area
The [■] close icon; None where none is drawn: a passive or too small window.
copy_visible
Copies to screen the cells of window, drawn at its full size, that visible shows. A wide glyph whose second cell the right edge cuts off is blanked, and so is one on the screen that ends under the left edge, or the diff would skip the window’s first cell.
dropdown_area
The box of rows list rows with its border, anchor wide and left-aligned with it: on the row below anchor, or above it when there is no room below and more above, cut to fit the side chosen. Moved left to stay inside screen.
grow_area
The ─┘ resize mark in the bottom-right corner; None where none is drawn.
hotkey
The letter a ~X~ mark in label names.
inner
The area inside the frame.
joined_title
The title of a window made of name and a tail, such as its ordinal and its filter.
kitty_delete
The kitty command that deletes image id and frees its data.
menu_box
A menu drop-down frame: single-line, no title, in the menu colours.
plain
label without its marks.
range_text
n–m of total for the rows shown of total, counted from zero; nothing without rows.
render_background
Fills area with the desktop background pattern; the windows draw over it.
render_info
Writes info right-aligned into the bottom border of area, clipped inside the corners and short of the resize mark, in the header role.
render_scrollbar
Draws a scrollbar on the right border of area in the TurboVision symbols and the scrollbar roles, for rows rows with view of them shown from row top; nothing when they all fit.
render_viewer
Draws lines and the scrollbar inside the frame of a window drawn in area, from the row scroll holds, which the draw keeps inside the last page.
scrollbar_parts
The parts of the bar render_scrollbar draws for the same area and rows, each with the cells it covers, top to bottom; nothing when the rows all fit.
scrollbar_track
The cells of area’s right border a scrollbar runs along, inside the corners.
title_area
The cells of the title text, centred in the top row; None when no room is left for it.
viewer_size
The window size that shows all of lines whole inside the frame, at least the minimum window size.
zoom_area
The [↑] zoom icon; None where none is drawn.