ProgressBarDefinition

The cells and configuration for a progress bar layout.

Inheritors

Properties

Link copied to clipboard
abstract val alignColumns: Boolean

How to align the columns of the progress bar when multiple tasks are present.

Link copied to clipboard
abstract val cells: List<ProgressBarCell<T>>

The cells in this layout.

Link copied to clipboard
abstract val spacing: Int

The spacing between cells in this layout.

Functions

Link copied to clipboard
fun ProgressBarDefinition<Unit>.animateOnThread(terminal: Terminal, total: Long? = null, completed: Long = 0, start: Boolean = true, visible: Boolean = true, clearWhenFinished: Boolean = false, speedEstimateDuration: Duration = 30.seconds, timeSource: TimeSource.WithComparableMarks = TimeSource.Monotonic, maker: ProgressBarWidgetMaker = MultiProgressBarWidgetMaker): ThreadProgressTaskAnimator<Unit>

Create a progress bar animation for a single task that runs synchronously.

fun <T> ProgressBarDefinition<T>.animateOnThread(terminal: Terminal, context: T, total: Long? = null, completed: Long = 0, start: Boolean = true, visible: Boolean = true, clearWhenFinished: Boolean = false, speedEstimateDuration: Duration = 30.seconds, timeSource: TimeSource.WithComparableMarks = TimeSource.Monotonic, maker: ProgressBarWidgetMaker = MultiProgressBarWidgetMaker): ThreadProgressTaskAnimator<T>

Create a progress bar animation with a single task that runs synchronously.

Link copied to clipboard
fun <T> ProgressBarDefinition<T>.build(state: ProgressState<T>, maker: ProgressBarWidgetMaker = MultiProgressBarWidgetMaker): Widget

Create a widget for this ProgressBarDefinition with the given state.

fun ProgressBarDefinition<Unit>.build(total: Long?, completed: Long, displayedTime: ComparableTimeMark, status: ProgressState.Status = ProgressState.Status.NotStarted, speed: Double? = null, maker: ProgressBarWidgetMaker = MultiProgressBarWidgetMaker): Widget
fun <T> ProgressBarDefinition<T>.build(context: T, total: Long?, completed: Long, displayedTime: ComparableTimeMark, status: ProgressState.Status = ProgressState.Status.NotStarted, speed: Double? = null, maker: ProgressBarWidgetMaker = MultiProgressBarWidgetMaker): Widget

Create a widget for this ProgressBarDefinition with the given state.

Link copied to clipboard

Cache this progress bar definition so that each cell only updates as often as its fps.