Vixen
dd8b0a81

Core · guide

Documents, dirty state and save

A document below the editor — dirty, name and location as signals, save and revert answered through the command route by the nearest panel that hosts one, and a window title that follows both.

Edit this page on GitHub

Documents

Next

  • Commands and the focus route — A menu declares what, and the focus decides who — a command id resolved by walking outwards from the focused element and on past the root to the document and the application, so two views can answer the same verb without knowing each other exists and an item nothing handles greys itself out.
  • Undo — A control finds an undo manager on the way up rather than owning one — what the seam is, where a manager is installed, why a run of typing is one entry and not one per keystroke, and why a text field that finds nothing deliberately lets ⌘Z go past it.
  • Running a UI application — UiApplication.Run(options) is the whole of a Vixen interface's Main — a window, a device and the four steps of a frame — and this is what the options say, when the three events fire relative to the layout, and why the loop redraws every frame instead of when something changed.
  • Ambient values — A value provided on an element and found by type from anything inside it — SwiftUI's Environment with the walk written down — so a theme, a selection or a view-model stops being threaded through props by hand.