gpui-kit GitHub

Components

TransportBar builder

A transport for one piece of media.

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

use gpui_kit::content::TransportBar;

Construct

new(ident: impl Into<Ident>) -> Self

Options

Chain onto the value.

label(label: impl Into<SharedString>) -> Self
state(state: TransportState) -> Self
position(seconds: f32) -> Self
duration(seconds: f32) -> Self
unknown_duration() -> Self
elapsed(elapsed: impl Into<SharedString>) -> Self
remaining(remaining: impl Into<SharedString>) -> Self
buffered(ranges: impl IntoIterator<Item = BufferedRange>) -> Self
volume(volume: f32) -> Self
muted(muted: bool) -> Self
speeds(speeds: impl IntoIterator<Item = f32>, current: f32) -> Self
step_seconds(seconds: f32) -> Self
has_previous(has_previous: bool) -> Self
has_next(has_next: bool) -> Self
on_event(handler: impl Fn(&TransportEvent, &mut Window, &mut App) + 'static) -> Self

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/transport.rs