TimelineState

Where the timeline sits, and the geometry that follows from it.

scale and grid are derived from zoom and follow it wherever it moves, so a zoom change is enough to move the ruler, the strip and every overlay reading them without rebuilding this holder. listState is the strip's own scroll state, and scrollPx turns it into the content pixel offset the ruler and the overlays place themselves against.

Built by rememberTimelineState.

Properties

Link copied to clipboard

Which source times the strip's tiles sit at, at scale.

Link copied to clipboard

The strip's scroll state.

Link copied to clipboard

The time to pixel mapping at zoom.

Link copied to clipboard

How far in the timeline is drawn.

Functions

Link copied to clipboard

How far the strip has scrolled, in content pixels.

Link copied to clipboard
suspend fun zoomIn(focusViewportPx: Float)

Moves one step in on the ladder, holding the timeline time under focusViewportPx still.

Link copied to clipboard
suspend fun zoomOut(focusViewportPx: Float)

Moves one step out on the ladder, holding the timeline time under focusViewportPx still.

Link copied to clipboard
suspend fun zoomTo(zoom: TimelineZoom, focusViewportPx: Float)

Moves to zoom, holding the timeline time under focusViewportPx still.