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>) -> SelfOptions
Chain onto the value.
presentation(presentation: DiffPresentation) -> Self
visible_rows(rows: usize) -> Self
on_event(handler: impl Fn(DiffViewEvent, &mut Window, &mut App) + 'static) -> SelfReports
The variants of the event it emits. It never applies the change itself.
- FileActivated
- HunkActivated
- LineActivated
Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.