GPUI Box GitHub

Components

DiffView builder

A virtualized, read-only diff presentation.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::content::DiffView;

Construct

new(ident: impl Into<Ident>, files: impl IntoIterator<Item = DiffFile>) -> Self

Options

Chain onto the value.

presentation(presentation: DiffPresentation) -> Self
visible_rows(rows: usize) -> Self
on_event(handler: impl Fn(DiffViewEvent, &mut Window, &mut App) + 'static) -> Self

Reports

The variants of the event it emits. It never applies the change itself.

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/content/diff_view.rs