Usage

Requirements

Documentation

Creates an object representing a progress-bar. The keyword arguments customize the appearance of the progress-bar, when it is shown and default to the following values:

fill

#\=

empty

#\space

head

#\>

frame

"[~a~a~a~a|~a]"

max

100

width

60

port

(current-output-port)

end-message

" finished"

[procedure](progress-bar? X)

Returns #t if X is an object representing a progress-bar, or #f otherwise.

[procedure](progress-bar-value PBAR)

Returns the current value of the given progress bar. You can also use SRFI-17 "setter" syntax to modify the current value (causing a redisplay):

(set! (progress-bar-value PBAR) VALUE)

[procedure](show-progress-bar PBAR)

Redisplays the progress-bar PBAR.

[procedure](advance-progress-bar! PBAR [AMOUNT])

Increases the current value of the progress-bar PBAR by AMOUNT, which defaults to 1 and redisplays it.

[procedure](finish-progress-bar! PBAR [CLEAR])

Sets the value of PBAR to the maximum, writes the end-message and prints a newline. The progress-bar should not be reused after this procedure has been called. If CLEAR is given and true, remove the bar.

[procedure](make-spinner #!key value port steps)

Creates an object representing a "spinner" progress-indicator. The keyword arguments customize the appearance of the progress-bar, when it is shown and default to the following values:

steps

"|/-\\"

port

(current-output-port)

[procedure](spinner? X)

Returns #t if X is an object representing a spinner, or #f otherwise.

[procedure](advance-spinner! SPINNER)

Advances the given spinner by 1 step and redisplays it.

[procedure](finish-spinner! SPINNER)

Clears the spinner. It should not be used after this procedure has been called.