Expand description
Editor: the whole of editing a program, as one state machine an
editor drives with Commands and draws from the Updates it
answers.
It holds the program, its undo and redo, how far it runs, and the step being edited, and it builds whatever is shown — so an editor keeps no state of its own beyond the camera, renders what it is sent, and sends what the user did.
What it offers is a Registry’s: the operations a step can be, how a
part is drawn and listed, the exporters and inspectors, the panels, the
tools and what settles the program’s state after an edit. None of it is
named here: an editor of a registry of three operations, with no panel
and no settler, edits programs of those three.
The program is the one of a file, among others it may place parts from
(see geop_core_program::workspace): the editor is told the file’s path
with the program (Command::Load), and is sent the other files’
programs whenever they change (Command::Files) — by the front end,
which owns the files, be they a VS Code workspace’s or the browser’s.
Only the file it edits is its own: switching to another, it keeps the
program it leaves as that file’s. What each step shows and does is the
operation’s; see crate::step_editor::StepEditor.
Structs§
- Editor
- Editing a program: see the module docs.
- Editor
Context - The
Editor, as a panel’s command, a tool or a panel told of an edit sees it: the program and what it built, and the few ways they change that the editor keeps track of — so that undo, the marker and the step being edited stay right whatever the extension does. - File
- A program file, as a front end keeps it.
- Placed
Steps - A part a step placed, as the program shows it: what it is placed as —
its path from the program,
neck/headfor one placed in a placed part — from which file, and the steps of that file’s program, each with the parts it places in turn. - Program
State - The program, as shown.
- Report
- What a bug report attaches of an editor’s session (
Command::Report): what the user was doing, as the kernel has it, so that a report says it whether or not the step was committed. - Reported
Step - The step being edited, as a bug report attaches it: what it is, its arguments as its edits leave them, and why it does not build, as its dialog shows it.
- Rerun
- A program, its runner and the part it last ran on: what a solve runs again at every state it tries, the program’s state set to it.
- Scene
State - What is drawn: a part, and which of its sketches and datums not to.
- Step
Info - A step of the program, as a list of steps shows it.
- Step
State - The step being edited, as shown.
- Update
- What an editor shows after a command. What did not change since the last update is left out.