How aidan729/nice-plug-slint works
nice-plug-slint adapts a Slint component to a nice-plug editor using a baseview window and FemtoVG/OpenGL rendering. The principal workflow is: a plugin supplies persisted editor state and a component factory; opening the editor creates a baseview window and Slint component; setup registers UI-to-plugin callbacks, while the per-frame handler can push plugin values back to the UI. The adapter also forwards input and handles resizing. The graph reflects the sampled excerpts and README; unsampled implementation details are omitted.
Main entry points: lib.rs Slint Editor
Components 16
Editor API
- Slint Editor
src/lib.rs - Editor State
src/lib.rs - Component Factory
src/lib.rs - Slint Component
Window And Rendering
- Baseview Window
src/lib.rs - Slint Platform Bridge
src/lib.rs - Window Adapter
src/lib.rs - OpenGL Interface
src/lib.rs - FemtoVG Renderer
src/lib.rs
Events And State
- Window Handler
src/lib.rs - Setup Callback
src/lib.rs - Frame Callback
src/lib.rs - Input Bridge
src/lib.rs
Other components
- Plugin Host
- Plugin Parameters
- GUI Context
Connections 22
- Plugin Host → Slint Editor: creates editor
README.md - Plugin Host → Editor State: persists state
README.md - Slint Editor → Baseview Window: opens window
src/lib.rs - Slint Editor → Component Factory: stores factory
src/lib.rs - Baseview Window → Slint Platform Bridge: installs platform
src/lib.rs - Slint Platform Bridge → Window Adapter: creates adapter
src/lib.rs - Slint Editor → Window Adapter: sets current adapter
src/lib.rs - Component Factory → Slint Component: creates component
src/lib.rs - Window Adapter → FemtoVG Renderer: provides rendering
src/lib.rs - Baseview Window → OpenGL Interface: supplies GL context
src/lib.rs - OpenGL Interface → FemtoVG Renderer: loads OpenGL
src/lib.rs - Baseview Window → Input Bridge: receives input
src/lib.rs - Input Bridge → Window Adapter: dispatches events
src/lib.rs - Slint Editor → Window Handler: provides callbacks
README.md - Window Handler → Setup Callback: runs on open
README.md - Window Handler → Frame Callback: runs each frame
README.md - Setup Callback → Slint Component: registers callbacks
README.md - Setup Callback → Plugin Parameters: updates parameters
README.md - Frame Callback → Slint Component: pushes values
README.md - Frame Callback → Plugin Parameters: reads values
README.md - Window Handler → GUI Context: exposes context
src/lib.rs - Window Handler → Editor State: queues resize
src/lib.rs