You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to try to implement this, and the following is more or less the design I'm thinking of.
Make Compositor a trait, which can be implemented by each frontend. It takes items which implement the Component trait and renders them as layers on layers.
Move [structs implmenting] Components like FilePicker, EditorView, Popup, etc to helix-view. Now we have everything except the rendering logic in the base helix-view crate and frontends can handle rendering.
The Compositor and Component traits will be both defined in helix-view. The common "widgets" (items implementing Component) will also be in helix-view. These widgets will need to have the Component trait defined separately by each frontend. Since the frontend is another crate (like helix-term) we cannot do this:
// frontend crateuse helix_view::Component;use helix_view::ui::FilePicker// cannot implement a foreign trait for a foreign typeimplComponentforFilePicker{/* ... */}
We will need to use the newtype pattern and define wrapper structs for all widgets in frontends, which can then implement Component and also provide additional functionality if needed.
that would unblock #39
The text was updated successfully, but these errors were encountered: