Skip to content

Renderer Code Intro

Tom Clarke edited this page May 29, 2018 · 1 revision

The renderer uses something quite close to a model-view-update web framework - although it is not wholeheartedly this and could with benefit be rewritten using Fable.Elmish.

The renderer code runs under the electron renderer process, communicating with the electron main process where this is needed.

File Content Notes
Refs Mini-DSL to create DOM structures. References to DOM elements, related functions, mutable variables holding renderer current state Mutable state should be rationalised and modelled correctly with D.U.s
Tabs Maintain editor file views and tabs This is not nice, largely due to assorted tab-specific info stored in DOM
Editors Interaction with Monaco editor instances, e.g. error highlighting
Settings Settings Tab, and mechanism to make settings persistent Should be cleaned up with fewer repeated copies of settings. this however is not trivial
Views All the HTML dynamically generated in RH view pane May need to revisit when this is redrawn, since this can take a long time
Files File loading and saving via Electron remote fs dialogs
MenuBar Electron menus
Integration How the GUI drives the emulator. This is quite complex in order to allow fast stepping and fast execution of very long programs. The code is quite well sorted.
Tests Run automatic tests from files of random sample data VisualRandomTestGen will generate suitable files. Some fast tests are used as a normal sanity check that emulator is working and run from electron help menu
Renderer Top-level events from buttons etc that drive renderer execution. Init function for renderer.
Clone this wiki locally