Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
design_ir.hpp File Reference

Normalized intermediate representation (IR) for imported designs: the IR value model (style, layout, nodes, tokens, asset manifest, diagnostics). More...

#include <pulp/view/design_line_metrics.hpp>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
#include <optional>
#include <map>
#include <unordered_map>
#include <variant>

Go to the source code of this file.

Classes

struct  pulp::view::IRBoxShadow
 A single CSS box-shadow layer. More...
struct  pulp::view::IRStyle
 Style properties for an IR node. More...
struct  pulp::view::IRStyle::ClipRect
struct  pulp::view::IRStyle::RenderBounds
struct  pulp::view::IRLayout
 Layout properties for an IR container node. More...
struct  pulp::view::IRProvenance
 Adapter-side provenance: who lowered this node, from what source. More...
struct  pulp::view::IRTextLineBox
 One styled character range inside a text node. More...
struct  pulp::view::IRTextLayoutBasis
 What the cached line boxes above were laid out AGAINST. More...
struct  pulp::view::IRTextRun
struct  pulp::view::IRInteractiveElement
struct  pulp::view::IRNode
struct  pulp::view::ImportDiagnostic
struct  pulp::view::IRAssetRef
struct  pulp::view::IRAssetManifest
struct  pulp::view::IRFontAsset
 A bundled (non-system) font shipped with the design (figma-plugin #43a: envelope font_family_assets[]). More...
struct  pulp::view::IRTokenIdentity
struct  pulp::view::IRTokens
 Design token collection (W3C-compatible). More...
struct  pulp::view::DesignIR
 Complete design IR document. More...
struct  pulp::view::DesignIrJsonOptions
struct  pulp::view::DesignIrAssetOptions

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Enumerations

enum class  pulp::view::DesignSource {
  pulp::view::figma , pulp::view::stitch , pulp::view::v0 , pulp::view::pencil ,
  pulp::view::claude , pulp::view::designmd , pulp::view::jsx , pulp::view::figma_plugin ,
  pulp::view::html , pulp::view::preconverted_svg
}
enum class  pulp::view::LayoutDirection { pulp::view::row , pulp::view::column }
 Layout direction for flex containers. More...
enum class  pulp::view::LayoutAlign {
  pulp::view::flex_start , pulp::view::flex_end , pulp::view::center , pulp::view::stretch ,
  pulp::view::space_between , pulp::view::space_around
}
 Alignment values for flex containers. More...
enum class  pulp::view::SizingMode { pulp::view::fixed , pulp::view::hug , pulp::view::fill }
 Sizing mode for an IR node dimension. More...
enum class  pulp::view::AudioWidgetType {
  pulp::view::none , pulp::view::knob , pulp::view::fader , pulp::view::meter ,
  pulp::view::xy_pad , pulp::view::waveform , pulp::view::spectrum , pulp::view::toggle ,
  pulp::view::selector , pulp::view::stepper
}
 Audio widget type detected from naming conventions or annotations. More...
enum class  pulp::view::WidgetPromotionSignal { pulp::view::none , pulp::view::onclick_attribute , pulp::view::aria_role_button , pulp::view::cursor_pointer }
 Heuristic signals that a parsed frame is interactive enough to promote from a static frame to a button widget. More...
enum class  pulp::view::IRConfidence { pulp::view::pass , pulp::view::diverge , pulp::view::not_impl }
 Confidence the adapter has that a node was lowered correctly. More...
enum class  pulp::view::NodeRenderMode { pulp::view::normal , pulp::view::faithful_svg , pulp::view::faithful_capture }
 A single node in the normalized design IR. More...
enum class  pulp::view::InteractiveElementKind {
  pulp::view::knob , pulp::view::fader , pulp::view::toggle , pulp::view::dropdown ,
  pulp::view::text_field , pulp::view::tab_group , pulp::view::stepper , pulp::view::swap ,
  pulp::view::action , pulp::view::xy_pad , pulp::view::value_label , pulp::view::custom
}
enum class  pulp::view::ImportDiagnosticSeverity { pulp::view::info , pulp::view::warning , pulp::view::error }
enum class  pulp::view::ImportDiagnosticKind {
  pulp::view::unknown , pulp::view::unsupported_property , pulp::view::unsupported_node , pulp::view::unresolved_asset ,
  pulp::view::snapshot_semantics_warning , pulp::view::legacy_field_shortcut , pulp::view::capture_partial , pulp::view::fallback_used
}

Functions

float pulp::view::selector_segment_value (int index, int count)
 The value a segmented selector writes for segment index of count, and the segment a parameter value selects.
float pulp::view::stepper_normalized_value (double plain, double min, double max)
 A stepper's plain value (voices, octaves) against the normalized parameter behind it.
double pulp::view::stepper_plain_value (float normalized, double min, double max, double step)
int pulp::view::selector_segment_index (float value, int count)
bool pulp::view::toggle_on_from_normalized (double value)
 The single threshold used by every toggle import/binding path.

Detailed Description

Normalized intermediate representation (IR) for imported designs: the IR value model (style, layout, nodes, tokens, asset manifest, diagnostics).

This header is the pulp-design-ir unit. It sits below view-core and includes only the standard library, so generic view code can carry IR values without reaching the importer. The canonical JSON serialize/parse, asset collection, and interactive-frame promotion entry points are importer operations and live in design_ir_io.hpp (pulp-design-import).