Expand description
Open documents and their active tab. Each document owns an engine, store
identity, and clean baseline for dirty tracking. Keeping engine access on
Documents allows separate mutable borrows of other app fields.
Every engine has its own history runner and resident kernel state. All open documents are pumped each frame, so switching tabs cannot redirect a pending result to another document. Each open document retains its runner and scene.
Display settings are shared across tabs by [carry_settings]; workbench
selection belongs to each document. A new engine initially inherits the
current workbench, which a loaded document can override.
Structs§
- Document
- ONE open model: the engine that owns it plus the identity the file lane needs — the store name it was opened from / saved to, and the clean baseline.
- Documents
- Every open document + which one is active. Always holds AT LEAST ONE
document: closing the last tab leaves a fresh untitled one in its place, so
Documents::engine_mutis infallible and the shell never has to render a “no document” state that would be an empty viewport with extra steps.
Constants§
- EMPTY_
DOCUMENT - The empty model a New document starts from.
Type Aliases§
- Engine
Factory - Builds a fresh engine for a new document — the platform runner, the viewcube, and the persisted display settings, all applied before anything is loaded into it. Injected by the shell so tests (which need the SYNCHRONOUS inline runner) can construct documents without a background thread.