ClikaRT::progress
namespace
Classes
| Name | Description |
|---|---|
Bar | A lightweight handle to a bar owned by a ProgressGroup. Returned by ProgressGroup::add_bar(); copyable and non-owning (valid while its group lives). Configure it with the fluent setters, then drive it; a bar may be added, configured, and driven at ANY time, including after the group has started rendering other bars (each bar materializes on its own first drive). Driving is safe at every point in the bar's life: a completed bar accepts further set_progress/total/postfix calls. |
ProgressBar | A standalone determinate progress bar over an arbitrary [min, max] range. |
ProgressGroup | Owns and renders several bars as one block: it controls the whole region and its cursor, so parallel bars never interleave or jump. print_above emits a line above the live bars without corrupting them (raw on a terminal; routed through the logger when output isn't a terminal). Writes to stdout. |
Spinner | An indeterminate activity spinner for work with no measurable progress. |
Enumerations
enum Color
enum class Color
Foreground color for a widget. Default keeps the terminal's own color.
| Enumerator | Description |
|---|---|
Default | the terminal's own color |
Black | ANSI black. |
Red | ANSI red. |
Green | ANSI green. |
Yellow | ANSI yellow. |
Blue | ANSI blue. |
Magenta | ANSI magenta. |
Cyan | ANSI cyan. |
White | ANSI white. |
BrightBlack | bright ANSI black (gray) |
BrightRed | bright ANSI red |
BrightGreen | bright ANSI green |
BrightYellow | bright ANSI yellow |
BrightBlue | bright ANSI blue |
BrightMagenta | bright ANSI magenta |
BrightCyan | bright ANSI cyan |
BrightWhite | bright ANSI white |
Declared in ClikaRT/progress/progress.h, line 31
ClikaRT/progress/progress.h
#include <ClikaRT/progress/progress.h>
ClikaRT::progress: terminal progress bars, spinners, and a single-owner multi-bar group with print-above-the-bar logging.
ProgressBar bar;
bar.total(50).prefix("Training").color(Color::Green)
.show_percent().show_eta().show_rate().unit("step");
for (int i = 1; i <= 50; ++i) bar.set_progress(i);
bar.done();
Output auto-disables when it isn't a terminal (piped / redirected), so logs stay clean; rendering never mutates global locale and never throws. Backed by the internal progress engine.
Configure a widget with the fluent setters BEFORE driving it (they take effect on the first draw); then drive it with set_progress() / tick() / done().