#include <view_bridge.hpp>
Static Public Member Functions | |
| static Options | hosted_editor () |
| Options for a primary editor embedded in a host: hot reload follows the developer's PULP_DEV_HOT_RELOAD opt-in, role is Editor. | |
Public Attributes | |
| bool | enable_hot_reload = false |
| Poll scripted UI + theme.json for changes. | |
| ViewRole | role = ViewRole::Editor |
| bool | defer_document_load = false |
| Return the view before evaluating its scripted document (see view::ScopedDeferredDocumentLoad). | |
| bool | content_first_open = false |
| Hand the host an editor whose first frame is already the settled document (see prepare_first_frame()). | |
|
inlinestatic |
Options for a primary editor embedded in a host: hot reload follows the developer's PULP_DEV_HOT_RELOAD opt-in, role is Editor.
Every format adapter builds its editor from this rather than assembling the struct itself. Hand-assembly is what let VST3 and CLAP diverge: they used the no-Options constructor, so a sweep over call sites that named the field did not reach them and their editors never honoured the flag. One definition means a new adapter cannot silently omit an option, and a new option lands in exactly one place.
The standalone host deliberately does NOT use this — it forces hot reload on unconditionally because it is itself the dev tool.
| bool pulp::format::ViewBridge::Options::content_first_open = false |
Hand the host an editor whose first frame is already the settled document (see prepare_first_frame()).
A view-first open shows the host's window with the editor's empty background for as long as the document takes to mount, and the window opening on that empty frame reads as three stages: small (the window's open animation), the right size but empty, then the UI. Content-first finishes the deferred mount inside the view-creation call instead, so the host window appears with the UI in it. On for every host-embedded editor; PULP_EDITOR_OPEN=view-first turns it off.
| bool pulp::format::ViewBridge::Options::defer_document_load = false |
Return the view before evaluating its scripted document (see view::ScopedDeferredDocumentLoad).
open() then builds a correctly sized root in milliseconds and the document mounts on the editor's second idle tick. On for every host-embedded editor, where the host is blocked in its view-creation call; off for the standalone and for harnesses that inspect the mounted tree right after open().
| bool pulp::format::ViewBridge::Options::enable_hot_reload = false |
Poll scripted UI + theme.json for changes.
| ViewRole pulp::format::ViewBridge::Options::role = ViewRole::Editor |