Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::ScriptedUiOptions Struct Reference

#include <scripted_ui.hpp>

Public Attributes

std::filesystem::path script_path
std::filesystem::path theme_path
std::vector< std::filesystem::path > asset_roots
bool enable_hot_reload = false
bool enable_theme_reload = true
ValueChannelSet * value_channels = nullptr
 Compatibility adapter for stable, non-reloadable processors.
ValueChannelAccess value_channel_access
 Leased access to the hosting processor's named value channels.
CapabilitySet granted_capabilities = CapabilitySet::all()
 Native bridge APIs granted to this realm.
bool enable_runtime_import = false
 Install the native runtime-design import endpoint before evaluating the session bundle.
std::string script_source
 In-memory script source.
std::string theme_source
 Theme override JSON applied over the root theme when theme_path is empty and script_source is in use.
std::string script_name
 Diagnostic name for an in-memory script (ui.js); log lines and script_label() use it where a path-backed session names its file.
std::vector< WidgetBridge::EmbeddedAsset > embedded_assets
 Files compiled into the image beside an in-memory script.
std::string storage_identity
 Identity of the session's persisted stores (widget storage, style presets) when the script has no directory to be keyed by.
std::size_t js_memory_limit_bytes = kDefaultJsMemoryLimitBytes
 Heap ceiling for every realm this session creates, in bytes (0 = unlimited).
bool allow_unreviewed_file_paths = false
 Let path-taking bridge APIs open files outside the script directory and asset_roots (WidgetBridge::set_allow_unreviewed_file_paths).

Member Data Documentation

◆ allow_unreviewed_file_paths

bool pulp::view::ScriptedUiOptions::allow_unreviewed_file_paths = false

Let path-taking bridge APIs open files outside the script directory and asset_roots (WidgetBridge::set_allow_unreviewed_file_paths).

Off by default; a DAW-hosted editor must leave it off.

◆ asset_roots

std::vector<std::filesystem::path> pulp::view::ScriptedUiOptions::asset_roots

◆ embedded_assets

std::vector<WidgetBridge::EmbeddedAsset> pulp::view::ScriptedUiOptions::embedded_assets

Files compiled into the image beside an in-memory script.

They stand in for the script's directory: relative asset lookups (__loadAssetSync__, setImageSource, sprite strips, fonts) resolve here first, then in asset_roots.

◆ enable_hot_reload

bool pulp::view::ScriptedUiOptions::enable_hot_reload = false

◆ enable_runtime_import

bool pulp::view::ScriptedUiOptions::enable_runtime_import = false

Install the native runtime-design import endpoint before evaluating the session bundle.

Opt-in keeps ordinary scripted UIs unchanged while allowing a generated @pulp/react bundle to materialize a captured, executable browser document in this exact live realm.

◆ enable_theme_reload

bool pulp::view::ScriptedUiOptions::enable_theme_reload = true

◆ granted_capabilities

CapabilitySet pulp::view::ScriptedUiOptions::granted_capabilities = CapabilitySet::all()

Native bridge APIs granted to this realm.

Trusted/local scripted UIs retain the historical all-capabilities default; protected hosts pass an explicit empty or reviewed set. Appended to preserve the public aggregate's legacy positional layout.

◆ js_memory_limit_bytes

std::size_t pulp::view::ScriptedUiOptions::js_memory_limit_bytes = kDefaultJsMemoryLimitBytes

Heap ceiling for every realm this session creates, in bytes (0 = unlimited).

Enforced by the QuickJS backend; see JsEngine::set_memory_limit.

◆ script_name

std::string pulp::view::ScriptedUiOptions::script_name

Diagnostic name for an in-memory script (ui.js); log lines and script_label() use it where a path-backed session names its file.

◆ script_path

std::filesystem::path pulp::view::ScriptedUiOptions::script_path

◆ script_source

std::string pulp::view::ScriptedUiOptions::script_source

In-memory script source.

When non-empty the session evaluates it and script_path is only a label: nothing is read from disk, hot reload has no file to watch, and relative asset lookups resolve against asset_roots alone. The default editor fills this from the bytes pulp_add_plugin(UI_SCRIPT) compiled into the plug-in.

◆ storage_identity

std::string pulp::view::ScriptedUiOptions::storage_identity

Identity of the session's persisted stores (widget storage, style presets) when the script has no directory to be keyed by.

The default editor passes the plug-in's bundle id and script name.

◆ theme_path

std::filesystem::path pulp::view::ScriptedUiOptions::theme_path

◆ theme_source

std::string pulp::view::ScriptedUiOptions::theme_source

Theme override JSON applied over the root theme when theme_path is empty and script_source is in use.

◆ value_channel_access

ValueChannelAccess pulp::view::ScriptedUiOptions::value_channel_access

Leased access to the hosting processor's named value channels.

The visitor must not retain a set or source after its callback returns.

◆ value_channels

ValueChannelSet* pulp::view::ScriptedUiOptions::value_channels = nullptr

Compatibility adapter for stable, non-reloadable processors.

Converted to ValueChannelAccess during construction and never retained directly.


The documentation for this struct was generated from the following file: