Crate display

Source
Expand description

Git Interactive Rebase Tool - Display Module

§Description

This module is used to handle working with the terminal display.

use config::Theme;
use display::{CrossTerm, Display, DisplayColor};
let theme = Theme::new();
let tui = CrossTerm::new();
let mut display = Display::new(tui, &theme);

display.start();
display.clear();
display.draw_str("Hello world!");
display.color(DisplayColor::IndicatorColor, false);
display.set_style(false, true, false);
display.draw_str("Hello colorful, underlined world!");
display.refresh();
display.end();

§Test Utilities

To facilitate testing the usages of this crate, a set of testing utilities are provided. Since these utilities are not tested, and often are optimized for developer experience than performance should only be used in test code.

Modules§

testutil
Utilities for writing tests that interact with the display.

Structs§

CrossTerm
A thin wrapper over the Crossterm library.
Display
A high level interface to the terminal display.
Size
Represents a terminal window size.

Enums§

ColorMode
Represents the color mode of a terminal interface.
DisplayColor
An abstraction of colors to display.
DisplayError
A display error.

Traits§

Tui
An interface that describes interactions with a terminal interface.