Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/progress-indicators|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: egg]] [[toc:]] == progress-indicators === Introduction Shows text-mode progress-indicators. === Usage (require-extension progress-indicators) === Requirements [[defstruct]] === Documentation <procedure>(make-progress-bar #!key fill empty head frame value max width port end-message)</procedure> 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: <table> <tr><td>{{fill}}</td><td>{{#\=}}</td></tr> <tr><td>{{empty}}</td><td>{{#\space}}</td></tr> <tr><td>{{head}}</td><td>{{#\>}}</td></tr> <tr><td>{{frame}}</td><td>{{"[~a~a~a~a|~a]"}}</td></tr> <tr><td>{{max}}</td><td>{{100}}</td></tr> <tr><td>{{width}}</td><td>{{60}}</td></tr> <tr><td>{{port}}</td><td>{{(current-output-port)}}</td></tr> <tr><td>{{end-message}}</td><td>{{" finished"}}</td></tr> </table> <procedure>(progress-bar? X)</procedure> Returns {{#t}} if {{X}} is an object representing a progress-bar, or {{#f}} otherwise. <procedure>(progress-bar-value PBAR)</procedure> 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)</procedure> Redisplays the progress-bar {{PBAR}}. <procedure>(advance-progress-bar! PBAR [AMOUNT])</procedure> Increases the current value of the progress-bar {{PBAR}} by {{AMOUNT}}, which defaults to {{1}} and redisplays it. <procedure>(finish-progress-bar! PBAR [CLEAR])</procedure> 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)</procedure> 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: <table> <tr><td>{{steps}}</td><td>{{"|/-\\"}}</td></tr> <tr><td>{{port}}</td><td>{{(current-output-port)}}</td></tr> </table> <procedure>(spinner? X)</procedure> Returns {{#t}} if {{X}} is an object representing a spinner, or {{#f}} otherwise. <procedure>(advance-spinner! SPINNER)</procedure> Advances the given spinner by 1 step and redisplays it. <procedure>(finish-spinner! SPINNER)</procedure> Clears the spinner. It should not be used after this procedure has been called. === Author [[/users/felix winkelmann|felix winkelmann]] === License This code is placed into the public domain. === Version History ; 0.3 : added missing license information ; 0.2 : added optional "clear" argument to {{finish-progress-bar!}} ; 0.1 : initial release
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you subtract 22 from 9?