visualdynamics.gui.console¶
console
¶
The console: the session as Python, along the bottom of the window.
A tab, not a menu (Brandon, 2026-08-30): the tab announces that the
console exists, sitting collapsed at the bottom edge, and clicking it
is the whole gesture — expand to read, click again to put it away.
It shows project.journal — every verb and settings write of this
sitting as the line that replays it — selectable and copyable, so the
Python-comfortable half of the audience can lift a session straight
into a script while everyone else never has to see it.
Read-only by decision: an input line was designed and dropped (Brandon, 2026-08-30) — the journal's value is copy-out. PLAN.md, "The console".
Classes:
| Name | Description |
|---|---|
ConsolePanel |
The scrollback, and the tab that floats over the views' edge. |
Functions:
| Name | Description |
|---|---|
elided |
A journal line as the console shows it: whole up to |
Classes¶
ConsolePanel
¶
Bases: QWidget
The scrollback, and the tab that floats over the views' edge.
The panel holds only the scrollback, so collapsed it is zero rows
tall — the first cut reserved a full-width strip for the tab and
the empty strip read as a grey bar across the window (Brandon,
2026-08-31). The tab is not in any layout: float_over overlays
it on the bottom edge of whatever the console expands under, the
way a drawer handle sits on the drawer. Nothing built in does
this — Qt's tab widgets are document tabs and the native macOS
drawer is long deprecated — so the handle is placed by hand and
follows its host's resizes.
Methods:
| Name | Description |
|---|---|
float_over |
Overlay the tab on |
refresh |
Bring the scrollback up to date with the session's journal. |
Attributes:
| Name | Type | Description |
|---|---|---|
showing |
bool
|
Whether the scrollback is expanded. |
Source code in src/visualdynamics/gui/console.py
Attributes¶
Methods:¶
float_over
¶
Overlay the tab on host's bottom edge, centred, and keep
it there through resizes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
host
|
QWidget
|
A plain container holding the views and this panel — the tab rides the drawer's top edge like a handle. Never a QSplitter: a splitter adopts any child widget as a new pane, and the first cut's tab became a third panel parked at the right edge. |
required |
Source code in src/visualdynamics/gui/console.py
refresh
¶
Bring the scrollback up to date with the session's journal.
Cheap when nothing changed — one tuple comparison — and a full rewrite when something did, because the journal is allowed to edit its own tail (a drag session settles to one line) and an append-only view would keep the superseded write.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
journal
|
list of str
|
The project's session journal, shown verbatim. |
required |
Source code in src/visualdynamics/gui/console.py
Functions:¶
elided
¶
A journal line as the console shows it: whole up to
SHOWN_CHARACTERS, else its head and how long it really is.