@@ -54,15 +54,40 @@ A `Document` ties together the `Rope`, `Selection`(s), `Syntax`, document
56A `View` represents an open split in the UI. It holds the currently open
56A `View` represents an open split in the UI. It holds the currently open
57−document ID and other related state.
57+document ID and other related state. Views encapsulate the gutter, status line,
58+diagnostics, and the inner area where the code is displayed.
59> NOTE: Multiple views are able to display the same document, so the document
60> NOTE: Multiple views are able to display the same document, so the document
60> contains selections for each view. To retrieve, `document.selection()` takes
61> contains selections for each view. To retrieve, `document.selection()` takes
61> a `ViewId`.
62> a `ViewId`.
64+`Info` is the autoinfo box that shows hints when awaiting another key with bindings
65+like `g` and `m`. It is attached to the viewport as a whole.
67+`Surface` is like a buffer to which widgets draw themselves to, and the
68+surface is then rendered on the screen on each cycle.
70+`Rect`s are areas (simply an x and y coordinate with the origin at the
71+screen top left and then a height and width) which are part of a
72+`Surface`. They can be used to limit the area to which a `Component` can
73+render. For example if we wrap a `Markdown` component in a `Popup`
74+(think the documentation popup with space+k), Markdown's render method
75+will get a Rect that is the exact size of the popup.
77+Widgets are called `Component`s internally, and you can see most of them
78+in `helix-term/src/ui`. Some components like `Popup` and `Overlay` can take
79+other components as children.
81+`Layer`s are how multiple components are displayed, and is simply a
82+`Vec<Component>`. Layers are managed by the `Compositor`. On each top
83+level render call, the compositor renders each component in the order
84+they were pushed into the stack. This makes multiple components "layer"
85+on top of one another. Hence we get a file picker displayed over the
63The `Editor` holds the global state: all the open documents, a tree
88The `Editor` holds the global state: all the open documents, a tree
64−representation of all the view splits, and a registry of language servers. To
89+representation of all the view splits, the configuration, and a registry of
65−open or close files, interact with the editor.
90+language servers. To open or close files, interact with the editor.