Unit CastleProgressConsole

Description

Progress bar displayed on console (actually, on StdErr).

You can assign ProgressConsoleInterface to Progress.UserInterface, like

Progress.UserInterface := ProgressConsoleInterface;

and then all progress bars will be displayed on console.

This displays a title surrounded by [] characters and the progress is indicated by displaying dots. This way we visualize progress incrementing from 0 to 100%, and at the same time we use only normal streaming I/O on StdErr. Totally no console/terminal specific operations, no special codes, no Crt / Curses unit's used etc. So this unit doesn't create any terminal compatibility problems, doesn't mess standard input/output/error streams etc.

The only restriction is that you should not output anything (on stdout and stderr) to not mess the displayed progress bar. Of course, the worse that will happen is that the progress bar will stop looking good for user, nothing more.

If you really want a progress bar that uses your terminal capabilities see ProgressVideo unit, that displays progress on terminal by FPC's Video unit.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class TProgressConsoleInterface  

Variables

ProgressConsoleInterface: TProgressConsoleInterface;

Description

Variables

ProgressConsoleInterface: TProgressConsoleInterface;

Assign this to Progress.UserInterface to use console progress bar. This instance is created in initialization, freed in finalization.


Generated by PasDoc 0.16.0.