MultiProgressBarAnimation

class MultiProgressBarAnimation(val terminal: Terminal, clearWhenFinished: Boolean = false, speedEstimateDuration: Duration = 30.seconds, maker: ProgressBarWidgetMaker = MultiProgressBarWidgetMaker, timeSource: TimeSource.WithComparableMarks = TimeSource.Monotonic) : RefreshableAnimation, ProgressBarAnimation

Constructors

Link copied to clipboard
constructor(terminal: Terminal, clearWhenFinished: Boolean = false, speedEstimateDuration: Duration = 30.seconds, maker: ProgressBarWidgetMaker = MultiProgressBarWidgetMaker, timeSource: TimeSource.WithComparableMarks = TimeSource.Monotonic)

Properties

Link copied to clipboard
open override val finished: Boolean

true if this animation has finished and should be stopped or cleared.

Link copied to clipboard
open override val fps: Int

The rate, in Hz, that this animation should be refreshed, or 0 if it should not be refreshed automatically.

Link copied to clipboard

The time between refreshes. This is 1 / refreshRate

Link copied to clipboard

The terminal to render the animation to

Functions

Link copied to clipboard
open override fun <T> addTask(definition: ProgressBarDefinition<T>, context: T, total: Long?, completed: Long, start: Boolean, visible: Boolean): ProgressTask<T>

Add a new task to the progress bar with the given definition and context.

Link copied to clipboard
fun ProgressBarAnimation.addTask(definition: ProgressBarDefinition<Unit>, total: Long? = null, completed: Long = 0, start: Boolean = true, visible: Boolean = true): ProgressTask<Unit>

Add a new task to the progress bar with the given definition.

Link copied to clipboard

Create an animator that runs this animation synchronously.

Link copied to clipboard
open override fun clear()

Stop this animation and remove it from the screen.

Link copied to clipboard
open override fun refresh(refreshAll: Boolean)

Draw the animation to the screen.

Link copied to clipboard
open override fun removeTask(taskId: TaskId): Boolean

Remove a task with the given taskId from the progress bar.

Link copied to clipboard

Remove a task from the progress bar.

Link copied to clipboard
open override fun stop()

Stop this animation without removing it from the screen.