PrettyBox¶
- class madspace.PrettyBox(self: madspace._madspace_py.PrettyBox, title: str, rows: SupportsInt, columns: collections.abc.Sequence[SupportsInt], offset: SupportsInt = 0, box_width: SupportsInt = 91)¶
Bases:
pybind11_objectFixed-layout text table redrawn in place on the terminal.
Used for the live progress display during event generation (
Verbosity::pretty). print_first draws the initial box; print_update moves the cursor back up and repaints the same lines, so the box appears to update rather than scroll.- Parameters:
title – Text shown in the top border.
rows – Number of content rows.
column_sizes – Width of each column, in characters.
offset – Extra blank lines printed above the box.
box_width – Total box width, in characters.
- property line_count¶
Number of terminal lines the box occupies, including its borders.
- print_first(self: madspace._madspace_py.PrettyBox) None¶
Draw the box for the first time.
- print_update(self: madspace._madspace_py.PrettyBox) None¶
Redraw the box in place with the current cell contents.
- set_cell(self: madspace._madspace_py.PrettyBox, row: SupportsInt, column: SupportsInt, value: str) None¶
Set a single cell.
- set_column(self: madspace._madspace_py.PrettyBox, column: SupportsInt, values: collections.abc.Sequence[str]) None¶
Set every cell of
column.
- set_row(self: madspace._madspace_py.PrettyBox, row: SupportsInt, values: collections.abc.Sequence[str]) None¶
Set every cell of
row.