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

#include <lottie_view.hpp>

Public Types

enum class  PointerEvents { auto_ , none , box_only , box_none }
 React Native pointerEvents. More...
enum class  AccessRole {
  none = 0 , slider , toggle , label ,
  group , meter , image , button ,
  link , checkbox , radio , text_field ,
  combo_box , list , list_item , table ,
  row , cell , tab , tab_list ,
  menu , menu_item , progress_bar , dialog ,
  heading , scroll_bar
}
 Screen-reader role. More...
enum class  BorderCurve { circular , continuous }
 RN's borderCurve: corner shape selection. More...
enum class  BorderStyle {
  solid , dashed , dotted , double_ ,
  groove , ridge , inset , outset ,
  none , hidden
}
 CSS / RN border-style. More...
enum class  ListStyleType {
  none , disc , circle , square ,
  decimal , decimal_leading_zero , lower_roman , upper_roman ,
  lower_alpha , upper_alpha , lower_latin , upper_latin ,
  lower_greek , armenian , georgian
}
 CSS / RN list-style cluster. More...
enum class  ListStylePosition { outside , inside }
enum class  Position {
  static_ , relative , absolute , fixed ,
  sticky
}
 CSS position property. More...
enum class  Overflow { hidden , visible , scroll }
 Overflow mode. More...
enum class  WritingDirection { ltr , rtl , auto_ }
 Writing direction (CSS direction / RN writingDirection). More...
enum class  WhiteSpaceMode {
  normal , nowrap , pre , pre_wrap ,
  pre_line , break_spaces
}
 White-space: nowrap (CSS white-space: nowrap). More...
enum class  CursorStyle {
  default_ , pointer , crosshair , text ,
  grab , grabbing , not_allowed , invisible ,
  horizontal_resize , vertical_resize , top_left_resize , top_right_resize ,
  bottom_left_resize , bottom_right_resize , multi_directional_resize , alias ,
  copy , zoom_in , zoom_out , context_menu
}
 Cursor style hint (CSS cursor property). More...
enum class  UserSelect {
  auto_ , none , text , all ,
  contain
}
 CSS user-select. More...

Public Member Functions

 LottieView ()
 ~LottieView () override
bool set_source_file (const std::string &path)
bool set_source_json (const std::string &json)
bool valid () const
void set_playing (bool playing)
bool playing () const
void set_looping (bool looping)
bool looping () const
void set_speed (float speed)
float speed () const
void seek (double seconds)
double time () const
double duration () const
void advance (float dt)
 Advance the playhead by dt seconds (scaled by speed, looped/clamped).
void paint (canvas::Canvas &canvas) override
void on_attached () override
void on_detached () override
void on_frame_clock_changed () override
 The FrameClock reachable from this view (via frame_clock()) may have changed — a clock was installed on an ancestor, or this subtree was re-parented.
Rect bounds () const
void set_bounds (Rect r)
Rect local_bounds () const
FlexStyle & flex ()
const FlexStyle & flex () const
GridStyle & grid ()
const GridStyle & grid () const
void set_layout_mode (LayoutMode m)
LayoutMode layout_mode () const
void set_subpixel_layout (bool v)
 Opt this view's layout pass out of Yoga's whole-pixel grid rounding.
bool subpixel_layout () const
void set_captured_frame_root (bool v)
 Root of an imported frame: captured text snaps baselines to its grid.
bool captured_frame_root () const
std::unique_ptr< View > add_child (std::unique_ptr< View > child)
 Attaches child and returns nullptr.
bool add_child_transactional (std::unique_ptr< View > &child)
std::unique_ptr< View > remove_child (View *child)
 Detaches child and returns its ownership, or nullptr when child is no longer this parent's child under the same instance id.
bool move_child_to_index (View *child, size_t index)
 Moves an existing child to index in this view's child order — the one order both layout and paint walk — and returns false when child is not this view's child.
void retire (std::unique_ptr< View > owned) noexcept
 Destroys owned at the first moment it is safe to do so.
std::uint64_t root_structure_generation () const noexcept
 Generation of the top-level tree containing this view.
size_t child_count () const
View * child_at (size_t index)
const View * child_at (size_t index) const
View * parent () const
virtual bool save_reload_state (std::string &) const
virtual bool restore_reload_state (std::string_view)
virtual bool supports_reuse () const
virtual void prepare_for_reuse ()
virtual View * hit_test (Point local_point)
void set_theme (const Theme &theme)
const Theme & theme () const
Color resolve_color (const std::string &name, Color fallback={}) const
void set_color (std::string name, Color c)
 Override ONE named color token on this view without replacing the rest of its theme.
void set_painter (std::shared_ptr< WidgetPainter > p)
const std::shared_ptr< WidgetPainter > & painter () const
WidgetPainter * effective_painter () const
 The painter that governs THIS view: its own if it has one, else the nearest ancestor's, else null (meaning "draw the stock look").
void set_metrics (std::shared_ptr< WidgetMetrics > m)
const std::shared_ptr< WidgetMetrics > & metrics () const
WidgetMetrics * effective_metrics () const
 The metrics delegate that governs THIS view: its own if it has one, else the nearest ancestor's, else null (meaning "use the stock size").
void set_inheritable_text_color (Color c)
void clear_inheritable_text_color ()
std::optional< Color > inheritable_text_color () const
 Walks own value, then parent chain. nullopt if no ancestor set it.
void set_inheritable_font_size (float size)
void clear_inheritable_font_size ()
std::optional< float > inheritable_font_size () const
void set_inheritable_letter_spacing (float sp)
void clear_inheritable_letter_spacing ()
std::optional< float > inheritable_letter_spacing () const
void set_inheritable_font_weight (int w)
void clear_inheritable_font_weight ()
std::optional< int > inheritable_font_weight () const
void set_inheritable_font_family (std::string f)
 Inheritable font-family cascade.
void clear_inheritable_font_family ()
std::optional< std::string > inheritable_font_family () const
void set_inheritable_text_align (int a)
 0 = left, 1 = center, 2 = right (matches LabelAlign).
void clear_inheritable_text_align ()
std::optional< int > inheritable_text_align () const
bool visible () const
void set_visible (bool v)
 Show or hide this view.
virtual void layout_children ()
void layout_children_if_needed ()
 Lay out only when a geometry mutation has happened since this root's last completed pass.
bool layout_is_current () const noexcept
void mark_layout_current () noexcept
std::uint64_t tree_layout_generation () const noexcept
 Geometry generation scoped to this View's attached tree.
virtual bool owns_child_layout () const
virtual float intrinsic_width () const
 Intrinsic content size (override in widgets that know their natural size).
virtual float intrinsic_height () const
virtual void paint_all (canvas::Canvas &canvas)
std::uint32_t last_paint_self_ns () const
std::uint32_t last_paint_with_children_ns () const
virtual void on_resized ()
virtual void advance_animations (float dt)
 Advance any per-widget non-CSS animation state (hover glows, thumb tweens, spinner phase) by dt seconds.
virtual void on_mouse_event (const MouseEvent &event)
 Mouse down with full event context.
bool handle_scroll_wheel (const MouseEvent &event)
 Applies a wheel tick to this view's scroll offset; true when a scroll container with range consumed it.
virtual bool wants_wheel_value () const
 True if this widget adjusts its VALUE on a scroll-wheel over it (knobs, faders, sliders, steppers, pan).
virtual void on_wheel (float delta_y)
 Adjust the widget's value by a scroll-wheel delta (delta_y positive = scrolled down).
virtual bool is_gesture_active () const
 True while the user is actively manipulating this widget's value with a pointer drag (knob turn, fader/slider drag, XY-pad move).
virtual bool wants_wheel_scroll () const
 True if this widget is itself a scroll container that should consume wheel input before an ancestor scroll view.
virtual bool wants_mouse_input () const
 True if this widget handles mouse down/drag through virtual methods even when it does not expose JS pointer callbacks or focus.
virtual bool on_key_event (const KeyEvent &event)
 Key event with modifiers and up/down state.
virtual void on_text_input (const TextInputEvent &event)
 Text input from keyboard/IME (separate from key events).
virtual void on_focus_changed (bool gained)
 Called when this view gains or loses focus.
virtual void on_gesture_event (const GestureEvent &event)
 Gesture event (pinch/rotate from multi-touch or trackpad).
GestureRecognizer & add_gesture_recognizer (std::unique_ptr< GestureRecognizer > recognizer)
void clear_gesture_recognizers ()
size_t gesture_recognizer_count () const
GestureRecognizer * gesture_recognizer_at (size_t index)
const GestureRecognizer * gesture_recognizer_at (size_t index) const
bool dispatch_gesture_pointer_event (const MouseEvent &root_event, double timestamp_seconds=-1.0)
void advance_gesture_recognizers (double timestamp_seconds=-1.0)
bool has_time_driven_gestures () const
bool gesture_claimed_pointer () const
 True when a gesture recognizer ACTIVELY claimed the last pointer event.
void set_pointer_capture (int pointer_id)
 Capture pointer events for this view — all events for pointer_id route here regardless of hit-test until released.
void release_pointer_capture (int pointer_id)
bool has_pointer_capture (int pointer_id) const
virtual void on_mouse_down (Point pos)
virtual void on_mouse_up (Point pos)
virtual void on_mouse_drag (Point pos)
virtual void on_mouse_cancel (Point pos)
 Pointer / touch cancellation (iOS touchesCancelled, etc.).
virtual void on_key_press (int key_code)
virtual void on_mouse_enter ()
virtual void on_mouse_leave ()
virtual void on_hover_move (Point local_pos)
 Pointer moved over this view with no button held, reported in this view's LOCAL coordinates.
bool is_hovered () const
void set_hovered (bool h)
void set_default_hover_feedback (bool enabled)
 Baseline pointer feedback for semantic controls that keep an authored painter (for example imported lowercase HTML buttons).
bool default_hover_feedback () const
void set_frame_clock (FrameClock *clock)
 Set the frame clock on the root view.
FrameClock * frame_clock () const
 Get the frame clock (walks up parent chain to find it).
void set_meter_source (std::shared_ptr< MeterSource > source, int channel=0)
 Bind a MeterSource.
bool has_meter_source () const
int meter_source_channel () const
const MeterFrame & meter_frame () const
 The latest MeterFrame snapshotted on the clock.
void set_scalar_source (std::shared_ptr< ScalarSource > source)
 Bind a ScalarSource — one cached number (a readout, a modulation ring's modulated position).
bool has_scalar_source () const
float scalar_value () const
 The latest scalar snapshotted on the clock.
virtual void on_meter_frame (const MeterFrame &frame, float dt)
 A new MeterFrame was snapshotted this frame, dt seconds after the last.
virtual void on_meter_snapshot_changed ()
 meter_frame() changed: repaint this view (a live binding alone does not composite).
int animate (std::function< void(float)> apply, float from, float to, float duration_s, std::function< float(float)> ease={}, std::function< void()> on_done={}, const std::string &tag={})
void cancel_animation (int id)
 Cancel a running animation by id (no-op if already finished/unknown).
int active_animation_count () const
 Number of animations currently running on this view. For tests.
float resolve_dimension (const std::string &name, float fallback) const
 Resolve a dimension token: check own theme, walk up to parent.
void simulate_click (Point root_pos)
void simulate_click (Point root_pos, const SimulatedPointer &pointer)
 As above, driven by an explicit pointer device.
bool simulate_context_click (Point root_pos)
 Dispatch a synthetic CONTEXT (right-button) press the way the platform hosts do, via route_context_press.
void simulate_drag (Point start, Point end, int steps=10)
void simulate_drag (Point start, Point end, int steps, const SimulatedPointer &pointer)
 As above, driven by an explicit pointer device.
void simulate_hover (Point root_pos)
bool focusable () const
void set_focusable (bool f)
virtual bool accepts_text_input () const
 Does this widget consume printable character keys for text entry?
virtual SelectableText * as_selectable_text ()
 This view's painted text can join a cross-widget selection; null for the vast majority of views, which carry no text.
const SelectableText * as_selectable_text () const
void set_text_selection_region (bool region)
 Mark this view as a TEXT CONTENT region — prose the reader may select, as opposed to controls they operate.
bool text_selection_region () const
bool enabled () const
 CSS :disabled equivalent — blocks input, reduces opacity.
void set_enabled (bool e)
bool hit_testable () const
 CSS pointer-events: none — view is invisible to hit testing.
void set_hit_testable (bool h)
void set_pointer_events (PointerEvents p)
PointerEvents pointer_events () const
void set_hit_slop (float uniform)
void set_hit_slop (float top, float right, float bottom, float left)
void set_hit_slop (HitSlop s)
HitSlop hit_slop () const
Rect hit_bounds () const
 local_bounds() grown by hit_slop().
bool backface_visible () const
 React Native backfaceVisibility.
void set_backface_visible (bool v)
bool requires_gpu_host () const
 GPU-host capability signal.
void set_requires_gpu_host (bool v)
bool contains_native_overlay () const
 True when this view (or its subtree) attaches a NATIVE child overlay — a WebView / NSView / HWND that is composited by the OS window server, NOT painted into the Pulp Skia canvas by paint_all().
void set_contains_native_overlay (bool v)
virtual std::vector< uint8_t > capture_native_overlay_png (uint32_t, uint32_t)
 When this view owns a native overlay (a WebView pane), it overrides this to return an in-process PNG snapshot of that overlay (e.g.
Rect map_rect_through_own_transform (const Rect &local) const
 Map a rect in this view's local (painted) coordinates through the paint transforms this view applies – the scalar translate/rotate/ scale around the transform origin, then the explicit affine matrix – into its own untransformed box coordinates.
void invalidate_layout ()
 Mark layout as needing recalculation (auto-invalidation).
bool layout_dirty () const
void clear_layout_dirty ()
void request_repaint ()
 Request that this view's host invalidate and schedule a repaint.
void request_repaint (const Rect &local_dirty)
 Bounded repaint: invalidate only local_dirty (this view's local coordinates), mapped to root space, so a live sub-view (meter, grid, overlay) does not force the whole surface to re-composite.
void request_frame ()
 Ask the host for a frame without marking any damage: the frame's own work (a queued requestAnimationFrame callback, a canvas redraw) marks what it changes.
void request_repaint_self (float halo=4.0f)
 Invalidate only THIS view's own rect, overscanned by halo so a glow, focus ring or modulation arc painting outside local_bounds() is covered.
bool start_file_drag (const FileDragRequest &request)
 Drag existing on-disk files out of this view to another app (e.g.
bool start_drag (DropData data)
void drag_to (Point root_pos)
bool drop_here (Point root_pos)
void cancel_drag ()
bool drag_active () const
bool has_focus () const
void set_focus (bool f)
void set_access_role (AccessRole role)
AccessRole access_role () const
void set_implicit_access_role (AccessRole role)
void restore_implicit_access_role ()
void set_access_label (std::string label)
 The AUTHOR-SET accessible name (what aria-label maps to).
void set_derived_access_label (std::string label)
 The CONTENT-DERIVED accessible name: a widget's visible text (Label::set_text, Knob/Fader/Toggle::set_label, TextButton::set_label).
const std::string & access_label () const
 The resolved accessible name: author-set if present, else content-derived.
bool has_explicit_access_label () const
 True when an author explicitly named this view (set_access_label / aria-label), as opposed to the name being derived from its content.
const std::string & derived_access_label () const
 The content-derived name on its own, ignoring any author-set name.
void set_access_value (std::string value)
const std::string & access_value () const
void set_access_pressed (std::string s)
void set_access_checked (std::string s)
void set_access_disabled (std::string s)
void set_access_hidden (std::string s)
const std::string & access_pressed () const
const std::string & access_checked () const
const std::string & access_disabled () const
const std::string & access_hidden () const
virtual void on_accessibility_adjust (float delta)
 Called by platform accessibility when VoiceOver increment/decrement is triggered.
void set_id (std::string id)
const std::string & id () const
void set_anchor_id (std::string anchor)
 Stable anchor identity from the design-import IR.
const std::string & anchor_id () const
std::uint64_t import_binding_instance_id () const
 Stable for this View object's lifetime.
std::weak_ptr< const std::uint64_t > import_binding_lifetime_token () const
void set_source_loc (SourceLocation loc)
void clear_source_loc ()
bool has_source_loc () const
const SourceLocation & source_loc () const
 Returns the recorded source location, or an empty (!valid()) SourceLocation when none has been set.
void set_opacity (float o)
 Opacity (0.0 = transparent, 1.0 = opaque). Applied as layer alpha.
float opacity () const
void set_background_color (Color c)
 Background color (optional — if set, painted before children).
void clear_background_color ()
bool has_background_color () const
Color background_color () const
void set_captured_box_paint_rect (float left, float top, float right, float bottom, float device_scale)
 Browser-compatible device-space paint rectangle for this box's own paint (Chromium's CSS-edge snap, recorded by the importer).
bool has_captured_box_paint_rect () const
float captured_box_paint_left () const
float captured_box_paint_top () const
float captured_box_paint_right () const
float captured_box_paint_bottom () const
Rect self_paint_bounds () const
 The rect, in local coordinates, this box's own paint covers: the snapped captured rect when it is recorded and plausible, else local_bounds().
void set_background_repeat (std::string kw)
 CSS background-repeat keyword.
const std::string & background_repeat () const
void set_border (Color c, float width, float radius=0)
 Border (optional — painted on top of background).
void clear_border ()
bool has_border () const
Color border_color () const
float border_width () const
float corner_radius () const
void set_border_color (Color c)
 Standalone border setters for RN parity.
void set_border_width (float w)
void set_border_radius (float r)
void set_border_radius_pct (float pct)
 Set corner radius as percent of min(width,height).
float corner_radius_pct () const
void set_border_curve (BorderCurve c)
BorderCurve border_curve () const
float effective_corner_radius (float width, float height) const
 Compute the effective uniform corner radius in px against the given bounds (called by paint code).
void set_border_style (BorderStyle s)
BorderStyle border_style () const
void set_list_style_type (ListStyleType t)
ListStyleType list_style_type () const
void set_list_style_image (std::string url)
const std::string & list_style_image () const
void set_list_style_position (ListStylePosition p)
ListStylePosition list_style_position () const
void set_outline_color (Color c)
 CSS / RN outline cluster.
void set_outline_offset (float px)
void set_outline_style (BorderStyle s)
void set_outline_width (float px)
Color outline_color () const
float outline_offset () const
BorderStyle outline_style () const
float outline_width () const
void set_border_top (Color c, float w)
 Per-side borders (CSS border-top, border-right, etc.).
void set_border_right (Color c, float w)
void set_border_bottom (Color c, float w)
void set_border_left (Color c, float w)
void set_border_top_color (Color c)
 Color-only setters.
void set_border_right_color (Color c)
void set_border_bottom_color (Color c)
void set_border_left_color (Color c)
void set_border_top_width (float w)
 Width-only setters.
void set_border_right_width (float w)
void set_border_bottom_width (float w)
void set_border_left_width (float w)
Color border_top_color () const
 Per-side getters.
float border_top_width () const
Color border_right_color () const
float border_right_width () const
Color border_bottom_color () const
float border_bottom_width () const
Color border_left_color () const
float border_left_width () const
bool has_border_sides () const
bool has_border_top_set () const
 Per-edge "explicitly set" probes.
bool has_border_right_set () const
bool has_border_bottom_set () const
bool has_border_left_set () const
bool has_border_top_color_set () const
 Per-edge colour "explicitly set" probes.
bool has_border_right_color_set () const
bool has_border_bottom_color_set () const
bool has_border_left_color_set () const
void set_corner_radius_tl (float r)
 Per-corner border-radius (CSS border-top-left-radius, etc.).
void set_corner_radius_tr (float r)
void set_corner_radius_bl (float r)
void set_corner_radius_br (float r)
void set_corner_radius_tl_pct (float pct)
 Per-corner percent setters.
void set_corner_radius_tr_pct (float pct)
void set_corner_radius_bl_pct (float pct)
void set_corner_radius_br_pct (float pct)
float corner_radius_tl_pct () const
float corner_radius_tr_pct () const
float corner_radius_bl_pct () const
float corner_radius_br_pct () const
float effective_corner_radius_tl (float w, float h) const
 Compute effective per-corner radius (px) against given bounds.
float effective_corner_radius_tr (float w, float h) const
float effective_corner_radius_bl (float w, float h) const
float effective_corner_radius_br (float w, float h) const
bool has_corner_radii () const
 Per-corner radius accessors. corner_radii_[0..3] = TL, TR, BL, BR.
float corner_radius_tl () const
float corner_radius_tr () const
float corner_radius_bl () const
float corner_radius_br () const
void set_box_shadow (float ox, float oy, float blur, float spread, Color c, bool inset=false)
 Replaces the whole stack with one layer.
void add_box_shadow (float ox, float oy, float blur, float spread, Color c, bool inset=false)
 Appends a layer, preserving CSS author order: box-shadow: A, B is set_box_shadow(A) followed by add_box_shadow(B).
void clear_box_shadow ()
bool has_box_shadow () const
const BoxShadow & box_shadow () const
 The first (topmost) layer, or a default-constructed shadow when the stack is empty — callers that only ever set one shadow can keep treating this as "the" shadow.
const std::vector< BoxShadow > & box_shadows () const
 Every layer, in CSS author order (first paints on top).
void set_box_shadow_color (Color c)
 RN iOS-legacy shadow* longhand setters.
void set_box_shadow_offset (float ox, float oy)
void set_box_shadow_opacity (float a)
void set_box_shadow_radius (float r)
RootInteractionState & interaction ()
 Root-owned interaction state for this view's tree.
const RootInteractionState & interaction () const
RootInteractionState * existing_interaction ()
 Resolved interaction state WITHOUT lazily allocating — the root's slot if one exists, else the process-global fallback, else nullptr.
void claim_input_focus ()
 Claim focus / overlay for this view's tree.
void claim_overlay (const View *stacks_on=nullptr)
 Open this view as an overlay under its root.
std::size_t overlay_depth () const
 Number of overlays currently open under this view's root.
void set_overlay_consumes_outside_click (bool consume)
bool overlay_consumes_outside_click () const
bool overlay_nests_on (const View *below) const
 True if this overlay was claimed nested on below; see claim_overlay.
void set_overlay_trigger (bool is_trigger)
 Mark this view as a control that OPENS an overlay — a dropdown field, a menu button, a popover trigger.
bool overlay_trigger () const
void set_overlay_anchor (const View *anchor)
 Declare the control that OPENED this overlay.
std::uint64_t overlay_anchor_id () const
 Instance id of the anchor (never a recyclable address), or 0 for none.
bool overlay_anchored_at (const View *candidate) const
void release_input_focus ()
 Guarded release — clears the root slot AND the shim mirror only when this currently holds them.
void release_overlay ()
 Clear the overlay if (and only if) this currently holds it.
void dismiss_claimed_overlay ()
 Dismiss this exact overlay when it owns its root's overlay slot.
bool overlay_contains (Point window_pt) const
 Bounds-test in window (root) coordinates.
void set_position (Position p)
Position position () const
void set_top (float v)
void set_top (float v, DimensionUnit unit)
void set_right (float v)
void set_right (float v, DimensionUnit unit)
void set_bottom (float v)
void set_bottom (float v, DimensionUnit unit)
void set_left (float v)
void set_left (float v, DimensionUnit unit)
float top () const
float right () const
float bottom () const
float left () const
DimensionUnit top_unit () const
DimensionUnit right_unit () const
DimensionUnit bottom_unit () const
DimensionUnit left_unit () const
bool has_top () const
bool has_right () const
bool has_bottom () const
bool has_left () const
void set_z_index (int z)
int z_index () const
std::vector< View * > sorted_children_by_z_index () const
 Children stably sorted by z_index() ascending — paint order (higher-z on top); hit_test walks it reversed. Exposed for tests.
bool children_in_z_order () const
 True iff children_ is already in that order — paint_all's fast path then iterates children_ directly, no sorted-copy alloc. Exposed for tests.
void set_overflow (Overflow o)
Overflow overflow () const
virtual bool is_scroll_container () const
 True when this view scrolls its own content; ScrollView always does.
virtual float scroll_offset_x () const
 Scroll offset in px, always within [0, max_scroll_offset_*].
virtual float scroll_offset_y () const
Size scroll_content_size () const
 Union of the laid-out descendant boxes, never smaller than the viewport.
float max_scroll_offset_x () const
 Scrollable range, content - viewport clamped at 0.
float max_scroll_offset_y () const
virtual bool set_scroll_offset (float x, float y)
 Set / advance the offset, clamped into [0, max_scroll_offset_*]: a container that fits stays at 0 and a wheel past either end stops there.
bool scroll_offset_by (float dx, float dy)
void set_clip_marker_tolerance (bool on)
 Import-only accommodation.
bool clip_marker_tolerance () const
void set_scale (float s)
 CSS transform properties.
float scale () const
void set_translate (float x, float y)
float translate_x () const
float translate_y () const
void set_rotation (float deg)
float rotation () const
void set_skew (float x_deg, float y_deg)
void set_transform_origin (float x, float y)
 Transform origin (0-1 normalized, default 0.5,0.5 = center).
float transform_origin_x () const
float transform_origin_y () const
bool transform_origin_explicit () const
void set_transform_matrix (float a, float b, float c, float d, float e, float f)
 Full 2D affine transform matrix on the View.
void clear_transform_matrix ()
bool has_transform_matrix () const
bool has_render_transform () const
 True when this view paints under any non-identity render transform (scale / rotation / translate / skew / explicit matrix).
bool has_filter_effect () const
 True when this view paints under a pixel-spreading filter (blur or a filter-chain op) — it re-samples neighbors, so a child's changed region spreads past its mapped box.
virtual bool applies_child_paint_offset () const
 True when this container translates its CHILDREN's paint in a way a plain bounds-offset walk cannot model — e.g.
virtual Point child_paint_offset (const View &child) const
 The translation this container applies to ONE child's paint, in the container's own coordinate space.
void get_transform_matrix (float &a, float &b, float &c, float &d, float &e, float &f) const
 Returns the six affine components in (a,b,c,d,e,f) order; meaningful only when has_transform_matrix() is true.
void set_filter_blur (float radius)
 CSS filter: blur(px) — per-element blur.
float filter_blur () const
void set_filter_chain (std::vector< FilterOp > chain)
void clear_filter_chain ()
const std::vector< FilterOp > & filter_chain () const
bool has_filter_chain () const
void set_transitions (std::vector< TransitionSpec > ts)
 CSS transitions + animations.
void clear_transitions ()
const std::vector< TransitionSpec > & transitions () const
bool has_transitions () const
const TransitionSpec * find_transition_for (const std::string &property) const
 Find the matching transition for a given property name.
std::vector< CssAnimation > & active_animations ()
 Active running animations on this View.
const std::vector< CssAnimation > & active_animations () const
int tick_animations (float dt)
 Advance every active CSS animation by dt seconds.
StagedAnimation & staged_animation ()
const StagedAnimation & staged_animation () const
void set_backdrop_blur (float radius)
 CSS backdrop-filter: blur(px) — frosted-glass blur applied to whatever is behind this View when it paints.
float backdrop_blur () const
void set_backdrop_filter_chain (std::vector< FilterOp > chain)
 CSS backdrop-filter with its full function list — saturate(), brightness(), invert(), and compositions of them.
const std::vector< FilterOp > & backdrop_filter_chain () const
void set_ancestor_clip_rect (Rect r)
 CSS clip-path: path("...").
const std::optional< Rect > & ancestor_clip_rect () const
void set_ancestor_clip_radii (float tl, float tr, float br, float bl)
 Corner radii for the ancestor clip, clockwise from top-left.
const std::array< float, 4 > & ancestor_clip_radii () const
void set_clip_path (const std::string &svg_path_d)
const std::string & clip_path () const
bool has_clip_path () const
void set_mask_image (const std::string &value)
 CSS mask-image: ....
const std::string & mask_image () const
void set_mask (const std::string &value)
 CSS mask shorthand.
const std::string & mask () const
void set_mask_size (const std::string &value)
 CSS mask-size (pairs with mask-image).
const std::string & mask_size () const
void set_appearance (const std::string &value)
 CSS appearance — controls native form-widget rendering.
const std::string & appearance () const
void set_object_fit (const std::string &value)
 CSS object-fit — controls how an <img> content's intrinsic size is fitted into its layout box.
const std::string & object_fit () const
void set_object_position (const std::string &value)
 CSS object-position — alignment of the object inside its content box when object-fit leaves blank space (e.g.
const std::string & object_position () const
void set_background_attachment (std::string kw)
 CSS background sub-properties.
const std::string & background_attachment () const
void set_background_clip (std::string kw)
const std::string & background_clip () const
void set_background_origin (std::string kw)
const std::string & background_origin () const
void set_background_position (std::string kw)
 CSS background-position / background-size.
const std::string & background_position () const
void set_background_size (std::string kw)
const std::string & background_size () const
void set_text_indent (float v)
float text_indent () const
void set_word_break (std::string kw)
const std::string & word_break () const
void set_scroll_behavior (std::string kw)
 CSS scroll-behavior + overscroll-behavior.
const std::string & scroll_behavior () const
void set_overscroll_behavior (std::string kw)
const std::string & overscroll_behavior () const
void set_include_font_padding (bool v)
 RN's Android-only includeFontPadding.
bool include_font_padding () const
void set_font_variant (std::string kw)
const std::string & font_variant () const
void set_writing_mode (std::string kw)
const std::string & writing_mode () const
void set_isolation (std::string kw)
const std::string & isolation () const
void set_resize (std::string kw)
const std::string & resize () const
void set_animation_play_state (std::string kw)
 Animation play-state.
const std::string & animation_play_state () const
void set_continuous_repaint (bool on)
 Opt a custom view into per-vsync repaints — required for live content (meters/spectrum, automation-tracking values) or it looks frozen.
bool wants_continuous_repaint () const
RuntimeViewKind runtime_view_kind () const noexcept
void set_text_shadow_color (std::string c)
 RN textShadow per-attribute storage.
const std::string & text_shadow_color () const
void set_text_shadow_offset (float dx, float dy)
float text_shadow_offset_x () const
float text_shadow_offset_y () const
void set_text_shadow_radius (float r)
float text_shadow_radius () const
void set_needs_layer (bool v)
 Force this View's subtree to render into a compositing layer.
bool needs_layer () const
void set_subtree_cached (bool v)
 Cache this subtree's painted CONTENT (its outset shadows, clip, background/border, paint(), children, and post-decorations — i.e.
bool subtree_cached () const
void set_raster_cached (bool enabled)
 Retain rendered pixels for static leaf content inside its bounds.
void set_effect (std::shared_ptr< canvas::ViewEffect > effect)
 Attach a GPU post-processing effect to this View's compositing layer.
const std::shared_ptr< canvas::ViewEffect > & effect () const
virtual void set_window_host (WindowHost *host)
 Back-reference to the WindowHost that owns this view tree.
WindowHost * window_host () const
virtual void set_plugin_view_host (PluginViewHost *host)
 Back-reference to the PluginViewHost that owns this editor tree.
PluginViewHost * plugin_view_host () const
virtual bool accepts_navigation_input () const
 Does this widget temporarily need host-delivered navigation keys?
void set_host_params (HostParamSurface *surface)
 The runtime host-parameter accessor for this view tree, or nullptr in previews/screenshots (a view degrades to local state when null, exactly like a sandboxed native view).
HostParamSurface * host_params () const
void set_host_actions (HostActionSurface *surface)
 The runtime host command channel for this view tree, or nullptr.
HostActionSurface * host_actions () const
void set_background_gradient_layers (std::vector< BackgroundGradient > layers)
 Replace the background-image stack, first layer on top.
const std::vector< BackgroundGradient > & background_gradient_layers () const
void set_background_gradient_linear (float x0, float y0, float x1, float y1, const std::vector< Color > &colors, const std::vector< float > &positions)
 Background gradient (CSS background: linear-gradient / radial-gradient).
void set_background_gradient_radial (float cx, float cy, float radius_frac, const std::vector< Color > &colors, const std::vector< float > &positions)
 Radial gradient.
void set_background_gradient_conic (float cx, float cy, float start_angle, const std::vector< Color > &colors, const std::vector< float > &positions, float sweep_turns=1.0f)
 Conic (CSS conic-gradient / Figma angular).
float background_gradient_sweep_turns () const
 Turns of the circle the conic stop list spans; < 1 means it repeats.
void clear_background_gradient ()
bool has_background_gradient () const
int background_gradient_type () const
 0=none, 1=linear, 2=radial, 3=conic. Exposed for tests/inspection.
float background_gradient_radius () const
 The legacy single-radius slot, as a fraction of max(w,h).
void set_text_overflow_ellipsis (bool e)
 Text overflow: ellipsis (CSS text-overflow: ellipsis).
bool text_overflow_ellipsis () const
void set_direction (WritingDirection d)
WritingDirection direction () const
WritingDirection resolved_direction () const
 Resolve auto_ → ltr (LTR fallback, until first-strong-character detection is wired).
void set_white_space_nowrap (bool n)
bool white_space_nowrap () const
void set_white_space_mode (WhiteSpaceMode m)
WhiteSpaceMode white_space_mode () const
void set_mix_blend_mode (canvas::Canvas::BlendMode m)
 CSS / RN mix-blend-mode.
canvas::Canvas::BlendMode mix_blend_mode () const
bool has_non_default_blend_mode () const
void set_cursor (CursorStyle c)
CursorStyle cursor () const
void set_user_select (UserSelect s)
UserSelect user_select () const

Static Public Member Functions

static bool supported ()
 True when Lottie support is compiled in (PULP_LOTTIE / PULP_HAS_LOTTIE).
static std::uint64_t structure_generation () noexcept
 Process-wide compatibility generation retained for existing SDK users.
static std::uint64_t layout_generation () noexcept
static void bump_layout_generation () noexcept
static std::uint64_t damage_request_count () noexcept
 Number of layout_children() calls since process start.
static std::uint64_t unmarked_paint_mutation_count () noexcept
static void note_unmarked_paint_mutation () noexcept
 Record a paint change that requested no repaint of its own.
static std::uint64_t layout_pass_count () noexcept
static std::uint64_t constructed_count () noexcept
 Views constructed and destroyed since process start.
static std::uint64_t destroyed_count () noexcept
static View * focus_next (View &root, View *current)
static View * focus_prev (View &root, View *current)
static std::vector< OverlayRequest > & overlay_queue ()
static void paint_overlays (canvas::Canvas &canvas, View *painting_root=nullptr)
 Paint queued overlays + the inspector paint hook.
static void set_inspector_paint_hook (std::function< void(canvas::Canvas &, View *painting_root)> hook)
 Inspector hooks — set by the inspector module to intercept input and paint without a circular dependency (view doesn't link inspect).
static void set_inspector_key_hook (std::function< bool(const KeyEvent &)> hook)
static bool call_inspector_key_hook (const KeyEvent &e)
static void set_inspector_mouse_hook (std::function< bool(const MouseEvent &, View *event_root)> hook)
 Inspector mouse hook.
static bool call_inspector_mouse_hook (const MouseEvent &e, View *event_root=nullptr)
static void set_inspector_text_hook (std::function< bool(const TextInputEvent &, View *event_root)> hook)
 Inspector text-input hook for inline Text-tool editing.
static bool call_inspector_text_hook (const TextInputEvent &e, View *event_root=nullptr)
static void set_inspector_cursor_hook (std::function< int(const MouseEvent &, View *event_root)> hook)
 Inspector cursor-affordance hook.
static int call_inspector_cursor_hook (const MouseEvent &e, View *event_root=nullptr)
static void dismiss_active_overlay ()
 Dismiss-path release.
static void dismiss_active_overlay (View &scope)
 Hosted variant acts only on scope's interaction slot.
static ResolvedRadial resolve_radial (const BackgroundGradient &g, float w, float h)
 Resolve a radial layer's CSS sizing against a box of w x h.

Public Attributes

std::function< void()> on_click
 Generic click callback (fires on mouse-down, if set).
std::function< void(const MouseEvent &)> on_pointer_event
 JS pointer event callback.
std::function< void(const MouseEvent &, bool)> on_dom_pointer_event
 One DOM origin.
std::function< void(const MouseEvent &, bool)> on_dom_pointer_move_event
std::function< void(const MouseEvent &, bool is_dom_origin)> on_dom_wheel_event
 Bridge wheel delivery.
std::function< void(Point)> on_drag
 JS pointermove during drag callback.
std::function< void(const MouseEvent &)> on_pointer_move
 JS pointermove carrying full pointer identity (id + type + pressure).
std::function< void(const GestureEvent &)> on_gesture_cb
 JS gesture event callback.
std::function< void(Point position)> on_context_menu
 Right-click context menu callback.
std::function< void(const std::string &type, const std::string &data, float x, float y)> on_drop
 Drop callback — fired when files or text are dropped on this view.
std::function< void()> on_hover_enter
 Hover callbacks (CSS :hover equivalent). Fired by set_hovered().
std::function< void()> on_hover_leave
std::function< void()> on_overlay_dismissed
 Fired when the active overlay is dismissed via a framework auto-dismissal path (ESC / outside-click).
std::function< void(const std::string &id, uint16_t modifiers)> on_global_click
 Global click callback (fires on any view click with widget id). Set on root.
std::function< bool(const KeyEvent &)> on_global_key
 Global key callback.
std::function< bool(const KeyEvent &)> on_navigation_key
 Root-scoped callback installed only while a materialized document owns the bounded navigation-focus capability.

Static Public Attributes

static View * active_overlay_
static View * focused_input_
 Global input-focus shim slot.

Protected Member Functions

void mark_runtime_view_kind (RuntimeViewKind kind)

Member Enumeration Documentation

◆ AccessRole

enum class pulp::view::View::AccessRole
stronginherited

Screen-reader role.

Maps to a concrete platform role on all five bridges — see platform/{ns_role_mapping,uia_mapping,atspi_mapping}.hpp, accessibility_ios.mm, and the ROLE_* constants in PulpAccessibility.kt. ARIA tokens map in via pulp/view/aria_roles.hpp. toggle is ARIA switch; meter is a read-only gauge, progress_bar task progress.

ORDINALS ARE WIRE FORMAT — the Android JNI bridge marshals the role as static_cast<int>(role) and PulpAccessibility.kt matches on the integer. APPEND ONLY; never reorder or remove. Locked by test_accessibility_tree.

A role NAMES a widget; it does not implement that widget's platform interaction pattern (combobox expand/collapse, table traversal, invoke). See docs/guides/modules/view.md for what is and is not wired.

Enumerator
none 
slider 
toggle 
label 
group 
meter 
image 
button 
link 
checkbox 
radio 
text_field 
combo_box 
list 
list_item 
table 
row 
cell 
tab 
tab_list 
menu 
menu_item 
progress_bar 
dialog 
heading 
scroll_bar 

◆ BorderCurve

enum class pulp::view::View::BorderCurve
stronginherited

RN's borderCurve: corner shape selection.

circular (default) is the standard quarter-circle rounded corner; continuous is the iOS-style super-ellipse / squircle approximation. View::paint_all picks the appropriate path generator based on this slot. Slot has no effect when border-radius is 0.

Enumerator
circular 
continuous 

◆ BorderStyle

enum class pulp::view::View::BorderStyle
stronginherited

CSS / RN border-style.

dashed / dotted are a stroke dash (no-op on CG). The double and 3D styles paint as bands of per-side colour (see border_style.hpp). none / hidden skip the border entirely.

Enumerator
solid 

Default — single continuous line.

dashed 

Dash of 2w on, 1w off.

dotted 

Dash of 1w on, 1w off.

double_ 

Two lines in the side colour with a gap between.

groove 

Outer half shaded as inset, inner half as outset.

ridge 

Outer half shaded as outset, inner half as inset.

inset 

Top/left darkened, bottom/right lightened.

outset 

Top/left lightened, bottom/right darkened.

none 

No border drawn (paint short-circuits).

hidden 

Same as none for paint purposes.

◆ CursorStyle

enum class pulp::view::View::CursorStyle
stronginherited

Cursor style hint (CSS cursor property).

Enumerator
default_ 
pointer 
crosshair 
text 
grab 
grabbing 
not_allowed 
invisible 

Hidden cursor (custom drag, knob rotation).

horizontal_resize 

↔ Left-right resize (SplitView, column borders)

vertical_resize 

↕ Up-down resize (SplitView, row borders)

top_left_resize 

↖↘ Diagonal resize (NW-SE)

top_right_resize 

↗↙ Diagonal resize (NE-SW)

bottom_left_resize 

↗↙ Diagonal resize (alias for top_right)

bottom_right_resize 

↖↘ Diagonal resize (alias for top_left)

multi_directional_resize 

✥ All-direction move/resize

alias 

CSS alias → NSCursor.dragLinkCursor.

copy 

CSS copy → NSCursor.dragCopyCursor.

zoom_in 

CSS zoom-in → NSCursor.zoomInCursor (macOS 10.15+).

zoom_out 

CSS zoom-out → NSCursor.zoomOutCursor (macOS 10.15+).

context_menu 

CSS context-menu → NSCursor.contextualMenuCursor.

◆ ListStylePosition

enum class pulp::view::View::ListStylePosition
stronginherited
Enumerator
outside 

Marker hangs in the margin (CSS default).

inside 

Marker is part of the content box.

◆ ListStyleType

enum class pulp::view::View::ListStyleType
stronginherited

CSS / RN list-style cluster.

Pulp doesn't model HTML /

; these slots store the values the consumer set so a list semantic surface can honor them. The bridge round-trips the keyword/url; View itself does not paint markers.

Enumerator
none 

No marker.

disc 

Filled circle (default for.

.

circle 

Hollow circle.

square 

Filled square.

decimal 

Numeric (default for.

— needs sibling-index, not painted yet.

decimal_leading_zero 

01, 02, ... 09, 10, 11.

lower_roman 

i, ii, iii, iv, v.

upper_roman 

I, II, III, IV, V.

lower_alpha 

a, b, c — CSS alias of lower-latin.

upper_alpha 

A, B, C — CSS alias of upper-latin.

lower_latin 

a, b, c.

upper_latin 

A, B, C.

lower_greek 

α, β, γ.

armenian 

Traditional Armenian numbering.

georgian 

Traditional Georgian numbering.

◆ Overflow

enum class pulp::view::View::Overflow
stronginherited

Overflow mode.

hidden and scroll both clip painting to the box; scroll additionally makes the container SCROLLABLE (see below). The Yoga layout path forwards the enum through YGNodeStyleSetOverflow so the engine knows about it for descendant-overflow measurement.

Enumerator
hidden 
visible 
scroll 

◆ PointerEvents

enum class pulp::view::View::PointerEvents
stronginherited

React Native pointerEvents.

Four-valued enum that mirrors RN's contract: auto — default; this view AND children are interactive. none — neither this view NOR descendants intercept events. box_only — this view receives events; children do NOT. box_none — this view does NOT receive events but children do. hit_test() honors all four cases. set_hit_testable(false) is the legacy two-valued knob and is preserved by also short-circuiting hit_test() — set_pointer_events(PointerEvents::none) is the idiomatic RN-shaped equivalent.

Enumerator
auto_ 
none 
box_only 
box_none 

◆ Position

enum class pulp::view::View::Position
stronginherited

CSS position property.

Enumerator
static_ 
relative 
absolute 
fixed 
sticky 

◆ UserSelect

enum class pulp::view::View::UserSelect
stronginherited

CSS user-select.

Stored slot for the keyword the JS shim resolves to. Read by interactive widgets (TextEditor, Label) that participate in text selection. auto_ is the spec default and resolves per-widget to whatever its native selectability is.

Enumerator
auto_ 
none 
text 
all 
contain 

◆ WhiteSpaceMode

enum class pulp::view::View::WhiteSpaceMode
stronginherited

White-space: nowrap (CSS white-space: nowrap).

Generic flag so non-Label widgets (Button, custom text-bearing views) and text-shaper consumers can react to nowrap without dynamic_casting to a specific widget type. Label keeps its multi_line_ flag in lock-step via WidgetBridge::setWhiteSpace, so existing callers keep working.

Enumerator
normal 
nowrap 
pre 
pre_wrap 
pre_line 
break_spaces 

◆ WritingDirection

enum class pulp::view::View::WritingDirection
stronginherited

Writing direction (CSS direction / RN writingDirection).

LTR is the default; RTL flips text shaping (Skia paragraph_style.setTextDirection), Yoga's flow (YGDirectionRTL — flexDirection 'row' visually reverses), and textAlign 'auto' resolution at paint time. The View::direction_ state propagates inheritance only when the caller plumbs it through the tree. Enum is tri-state; auto_ currently resolves to the LTR fallback.

Enumerator
ltr 
rtl 
auto_ 

Constructor & Destructor Documentation

◆ LottieView()

pulp::view::LottieView::LottieView ( )

◆ ~LottieView()

pulp::view::LottieView::~LottieView ( )
override

Member Function Documentation

◆ accepts_navigation_input()

virtual bool pulp::view::View::accepts_navigation_input ( ) const
inlinevirtualinherited

Does this widget temporarily need host-delivered navigation keys?

Plugin roots must not become general keyboard sinks: doing so steals transport and musical-typing keys from the DAW. Interactive controls may opt in while a bounded navigation interaction is active (for example, ComboBox returns true only while its menu is open). Appended after the pre-existing View virtual surface so older slots do not move for installed-SDK consumers.

Reimplemented in pulp::view::ComboBox, and pulp::view::ContextMenu.

◆ accepts_text_input()

virtual bool pulp::view::View::accepts_text_input ( ) const
inlinevirtualinherited

Does this widget consume printable character keys for text entry?

Default false. Override to true on TextEditor and any future text-accepting widget. Used by WidgetBridge::forward_key_event to suppress bare-key global shortcuts (e.g. bare ? for cheatsheet) while the user is typing — non-text focusables like Knob, Button, ListBox return false so single-key shortcuts still fire after they take focus.

Reimplemented in pulp::view::KeyMappingEditor, and pulp::view::TextEditor.

◆ access_checked()

const std::string & pulp::view::View::access_checked ( ) const
inlineinherited

◆ access_disabled()

const std::string & pulp::view::View::access_disabled ( ) const
inlineinherited

◆ access_hidden()

const std::string & pulp::view::View::access_hidden ( ) const
inlineinherited

◆ access_label()

const std::string & pulp::view::View::access_label ( ) const
inlineinherited

The resolved accessible name: author-set if present, else content-derived.

◆ access_pressed()

const std::string & pulp::view::View::access_pressed ( ) const
inlineinherited

◆ access_role()

AccessRole pulp::view::View::access_role ( ) const
inlineinherited

◆ access_value()

const std::string & pulp::view::View::access_value ( ) const
inlineinherited

◆ active_animation_count()

int pulp::view::View::active_animation_count ( ) const
inlineinherited

Number of animations currently running on this view. For tests.

◆ active_animations() [1/2]

std::vector< CssAnimation > & pulp::view::View::active_animations ( )
inlineinherited

Active running animations on this View.

Owned here so the per-View lifetime matches the View's.

◆ active_animations() [2/2]

const std::vector< CssAnimation > & pulp::view::View::active_animations ( ) const
inlineinherited

◆ add_box_shadow()

void pulp::view::View::add_box_shadow ( float ox,
float oy,
float blur,
float spread,
Color c,
bool inset = false )
inlineinherited

Appends a layer, preserving CSS author order: box-shadow: A, B is set_box_shadow(A) followed by add_box_shadow(B).

A is the first layer and therefore paints ON TOP of B — see the reverse iteration in View::paint_all. Layered shadows are how a design expresses depth: a wide soft halo plus a tight dark contact shadow. Keeping only the first layer keeps the halo and drops the contact shadow, which reads as flat.

◆ add_child()

std::unique_ptr< View > pulp::view::View::add_child ( std::unique_ptr< View > child)
inherited

Attaches child and returns nullptr.

A child that is this view itself or one of its ancestors is refused and handed back, so a caller that cached the raw pointer can drop it instead of dangling.

◆ add_child_transactional()

bool pulp::view::View::add_child_transactional ( std::unique_ptr< View > & child)
inherited

◆ add_gesture_recognizer()

GestureRecognizer & pulp::view::View::add_gesture_recognizer ( std::unique_ptr< GestureRecognizer > recognizer)
inherited

◆ advance()

void pulp::view::LottieView::advance ( float dt)

Advance the playhead by dt seconds (scaled by speed, looped/clamped).

Called automatically from the FrameClock; exposed for headless tests. Honors the reduced-motion "off" policy by not advancing.

◆ advance_animations()

virtual void pulp::view::View::advance_animations ( float dt)
inlinevirtualinherited

Advance any per-widget non-CSS animation state (hover glows, thumb tweens, spinner phase) by dt seconds.

Default no-op; widgets with interactive animation override this. Driven every frame by the host frame pump alongside the CSS tick_animations() timeline.

Reimplemented in pulp::view::Fader, pulp::view::Knob, pulp::view::PanControl, pulp::view::RangeSlider, pulp::view::ScrollView, pulp::view::SidePanel, pulp::view::Spinner, pulp::view::Toggle, and pulp::view::Tooltip.

◆ advance_gesture_recognizers()

void pulp::view::View::advance_gesture_recognizers ( double timestamp_seconds = -1.0)
inherited

◆ ancestor_clip_radii()

const std::array< float, 4 > & pulp::view::View::ancestor_clip_radii ( ) const
inlineinherited

◆ ancestor_clip_rect()

const std::optional< Rect > & pulp::view::View::ancestor_clip_rect ( ) const
inlineinherited

◆ anchor_id()

const std::string & pulp::view::View::anchor_id ( ) const
inlineinherited

◆ animate()

int pulp::view::View::animate ( std::function< void(float)> apply,
float from,
float to,
float duration_s,
std::function< float(float)> ease = {},
std::function< void()> on_done = {},
const std::string & tag = {} )
inherited

◆ animation_play_state()

const std::string & pulp::view::View::animation_play_state ( ) const
inlineinherited

◆ appearance()

const std::string & pulp::view::View::appearance ( ) const
inlineinherited

◆ applies_child_paint_offset()

virtual bool pulp::view::View::applies_child_paint_offset ( ) const
inlinevirtualinherited

True when this container translates its CHILDREN's paint in a way a plain bounds-offset walk cannot model — e.g.

a scrolled ScrollView. Bounded invalidation escalates to full when any ancestor reports true, so a scrolled sub-view never targets the wrong root rect. This is a whole-container predicate, deliberately independent of child_paint_offset(): over-reporting true only costs a wider repaint, whereas deriving it from one child's offset would miss a container that moves some children and not others.

Reimplemented in pulp::view::ScrollView.

◆ as_selectable_text() [1/2]

virtual SelectableText * pulp::view::View::as_selectable_text ( )
inlinevirtualinherited

This view's painted text can join a cross-widget selection; null for the vast majority of views, which carry no text.

A virtual hook rather than a dynamic_cast because a live drag re-walks the whole subtree per pointer sample. See pulp/view/selectable_text.hpp.

Reimplemented in pulp::view::Label, and pulp::view::TextEditor.

◆ as_selectable_text() [2/2]

const SelectableText * pulp::view::View::as_selectable_text ( ) const
inlineinherited

◆ backdrop_blur()

float pulp::view::View::backdrop_blur ( ) const
inlineinherited

◆ backdrop_filter_chain()

const std::vector< FilterOp > & pulp::view::View::backdrop_filter_chain ( ) const
inlineinherited

◆ backface_visible()

bool pulp::view::View::backface_visible ( ) const
inlineinherited

React Native backfaceVisibility.

Stored on the View for plumbing parity with @pulp/react. Pulp's transform model is currently 2D-affine, so this behaves as a paint-time no-op.

◆ background_attachment()

const std::string & pulp::view::View::background_attachment ( ) const
inlineinherited

◆ background_clip()

const std::string & pulp::view::View::background_clip ( ) const
inlineinherited

◆ background_color()

Color pulp::view::View::background_color ( ) const
inlineinherited

◆ background_gradient_layers()

const std::vector< BackgroundGradient > & pulp::view::View::background_gradient_layers ( ) const
inlineinherited

◆ background_gradient_radius()

float pulp::view::View::background_gradient_radius ( ) const
inlineinherited

The legacy single-radius slot, as a fraction of max(w,h).

Reports what set_background_gradient_radial() was given and nothing else — a radial parsed from CSS has per-axis radii that this cannot express, and leaves this at its default. Use resolve_radial() for a gradient's real geometry.

◆ background_gradient_sweep_turns()

float pulp::view::View::background_gradient_sweep_turns ( ) const
inlineinherited

Turns of the circle the conic stop list spans; < 1 means it repeats.

Exposed for tests/inspection.

◆ background_gradient_type()

int pulp::view::View::background_gradient_type ( ) const
inlineinherited

0=none, 1=linear, 2=radial, 3=conic. Exposed for tests/inspection.

◆ background_origin()

const std::string & pulp::view::View::background_origin ( ) const
inlineinherited

◆ background_position()

const std::string & pulp::view::View::background_position ( ) const
inlineinherited

◆ background_repeat()

const std::string & pulp::view::View::background_repeat ( ) const
inlineinherited

◆ background_size()

const std::string & pulp::view::View::background_size ( ) const
inlineinherited

◆ border_bottom_color()

Color pulp::view::View::border_bottom_color ( ) const
inlineinherited

◆ border_bottom_width()

float pulp::view::View::border_bottom_width ( ) const
inlineinherited

◆ border_color()

Color pulp::view::View::border_color ( ) const
inlineinherited

◆ border_curve()

BorderCurve pulp::view::View::border_curve ( ) const
inlineinherited

◆ border_left_color()

Color pulp::view::View::border_left_color ( ) const
inlineinherited

◆ border_left_width()

float pulp::view::View::border_left_width ( ) const
inlineinherited

◆ border_right_color()

Color pulp::view::View::border_right_color ( ) const
inlineinherited

◆ border_right_width()

float pulp::view::View::border_right_width ( ) const
inlineinherited

◆ border_style()

BorderStyle pulp::view::View::border_style ( ) const
inlineinherited

◆ border_top_color()

Color pulp::view::View::border_top_color ( ) const
inlineinherited

Per-side getters.

The standalone setBorderTop/Right/... {Color,Width} bridge calls need to preserve the unrelated attribute when only one is being changed by a JSX prop diff.

◆ border_top_width()

float pulp::view::View::border_top_width ( ) const
inlineinherited

◆ border_width()

float pulp::view::View::border_width ( ) const
inlineinherited

◆ bottom()

float pulp::view::View::bottom ( ) const
inlineinherited

◆ bottom_unit()

DimensionUnit pulp::view::View::bottom_unit ( ) const
inlineinherited

◆ bounds()

Rect pulp::view::View::bounds ( ) const
inlineinherited

◆ box_shadow()

const BoxShadow & pulp::view::View::box_shadow ( ) const
inlineinherited

The first (topmost) layer, or a default-constructed shadow when the stack is empty — callers that only ever set one shadow can keep treating this as "the" shadow.

◆ box_shadows()

const std::vector< BoxShadow > & pulp::view::View::box_shadows ( ) const
inlineinherited

Every layer, in CSS author order (first paints on top).

◆ bump_layout_generation()

void pulp::view::View::bump_layout_generation ( )
inlinestaticnoexceptinherited

◆ call_inspector_cursor_hook()

int pulp::view::View::call_inspector_cursor_hook ( const MouseEvent & e,
View * event_root = nullptr )
staticinherited

◆ call_inspector_key_hook()

bool pulp::view::View::call_inspector_key_hook ( const KeyEvent & e)
staticinherited

◆ call_inspector_mouse_hook()

bool pulp::view::View::call_inspector_mouse_hook ( const MouseEvent & e,
View * event_root = nullptr )
staticinherited

◆ call_inspector_text_hook()

bool pulp::view::View::call_inspector_text_hook ( const TextInputEvent & e,
View * event_root = nullptr )
staticinherited

◆ cancel_animation()

void pulp::view::View::cancel_animation ( int id)
inherited

Cancel a running animation by id (no-op if already finished/unknown).

◆ cancel_drag()

void pulp::view::View::cancel_drag ( )
inherited

◆ capture_native_overlay_png()

virtual std::vector< uint8_t > pulp::view::View::capture_native_overlay_png ( uint32_t ,
uint32_t  )
inlinevirtualinherited

When this view owns a native overlay (a WebView pane), it overrides this to return an in-process PNG snapshot of that overlay (e.g.

WKWebView takeSnapshot). capture_view calls it for contains_native_overlay() subtrees so even native overlays are headlessly capturable instead of refused. Default empty = "no in-process snapshot available". Main-thread.

Reimplemented in pulp::view::NativeViewHost.

◆ captured_box_paint_bottom()

float pulp::view::View::captured_box_paint_bottom ( ) const
inlineinherited

◆ captured_box_paint_left()

float pulp::view::View::captured_box_paint_left ( ) const
inlineinherited

◆ captured_box_paint_right()

float pulp::view::View::captured_box_paint_right ( ) const
inlineinherited

◆ captured_box_paint_top()

float pulp::view::View::captured_box_paint_top ( ) const
inlineinherited

◆ captured_frame_root()

bool pulp::view::View::captured_frame_root ( ) const
inlineinherited

◆ child_at() [1/2]

View * pulp::view::View::child_at ( size_t index)
inlineinherited

◆ child_at() [2/2]

const View * pulp::view::View::child_at ( size_t index) const
inlineinherited

◆ child_count()

size_t pulp::view::View::child_count ( ) const
inlineinherited

◆ child_paint_offset()

virtual Point pulp::view::View::child_paint_offset ( const View & child) const
inlinevirtualinherited

The translation this container applies to ONE child's paint, in the container's own coordinate space.

It takes the child because the answer is not uniform: a scrolled ScrollView shifts an ordinary child by (-scroll_x, -scroll_y) but pins a Position::sticky child vertically, so the same container returns two different offsets. A flex/grid container returns (0, 0) for every child because it positions them at their bounds origin. Any walk that converts a descendant's bounds into an ancestor's space must accumulate this in addition to bounds(), or it reports the UNSCROLLED position forever.

This is THE offset an overflow: scroll container scrolls by: both paint_children_in_order() and hit_test() route through this one function, so a scrolled child paints and hit-tests at the same place by construction — the invariant ContextMenu gets by baking its offset into the row rects. Changing the rule here moves both halves together.

Reimplemented in pulp::view::ScrollView.

◆ children_in_z_order()

bool pulp::view::View::children_in_z_order ( ) const
inherited

True iff children_ is already in that order — paint_all's fast path then iterates children_ directly, no sorted-copy alloc. Exposed for tests.

◆ claim_input_focus()

void pulp::view::View::claim_input_focus ( )
inherited

Claim focus / overlay for this view's tree.

Writes the root-owned slot AND the process-global shim mirror. Defined out-of-line (needs tree_root).

◆ claim_overlay()

void pulp::view::View::claim_overlay ( const View * stacks_on = nullptr)
inherited

Open this view as an overlay under its root.

A claim that DESCENDS from the open overlay nests on it, so a submenu leaves its menu open and dismissing it restores the menu; any other claim dismisses the open one (firing on_overlay_dismissed), and re-claiming a view on the stack closes everything above it. stacks_on declares that relationship for a lifted submenu its menu's subtree does not contain; see view.cpp for both rules in full.

◆ clear_background_color()

void pulp::view::View::clear_background_color ( )
inlineinherited

◆ clear_background_gradient()

void pulp::view::View::clear_background_gradient ( )
inlineinherited

◆ clear_border()

void pulp::view::View::clear_border ( )
inlineinherited

◆ clear_box_shadow()

void pulp::view::View::clear_box_shadow ( )
inlineinherited

◆ clear_filter_chain()

void pulp::view::View::clear_filter_chain ( )
inlineinherited

◆ clear_gesture_recognizers()

void pulp::view::View::clear_gesture_recognizers ( )
inherited

◆ clear_inheritable_font_family()

void pulp::view::View::clear_inheritable_font_family ( )
inlineinherited

◆ clear_inheritable_font_size()

void pulp::view::View::clear_inheritable_font_size ( )
inlineinherited

◆ clear_inheritable_font_weight()

void pulp::view::View::clear_inheritable_font_weight ( )
inlineinherited

◆ clear_inheritable_letter_spacing()

void pulp::view::View::clear_inheritable_letter_spacing ( )
inlineinherited

◆ clear_inheritable_text_align()

void pulp::view::View::clear_inheritable_text_align ( )
inlineinherited

◆ clear_inheritable_text_color()

void pulp::view::View::clear_inheritable_text_color ( )
inlineinherited

◆ clear_layout_dirty()

void pulp::view::View::clear_layout_dirty ( )
inlineinherited

◆ clear_source_loc()

void pulp::view::View::clear_source_loc ( )
inlineinherited

◆ clear_transform_matrix()

void pulp::view::View::clear_transform_matrix ( )
inlineinherited

◆ clear_transitions()

void pulp::view::View::clear_transitions ( )
inlineinherited

◆ clip_marker_tolerance()

bool pulp::view::View::clip_marker_tolerance ( ) const
inlineinherited

◆ clip_path()

const std::string & pulp::view::View::clip_path ( ) const
inlineinherited

◆ constructed_count()

std::uint64_t pulp::view::View::constructed_count ( )
inlinestaticnoexceptinherited

Views constructed and destroyed since process start.

A lifetime seam: a measurement that builds a tree and tears it down must leave the two advanced by the same amount, which no memory reading can prove.

◆ contains_native_overlay()

bool pulp::view::View::contains_native_overlay ( ) const
inlineinherited

True when this view (or its subtree) attaches a NATIVE child overlay — a WebView / NSView / HWND that is composited by the OS window server, NOT painted into the Pulp Skia canvas by paint_all().

Such overlays are invisible to headless capture (render_to_png / HeadlessSurface); the smart capture path (capture_view) reads this to refuse with a clear reason instead of silently returning a blank frame. Generic on purpose — the owning wrapper view sets it (e.g. a WebView pane), so capture does not need to know about WebView specifically.

◆ corner_radius()

float pulp::view::View::corner_radius ( ) const
inlineinherited

◆ corner_radius_bl()

float pulp::view::View::corner_radius_bl ( ) const
inlineinherited

◆ corner_radius_bl_pct()

float pulp::view::View::corner_radius_bl_pct ( ) const
inlineinherited

◆ corner_radius_br()

float pulp::view::View::corner_radius_br ( ) const
inlineinherited

◆ corner_radius_br_pct()

float pulp::view::View::corner_radius_br_pct ( ) const
inlineinherited

◆ corner_radius_pct()

float pulp::view::View::corner_radius_pct ( ) const
inlineinherited

◆ corner_radius_tl()

float pulp::view::View::corner_radius_tl ( ) const
inlineinherited

◆ corner_radius_tl_pct()

float pulp::view::View::corner_radius_tl_pct ( ) const
inlineinherited

◆ corner_radius_tr()

float pulp::view::View::corner_radius_tr ( ) const
inlineinherited

◆ corner_radius_tr_pct()

float pulp::view::View::corner_radius_tr_pct ( ) const
inlineinherited

◆ cursor()

CursorStyle pulp::view::View::cursor ( ) const
inlineinherited

◆ damage_request_count()

std::uint64_t pulp::view::View::damage_request_count ( )
inlinestaticnoexceptinherited

Number of layout_children() calls since process start.

A test seam: the property under test is "how many tree walks did that read loop cost", which timing cannot answer reliably and this can. Repaint requests that marked damage (bounded or whole surface) since process start, and paint mutations that staled caches WITHOUT marking any. A caller that batches work and owes the host a repaint for it (the script bridge after a native dispatch) compares both before and after: when the work marked its own damage and left nothing unmarked, the marks already scheduled the repaint and a blanket whole-surface request would only widen it.

◆ default_hover_feedback()

bool pulp::view::View::default_hover_feedback ( ) const
inlineinherited

◆ derived_access_label()

const std::string & pulp::view::View::derived_access_label ( ) const
inlineinherited

The content-derived name on its own, ignoring any author-set name.

◆ destroyed_count()

std::uint64_t pulp::view::View::destroyed_count ( )
inlinestaticnoexceptinherited

◆ direction()

WritingDirection pulp::view::View::direction ( ) const
inlineinherited

◆ dismiss_active_overlay() [1/2]

void pulp::view::View::dismiss_active_overlay ( )
staticinherited

Dismiss-path release.

Releases the active overlay (if any) and fires its on_overlay_dismissed callback so React state can flip setOpen(false) to keep the JSX tree in sync. Called by the platform window host from the ESC keypath and the outside-click path. No-op if nothing claimed the slot.

◆ dismiss_active_overlay() [2/2]

void pulp::view::View::dismiss_active_overlay ( View & scope)
staticinherited

Hosted variant acts only on scope's interaction slot.

◆ dismiss_claimed_overlay()

void pulp::view::View::dismiss_claimed_overlay ( )
inherited

Dismiss this exact overlay when it owns its root's overlay slot.

Unlike the legacy process-global entry point, this cannot dismiss an overlay belonging to another hosted editor whose claim happened more recently.

◆ dispatch_gesture_pointer_event()

bool pulp::view::View::dispatch_gesture_pointer_event ( const MouseEvent & root_event,
double timestamp_seconds = -1.0 )
inherited

◆ drag_active()

bool pulp::view::View::drag_active ( ) const
inherited

◆ drag_to()

void pulp::view::View::drag_to ( Point root_pos)
inherited

◆ drop_here()

bool pulp::view::View::drop_here ( Point root_pos)
inherited

◆ duration()

double pulp::view::LottieView::duration ( ) const

◆ effect()

const std::shared_ptr< canvas::ViewEffect > & pulp::view::View::effect ( ) const
inlineinherited

◆ effective_corner_radius()

float pulp::view::View::effective_corner_radius ( float width,
float height ) const
inlineinherited

Compute the effective uniform corner radius in px against the given bounds (called by paint code).

◆ effective_corner_radius_bl()

float pulp::view::View::effective_corner_radius_bl ( float w,
float h ) const
inlineinherited

◆ effective_corner_radius_br()

float pulp::view::View::effective_corner_radius_br ( float w,
float h ) const
inlineinherited

◆ effective_corner_radius_tl()

float pulp::view::View::effective_corner_radius_tl ( float w,
float h ) const
inlineinherited

Compute effective per-corner radius (px) against given bounds.

◆ effective_corner_radius_tr()

float pulp::view::View::effective_corner_radius_tr ( float w,
float h ) const
inlineinherited

◆ effective_metrics()

WidgetMetrics * pulp::view::View::effective_metrics ( ) const
inherited

The metrics delegate that governs THIS view: its own if it has one, else the nearest ancestor's, else null (meaning "use the stock size").

◆ effective_painter()

WidgetPainter * pulp::view::View::effective_painter ( ) const
inherited

The painter that governs THIS view: its own if it has one, else the nearest ancestor's, else null (meaning "draw the stock look").

◆ enabled()

bool pulp::view::View::enabled ( ) const
inlineinherited

CSS :disabled equivalent — blocks input, reduces opacity.

◆ existing_interaction()

RootInteractionState * pulp::view::View::existing_interaction ( )
inherited

Resolved interaction state WITHOUT lazily allocating — the root's slot if one exists, else the process-global fallback, else nullptr.

For guarded releases and destructors (including ~ComboBox) that must not allocate a state block on a tree that never had one.

◆ filter_blur()

float pulp::view::View::filter_blur ( ) const
inlineinherited

◆ filter_chain()

const std::vector< FilterOp > & pulp::view::View::filter_chain ( ) const
inlineinherited

◆ find_transition_for()

const TransitionSpec * pulp::view::View::find_transition_for ( const std::string & property) const
inlineinherited

Find the matching transition for a given property name.

Returns nullptr if no transition applies (CSS spec: the snap path — commit the new value immediately). 'all' entries match any property; named entries match only that exact property.

◆ flex() [1/2]

FlexStyle & pulp::view::View::flex ( )
inlineinherited

◆ flex() [2/2]

const FlexStyle & pulp::view::View::flex ( ) const
inlineinherited

◆ focus_next()

View * pulp::view::View::focus_next ( View & root,
View * current )
staticinherited

◆ focus_prev()

View * pulp::view::View::focus_prev ( View & root,
View * current )
staticinherited

◆ focusable()

bool pulp::view::View::focusable ( ) const
inlineinherited

◆ font_variant()

const std::string & pulp::view::View::font_variant ( ) const
inlineinherited

◆ frame_clock()

FrameClock * pulp::view::View::frame_clock ( ) const
inherited

Get the frame clock (walks up parent chain to find it).

◆ gesture_claimed_pointer()

bool pulp::view::View::gesture_claimed_pointer ( ) const
inherited

True when a gesture recognizer ACTIVELY claimed the last pointer event.

Distinct from dispatch_gesture_pointer_event()'s return, which is true merely because a recognizer is a CANDIDATE here. Gate host early-returns on this: bailing on candidacy makes any control that registers a gesture undraggable, because the normal deliver_mouse_* path never runs.

◆ gesture_recognizer_at() [1/2]

GestureRecognizer * pulp::view::View::gesture_recognizer_at ( size_t index)
inherited

◆ gesture_recognizer_at() [2/2]

const GestureRecognizer * pulp::view::View::gesture_recognizer_at ( size_t index) const
inherited

◆ gesture_recognizer_count()

size_t pulp::view::View::gesture_recognizer_count ( ) const
inlineinherited

◆ get_transform_matrix()

void pulp::view::View::get_transform_matrix ( float & a,
float & b,
float & c,
float & d,
float & e,
float & f ) const
inlineinherited

Returns the six affine components in (a,b,c,d,e,f) order; meaningful only when has_transform_matrix() is true.

◆ grid() [1/2]

GridStyle & pulp::view::View::grid ( )
inlineinherited

◆ grid() [2/2]

const GridStyle & pulp::view::View::grid ( ) const
inlineinherited

◆ handle_scroll_wheel()

bool pulp::view::View::handle_scroll_wheel ( const MouseEvent & event)
inherited

Applies a wheel tick to this view's scroll offset; true when a scroll container with range consumed it.

Out-of-line so on_mouse_event stays one branch for the common non-scroll view.

◆ has_background_color()

bool pulp::view::View::has_background_color ( ) const
inlineinherited

◆ has_background_gradient()

bool pulp::view::View::has_background_gradient ( ) const
inlineinherited

◆ has_border()

bool pulp::view::View::has_border ( ) const
inlineinherited

◆ has_border_bottom_color_set()

bool pulp::view::View::has_border_bottom_color_set ( ) const
inlineinherited

◆ has_border_bottom_set()

bool pulp::view::View::has_border_bottom_set ( ) const
inlineinherited

◆ has_border_left_color_set()

bool pulp::view::View::has_border_left_color_set ( ) const
inlineinherited

◆ has_border_left_set()

bool pulp::view::View::has_border_left_set ( ) const
inlineinherited

◆ has_border_right_color_set()

bool pulp::view::View::has_border_right_color_set ( ) const
inlineinherited

◆ has_border_right_set()

bool pulp::view::View::has_border_right_set ( ) const
inlineinherited

◆ has_border_sides()

bool pulp::view::View::has_border_sides ( ) const
inlineinherited

◆ has_border_top_color_set()

bool pulp::view::View::has_border_top_color_set ( ) const
inlineinherited

Per-edge colour "explicitly set" probes.

A BorderSide default- constructs to opaque black, so a stored colour is indistinguishable from "never set" — and paint has to tell those apart, or a box that only ever received per-side WIDTHS gets four black edges instead of the uniform border_color() the shorthand asked for.

◆ has_border_top_set()

bool pulp::view::View::has_border_top_set ( ) const
inlineinherited

Per-edge "explicitly set" probes.

Yoga wiring uses these to distinguish "not set on this edge" (fall back to uniform border_width()) from "explicitly set to 0" (zero wins, even if the shorthand says 10).

◆ has_bottom()

bool pulp::view::View::has_bottom ( ) const
inlineinherited

◆ has_box_shadow()

bool pulp::view::View::has_box_shadow ( ) const
inlineinherited

◆ has_captured_box_paint_rect()

bool pulp::view::View::has_captured_box_paint_rect ( ) const
inlineinherited

◆ has_clip_path()

bool pulp::view::View::has_clip_path ( ) const
inlineinherited

◆ has_corner_radii()

bool pulp::view::View::has_corner_radii ( ) const
inlineinherited

Per-corner radius accessors. corner_radii_[0..3] = TL, TR, BL, BR.

◆ has_explicit_access_label()

bool pulp::view::View::has_explicit_access_label ( ) const
inlineinherited

True when an author explicitly named this view (set_access_label / aria-label), as opposed to the name being derived from its content.

◆ has_filter_chain()

bool pulp::view::View::has_filter_chain ( ) const
inlineinherited

◆ has_filter_effect()

bool pulp::view::View::has_filter_effect ( ) const
inlineinherited

True when this view paints under a pixel-spreading filter (blur or a filter-chain op) — it re-samples neighbors, so a child's changed region spreads past its mapped box.

Bounded invalidation escalates to a full repaint when this holds on the view or an ancestor (no stale halo).

◆ has_focus()

bool pulp::view::View::has_focus ( ) const
inlineinherited

◆ has_left()

bool pulp::view::View::has_left ( ) const
inlineinherited

◆ has_meter_source()

bool pulp::view::View::has_meter_source ( ) const
inherited

◆ has_non_default_blend_mode()

bool pulp::view::View::has_non_default_blend_mode ( ) const
inlineinherited

◆ has_pointer_capture()

bool pulp::view::View::has_pointer_capture ( int pointer_id) const
inherited

◆ has_render_transform()

bool pulp::view::View::has_render_transform ( ) const
inlineinherited

True when this view paints under any non-identity render transform (scale / rotation / translate / skew / explicit matrix).

Bounded invalidation escalates to a full repaint when this holds, since the plain parent-offset mapping to root space is only correct untransformed.

◆ has_right()

bool pulp::view::View::has_right ( ) const
inlineinherited

◆ has_scalar_source()

bool pulp::view::View::has_scalar_source ( ) const
inherited

◆ has_source_loc()

bool pulp::view::View::has_source_loc ( ) const
inlineinherited

◆ has_time_driven_gestures()

bool pulp::view::View::has_time_driven_gestures ( ) const
inherited

◆ has_top()

bool pulp::view::View::has_top ( ) const
inlineinherited

◆ has_transform_matrix()

bool pulp::view::View::has_transform_matrix ( ) const
inlineinherited

◆ has_transitions()

bool pulp::view::View::has_transitions ( ) const
inlineinherited

◆ hit_bounds()

Rect pulp::view::View::hit_bounds ( ) const
inlineinherited

local_bounds() grown by hit_slop().

The rect hit_test() actually accepts, and the one a test should assert against.

◆ hit_slop()

HitSlop pulp::view::View::hit_slop ( ) const
inlineinherited

◆ hit_test()

virtual View * pulp::view::View::hit_test ( Point local_point)
virtualinherited

◆ hit_testable()

bool pulp::view::View::hit_testable ( ) const
inlineinherited

CSS pointer-events: none — view is invisible to hit testing.

◆ host_actions()

HostActionSurface * pulp::view::View::host_actions ( ) const
inlineinherited

◆ host_params()

HostParamSurface * pulp::view::View::host_params ( ) const
inlineinherited

◆ id()

const std::string & pulp::view::View::id ( ) const
inlineinherited

◆ import_binding_instance_id()

std::uint64_t pulp::view::View::import_binding_instance_id ( ) const
inlineinherited

Stable for this View object's lifetime.

Used by import-binding claim guards so a rebuilt tree can bind even if the allocator reuses an old View address.

◆ import_binding_lifetime_token()

std::weak_ptr< const std::uint64_t > pulp::view::View::import_binding_lifetime_token ( ) const
inlineinherited

◆ include_font_padding()

bool pulp::view::View::include_font_padding ( ) const
inlineinherited

◆ inheritable_font_family()

std::optional< std::string > pulp::view::View::inheritable_font_family ( ) const
inherited

◆ inheritable_font_size()

std::optional< float > pulp::view::View::inheritable_font_size ( ) const
inherited

◆ inheritable_font_weight()

std::optional< int > pulp::view::View::inheritable_font_weight ( ) const
inherited

◆ inheritable_letter_spacing()

std::optional< float > pulp::view::View::inheritable_letter_spacing ( ) const
inherited

◆ inheritable_text_align()

std::optional< int > pulp::view::View::inheritable_text_align ( ) const
inherited

◆ inheritable_text_color()

std::optional< Color > pulp::view::View::inheritable_text_color ( ) const
inherited

Walks own value, then parent chain. nullopt if no ancestor set it.

◆ interaction() [1/2]

RootInteractionState & pulp::view::View::interaction ( )
inherited

Root-owned interaction state for this view's tree.

Root-aware code should prefer this over the process-global shim statics below.

◆ interaction() [2/2]

const RootInteractionState & pulp::view::View::interaction ( ) const
inherited

◆ intrinsic_height()

◆ intrinsic_width()

virtual float pulp::view::View::intrinsic_width ( ) const
inlinevirtualinherited

Intrinsic content size (override in widgets that know their natural size).

Returns 0 if no intrinsic size (use preferred_width/height instead).

Reimplemented in pulp::view::DesignFrameView, pulp::view::Label, and pulp::view::SvgPathWidget.

◆ invalidate_layout()

void pulp::view::View::invalidate_layout ( )
inlineinherited

Mark layout as needing recalculation (auto-invalidation).

◆ is_gesture_active()

virtual bool pulp::view::View::is_gesture_active ( ) const
inlinevirtualinherited

True while the user is actively manipulating this widget's value with a pointer drag (knob turn, fader/slider drag, XY-pad move).

Value-carrying widgets that track a drag gesture override this. A declarative native→widget binding (WidgetBridge::bindWidgetToParam) yields to an active gesture so a live param push never fights the user mid-drag.

Reimplemented in pulp::view::Fader, pulp::view::Knob, pulp::view::RangeSlider, and pulp::view::XYPad.

◆ is_hovered()

bool pulp::view::View::is_hovered ( ) const
inlineinherited

◆ is_scroll_container()

virtual bool pulp::view::View::is_scroll_container ( ) const
inlinevirtualinherited

True when this view scrolls its own content; ScrollView always does.

A content-extent walk stops at one, which owns its private overflow.

Reimplemented in pulp::view::ScrollView.

◆ isolation()

const std::string & pulp::view::View::isolation ( ) const
inlineinherited

◆ last_paint_self_ns()

std::uint32_t pulp::view::View::last_paint_self_ns ( ) const
inlineinherited

◆ last_paint_with_children_ns()

std::uint32_t pulp::view::View::last_paint_with_children_ns ( ) const
inlineinherited

◆ layout_children()

◆ layout_children_if_needed()

void pulp::view::View::layout_children_if_needed ( )
inlineinherited

Lay out only when a geometry mutation has happened since this root's last completed pass.

This is the shared host/bridge synchronization point: a bridge geometry read and the following GPU paint must not both walk the same unchanged tree.

◆ layout_dirty()

bool pulp::view::View::layout_dirty ( ) const
inlineinherited

◆ layout_generation()

std::uint64_t pulp::view::View::layout_generation ( )
inlinestaticnoexceptinherited

◆ layout_is_current()

bool pulp::view::View::layout_is_current ( ) const
inlinenoexceptinherited

◆ layout_mode()

LayoutMode pulp::view::View::layout_mode ( ) const
inlineinherited

◆ layout_pass_count()

std::uint64_t pulp::view::View::layout_pass_count ( )
inlinestaticnoexceptinherited

◆ left()

float pulp::view::View::left ( ) const
inlineinherited

◆ left_unit()

DimensionUnit pulp::view::View::left_unit ( ) const
inlineinherited

◆ list_style_image()

const std::string & pulp::view::View::list_style_image ( ) const
inlineinherited

◆ list_style_position()

ListStylePosition pulp::view::View::list_style_position ( ) const
inlineinherited

◆ list_style_type()

ListStyleType pulp::view::View::list_style_type ( ) const
inlineinherited

◆ local_bounds()

Rect pulp::view::View::local_bounds ( ) const
inlineinherited

◆ looping()

bool pulp::view::LottieView::looping ( ) const
inline

◆ map_rect_through_own_transform()

Rect pulp::view::View::map_rect_through_own_transform ( const Rect & local) const
inherited

Map a rect in this view's local (painted) coordinates through the paint transforms this view applies – the scalar translate/rotate/ scale around the transform origin, then the explicit affine matrix – into its own untransformed box coordinates.

Returns the axis-aligned bounds of the mapped corners, so a rotation can only widen it. Skew is not painted on the scalar path and is ignored here for the same reason.

◆ mark_layout_current()

void pulp::view::View::mark_layout_current ( )
inlinenoexceptinherited

◆ mark_runtime_view_kind()

void pulp::view::View::mark_runtime_view_kind ( RuntimeViewKind kind)
inlineprotectedinherited

◆ mask()

const std::string & pulp::view::View::mask ( ) const
inlineinherited

◆ mask_image()

const std::string & pulp::view::View::mask_image ( ) const
inlineinherited

◆ mask_size()

const std::string & pulp::view::View::mask_size ( ) const
inlineinherited

◆ max_scroll_offset_x()

float pulp::view::View::max_scroll_offset_x ( ) const
inherited

Scrollable range, content - viewport clamped at 0.

Zero means the content fits and the container must not scroll.

◆ max_scroll_offset_y()

float pulp::view::View::max_scroll_offset_y ( ) const
inherited

◆ meter_frame()

const MeterFrame & pulp::view::View::meter_frame ( ) const
inherited

The latest MeterFrame snapshotted on the clock.

All-zero (channels == 0) until the first frame, and again from the moment the source is changed or unbound. Bound your channel index by min(frame.channels, MeterFrame::kMaxChannels) — publish() stores the frame verbatim and never trusts the count to gate an access.

◆ meter_source_channel()

int pulp::view::View::meter_source_channel ( ) const
inherited

◆ metrics()

const std::shared_ptr< WidgetMetrics > & pulp::view::View::metrics ( ) const
inlineinherited

◆ mix_blend_mode()

canvas::Canvas::BlendMode pulp::view::View::mix_blend_mode ( ) const
inlineinherited

◆ move_child_to_index()

bool pulp::view::View::move_child_to_index ( View * child,
size_t index )
inherited

Moves an existing child to index in this view's child order — the one order both layout and paint walk — and returns false when child is not this view's child.

An index past the last slot moves the child last.

Ordering is the only thing that changes. The child keeps its parent, its propagated hosts, and its focus / drag / popup state, so a reorder never runs the attach and detach lifecycle that remove_child() followed by add_child() would — that pair cancels an in-flight drag, closes an open popup, and blurs a focused editor inside the moved subtree.

◆ needs_layer()

bool pulp::view::View::needs_layer ( ) const
inlineinherited

◆ note_unmarked_paint_mutation()

void pulp::view::View::note_unmarked_paint_mutation ( )
inlinestaticnoexceptinherited

Record a paint change that requested no repaint of its own.

◆ object_fit()

const std::string & pulp::view::View::object_fit ( ) const
inlineinherited

◆ object_position()

const std::string & pulp::view::View::object_position ( ) const
inlineinherited

◆ on_accessibility_adjust()

virtual void pulp::view::View::on_accessibility_adjust ( float delta)
inlinevirtualinherited

Called by platform accessibility when VoiceOver increment/decrement is triggered.

Delta is typically ±0.05 (5% step). Override in widgets to adjust the value.

◆ on_attached()

void pulp::view::LottieView::on_attached ( )
overridevirtual

Reimplemented from pulp::view::View.

◆ on_detached()

void pulp::view::LottieView::on_detached ( )
overridevirtual

Reimplemented from pulp::view::View.

◆ on_focus_changed()

virtual void pulp::view::View::on_focus_changed ( bool gained)
inlinevirtualinherited

Called when this view gains or loses focus.

Default implementation updates has_focus_ state. Subclasses should call base.

Reimplemented in pulp::view::ComboBox, pulp::view::InlineValueEditor, pulp::view::MusicalTypingKeyboard, pulp::view::NumberBox, pulp::view::Stepper, and pulp::view::TextEditor.

◆ on_frame_clock_changed()

void pulp::view::LottieView::on_frame_clock_changed ( )
overridevirtual

The FrameClock reachable from this view (via frame_clock()) may have changed — a clock was installed on an ancestor, or this subtree was re-parented.

A view that self-subscribes to the clock (e.g. a Meter with a live source) overrides this to (re)evaluate its subscription. Default no-op. Fired by set_frame_clock() across the whole subtree.

Reimplemented from pulp::view::View.

◆ on_gesture_event()

virtual void pulp::view::View::on_gesture_event ( const GestureEvent & event)
inlinevirtualinherited

Gesture event (pinch/rotate from multi-touch or trackpad).

Reimplemented in pulp::view::EqCurveView.

◆ on_hover_move()

virtual void pulp::view::View::on_hover_move ( Point local_pos)
inlinevirtualinherited

Pointer moved over this view with no button held, reported in this view's LOCAL coordinates.

Unlike on_mouse_enter/leave (which carry no position), this fires on every hover sample over the hit target so a widget can track WHICH sub-region of itself the pointer is over (e.g. the inspector ToolStrip's per-button tooltip). Dispatched by simulate_hover() — the same path the platform host's mouse-move handler drives. Default no-op so no existing widget changes behavior.

Reimplemented in pulp::view::ComboBox, pulp::view::DesignFrameView, pulp::view::EqCurveView, pulp::view::MusicalTypingKeyboard, pulp::view::NumberBox, and pulp::view::Stepper.

◆ on_key_event()

◆ on_key_press()

virtual void pulp::view::View::on_key_press ( int key_code)
inlinevirtualinherited

◆ on_meter_frame()

virtual void pulp::view::View::on_meter_frame ( const MeterFrame & frame,
float dt )
inlinevirtualinherited

A new MeterFrame was snapshotted this frame, dt seconds after the last.

Default no-op — meter_frame() already exposes it to paint(). A widget that advances per-frame state from the reading (ballistics, smoothing) overrides this. UI thread, on the FrameClock.

◆ on_meter_snapshot_changed()

virtual void pulp::view::View::on_meter_snapshot_changed ( )
inlinevirtualinherited

meter_frame() changed: repaint this view (a live binding alone does not composite).

Meter owns its invalidation in on_meter_frame and overrides it.

◆ on_mouse_cancel()

virtual void pulp::view::View::on_mouse_cancel ( Point pos)
inlinevirtualinherited

Pointer / touch cancellation (iOS touchesCancelled, etc.).

Distinct from on_mouse_up so widgets can roll back in-progress gestures. Default forwards to on_mouse_up for back-compat.

Reimplemented in pulp::timeline_view::ArrangerView, pulp::timeline_view::PianoRollView, and pulp::view::ModulationMatrixWidget.

◆ on_mouse_down()

◆ on_mouse_drag()

◆ on_mouse_enter()

◆ on_mouse_event()

◆ on_mouse_leave()

◆ on_mouse_up()

◆ on_resized()

virtual void pulp::view::View::on_resized ( )
inlinevirtualinherited

◆ on_text_input()

virtual void pulp::view::View::on_text_input ( const TextInputEvent & event)
inlinevirtualinherited

Text input from keyboard/IME (separate from key events).

Reimplemented in pulp::view::ComboBox, pulp::view::InlineValueEditor, pulp::view::NumberBox, pulp::view::Stepper, pulp::view::TextEditor, and pulp::view::VirtualList.

◆ on_wheel()

virtual void pulp::view::View::on_wheel ( float delta_y)
inlinevirtualinherited

Adjust the widget's value by a scroll-wheel delta (delta_y positive = scrolled down).

Only called when wants_wheel_value() is true.

Reimplemented in pulp::view::ChannelStrip, pulp::view::Fader, pulp::view::Knob, pulp::view::NumberBox, pulp::view::PanControl, pulp::view::RangeSlider, and pulp::view::Stepper.

◆ opacity()

float pulp::view::View::opacity ( ) const
inlineinherited

◆ outline_color()

Color pulp::view::View::outline_color ( ) const
inlineinherited

◆ outline_offset()

float pulp::view::View::outline_offset ( ) const
inlineinherited

◆ outline_style()

BorderStyle pulp::view::View::outline_style ( ) const
inlineinherited

◆ outline_width()

float pulp::view::View::outline_width ( ) const
inlineinherited

◆ overflow()

Overflow pulp::view::View::overflow ( ) const
inlineinherited

◆ overlay_anchor_id()

std::uint64_t pulp::view::View::overlay_anchor_id ( ) const
inlineinherited

Instance id of the anchor (never a recyclable address), or 0 for none.

◆ overlay_anchored_at()

bool pulp::view::View::overlay_anchored_at ( const View * candidate) const
inherited

◆ overlay_consumes_outside_click()

bool pulp::view::View::overlay_consumes_outside_click ( ) const
inlineinherited

◆ overlay_contains()

bool pulp::view::View::overlay_contains ( Point window_pt) const
inherited

Bounds-test in window (root) coordinates.

Walks the parent chain to compute absolute origin and adds local_bounds(). Mirrors the arithmetic the mac mouseDown path uses for the ComboBox dropdown.

◆ overlay_depth()

std::size_t pulp::view::View::overlay_depth ( ) const
inherited

Number of overlays currently open under this view's root.

Never allocates interaction state, so it is safe to ask on any tree.

◆ overlay_nests_on()

bool pulp::view::View::overlay_nests_on ( const View * below) const
inlineinherited

True if this overlay was claimed nested on below; see claim_overlay.

◆ overlay_queue()

std::vector< OverlayRequest > & pulp::view::View::overlay_queue ( )
staticinherited

◆ overlay_trigger()

bool pulp::view::View::overlay_trigger ( ) const
inlineinherited

◆ overscroll_behavior()

const std::string & pulp::view::View::overscroll_behavior ( ) const
inlineinherited

◆ owns_child_layout()

virtual bool pulp::view::View::owns_child_layout ( ) const
inlinevirtualinherited

◆ paint()

void pulp::view::LottieView::paint ( canvas::Canvas & canvas)
overridevirtual

Reimplemented from pulp::view::View.

◆ paint_all()

virtual void pulp::view::View::paint_all ( canvas::Canvas & canvas)
virtualinherited

◆ paint_overlays()

void pulp::view::View::paint_overlays ( canvas::Canvas & canvas,
View * painting_root = nullptr )
staticinherited

Paint queued overlays + the inspector paint hook.

painting_root is the root View whose tree was just painted into canvas — it is forwarded to the inspector paint hook so the hook can gate. When a host paints multiple roots into separate surfaces (e.g. the floating InspectorWindow's own root vs. the main canvas root), the inspector overlay's selection box / handles / drop indicators must paint ONLY on the inspected root, never leak into the inspector window at the overlay's root coordinates (the "stray box" bug). nullptr means "root unknown" and the hook paints unconditionally (legacy callers).

◆ painter()

const std::shared_ptr< WidgetPainter > & pulp::view::View::painter ( ) const
inlineinherited

◆ parent()

View * pulp::view::View::parent ( ) const
inlineinherited

◆ playing()

bool pulp::view::LottieView::playing ( ) const
inline

◆ plugin_view_host()

PluginViewHost * pulp::view::View::plugin_view_host ( ) const
inlineinherited

◆ pointer_events()

PointerEvents pulp::view::View::pointer_events ( ) const
inlineinherited

◆ position()

Position pulp::view::View::position ( ) const
inlineinherited

◆ prepare_for_reuse()

virtual void pulp::view::View::prepare_for_reuse ( )
virtualinherited

◆ release_input_focus()

void pulp::view::View::release_input_focus ( )
inherited

Guarded release — clears the root slot AND the shim mirror only when this currently holds them.

A non-holder is a no-op, so one widget's teardown cannot blur an unrelated focused widget.

◆ release_overlay()

void pulp::view::View::release_overlay ( )
inherited

Clear the overlay if (and only if) this currently holds it.

Idempotent — safe to call on unmount even if claim never happened. Does NOT fire on_overlay_dismissed — used by JSX unmount and the View destructor where React already knows the popover is closing.

◆ release_pointer_capture()

void pulp::view::View::release_pointer_capture ( int pointer_id)
inherited

◆ remove_child()

std::unique_ptr< View > pulp::view::View::remove_child ( View * child)
inherited

Detaches child and returns its ownership, or nullptr when child is no longer this parent's child under the same instance id.

A null result always means "not ours anymore" — never "moved for you".

◆ request_frame()

void pulp::view::View::request_frame ( )
inherited

Ask the host for a frame without marking any damage: the frame's own work (a queued requestAnimationFrame callback, a canvas redraw) marks what it changes.

Use only when nothing has changed yet.

◆ request_repaint() [1/2]

void pulp::view::View::request_repaint ( )
inherited

Request that this view's host invalidate and schedule a repaint.

Calls repaint() on the attached WindowHost or PluginViewHost. Hosts are propagated to children on add_child, so any attached descendant sees its own host pointer; if the view tree has not been attached to a host yet, this is a no-op.

This is the idiomatic wiring point for sub-bridges (e.g. a View that owns its own WidgetBridge for an @pulp/react editor) — the bridge's repaint callback is auto-wired to call this so JS-driven requestAnimationFrame callbacks reach the host's invalidator. See WidgetBridge::set_repaint_callback for the override path.

◆ request_repaint() [2/2]

void pulp::view::View::request_repaint ( const Rect & local_dirty)
inherited

Bounded repaint: invalidate only local_dirty (this view's local coordinates), mapped to root space, so a live sub-view (meter, grid, overlay) does not force the whole surface to re-composite.

Escalates to a full request_repaint() when the mapping cannot be trusted (render transform, pixel-spreading filter, a scrolled ScrollView ancestor, or no window host) — see the implementation for the exact conditions. Safe by construction: it only ever repaints the same or a larger region than the change touched, never smaller. Caller contract: local_dirty must cover out-of-bounds decorations (shadow, glow, focus ring) — pass the padded rect, not local_bounds(), or the overspill is left stale.

◆ request_repaint_self()

void pulp::view::View::request_repaint_self ( float halo = 4.0f)
inherited

Invalidate only THIS view's own rect, overscanned by halo so a glow, focus ring or modulation arc painting outside local_bounds() is covered.

Use on hot value paths; the rect-less form dirties the whole surface and is for structural changes. See view.cpp for the correctness rationale.

◆ requires_gpu_host()

bool pulp::view::View::requires_gpu_host ( ) const
inlineinherited

GPU-host capability signal.

A view that is rendered through the Skia/Dawn/Yoga scripted-UI path — or any custom Processor::create_view() that paints via GPU-backed widgets (e.g. WebGPU/Three.js canvases, the scripted React UI) — sets this true so plugin format adapters auto-select the GPU PluginViewHost instead of the CoreGraphics CPU fallback. Default false: a plain widget tree renders fine on CPU and a Processor that returns nullptr from create_view() intentionally selects AutoUi.

This lives on the View (not the Processor) because create_view() can return a different view per editor instance and the flag must not touch the node ABI. Adapters read it via ViewBridge::view() after ViewBridge::open().

◆ resize()

const std::string & pulp::view::View::resize ( ) const
inlineinherited

◆ resolve_color()

Color pulp::view::View::resolve_color ( const std::string & name,
Color fallback = {} ) const
inherited

◆ resolve_dimension()

float pulp::view::View::resolve_dimension ( const std::string & name,
float fallback ) const
inherited

Resolve a dimension token: check own theme, walk up to parent.

◆ resolve_radial()

ResolvedRadial pulp::view::View::resolve_radial ( const BackgroundGradient & g,
float w,
float h )
staticinherited

Resolve a radial layer's CSS sizing against a box of w x h.

Free of any View state so the painter, the parser and tests all get the same answer from the same code.

◆ resolved_direction()

WritingDirection pulp::view::View::resolved_direction ( ) const
inlineinherited

Resolve auto_ → ltr (LTR fallback, until first-strong-character detection is wired).

Use this at paint time when you need a concrete direction.

◆ restore_implicit_access_role()

void pulp::view::View::restore_implicit_access_role ( )
inlineinherited

◆ restore_reload_state()

virtual bool pulp::view::View::restore_reload_state ( std::string_view )
inlinevirtualinherited

◆ retire()

void pulp::view::View::retire ( std::unique_ptr< View > owned)
noexceptinherited

Destroys owned at the first moment it is safe to do so.

A hook may remove the very View whose callback is executing. Dropping that ownership on the spot would free the frame still running above, so hand it here instead: while any DispatchLease is open on this tree the view is parked on the root's intrusive retirement chain and freed when the outermost lease exits; outside a lease it is destroyed immediately. Callers may therefore call this unconditionally. Retiring costs no allocation, so a noexcept path can use it. See view_lifecycle.hpp.

◆ right()

float pulp::view::View::right ( ) const
inlineinherited

◆ right_unit()

DimensionUnit pulp::view::View::right_unit ( ) const
inlineinherited

◆ root_structure_generation()

std::uint64_t pulp::view::View::root_structure_generation ( ) const
noexceptinherited

Generation of the top-level tree containing this view.

Safe to call on a nested subtree root; mutations anywhere under the same top-level root invalidate identity/liveness caches that use it.

◆ rotation()

float pulp::view::View::rotation ( ) const
inlineinherited

◆ runtime_view_kind()

RuntimeViewKind pulp::view::View::runtime_view_kind ( ) const
inlinenoexceptinherited

◆ save_reload_state()

virtual bool pulp::view::View::save_reload_state ( std::string & ) const
inlinevirtualinherited

◆ scalar_value()

float pulp::view::View::scalar_value ( ) const
inherited

The latest scalar snapshotted on the clock.

0 until the first frame, and again from the moment the source is changed or unbound.

◆ scale()

float pulp::view::View::scale ( ) const
inlineinherited

◆ scroll_behavior()

const std::string & pulp::view::View::scroll_behavior ( ) const
inlineinherited

◆ scroll_content_size()

Size pulp::view::View::scroll_content_size ( ) const
inherited

Union of the laid-out descendant boxes, never smaller than the viewport.

Recomputed on demand rather than cached — it is read only from input-time paths, and a cache would go stale on a layout change and silently clamp to the wrong range. Non-scroll views never walk.

◆ scroll_offset_by()

bool pulp::view::View::scroll_offset_by ( float dx,
float dy )
inlineinherited

◆ scroll_offset_x()

virtual float pulp::view::View::scroll_offset_x ( ) const
inlinevirtualinherited

Scroll offset in px, always within [0, max_scroll_offset_*].

Positive scrolls content UP/LEFT (CSS scrollTop/scrollLeft). Virtual so ScrollView reports its ANIMATED offset through the same accessor.

Reimplemented in pulp::view::ScrollView.

◆ scroll_offset_y()

virtual float pulp::view::View::scroll_offset_y ( ) const
inlinevirtualinherited

Reimplemented in pulp::view::ScrollView.

◆ seek()

void pulp::view::LottieView::seek ( double seconds)

◆ self_paint_bounds()

Rect pulp::view::View::self_paint_bounds ( ) const
inherited

The rect, in local coordinates, this box's own paint covers: the snapped captured rect when it is recorded and plausible, else local_bounds().

◆ set_access_checked()

void pulp::view::View::set_access_checked ( std::string s)
inlineinherited

◆ set_access_disabled()

void pulp::view::View::set_access_disabled ( std::string s)
inlineinherited

◆ set_access_hidden()

void pulp::view::View::set_access_hidden ( std::string s)
inlineinherited

◆ set_access_label()

void pulp::view::View::set_access_label ( std::string label)
inlineinherited

The AUTHOR-SET accessible name (what aria-label maps to).

An explicit name WINS over the view's content — ARIA 1.2 §5.2.7 (accname step 2B: aria-label is consulted before the element's contents). Setting the empty string clears it and hands the name back to the content, which is what removing the attribute means.

◆ set_access_pressed()

void pulp::view::View::set_access_pressed ( std::string s)
inlineinherited

◆ set_access_role()

void pulp::view::View::set_access_role ( AccessRole role)
inlineinherited

◆ set_access_value()

void pulp::view::View::set_access_value ( std::string value)
inlineinherited

◆ set_ancestor_clip_radii()

void pulp::view::View::set_ancestor_clip_radii ( float tl,
float tr,
float br,
float bl )
inlineinherited

Corner radii for the ancestor clip, clockwise from top-left.

CSS clips overflow to the clipper's ROUNDED padding box, so a child with square corners inside a rounded card is cut to the card's curve. Clipping to the bare rectangle instead paints that child square into the corner and the card reads as unrounded even though its own border curves. Zero on every corner is the common case and clips to the plain rectangle.

◆ set_ancestor_clip_rect()

void pulp::view::View::set_ancestor_clip_rect ( Rect r)
inlineinherited

CSS clip-path: path("...").

Stores an SVG-path-d string; paint_all() installs it as a canvas clip via Canvas::clip_path_svg before painting children. Empty string clears the slot. URL refs (url(#id)) and named shape forms (circle(), inset(), polygon()) are deferred — only the path("...") form is honored today. The clip an IMPORTER resolved for this view, in the view's own coordinate space — the rectangle CSS's clip chain leaves of it.

Unlike overflow, this clips ONLY this view's own painting, never its children: each child carries the rectangle its own chain resolves to. That is deliberate and is the whole reason the slot exists. CSS clips along the containing-block chain while a view tree clips by parentage, so a child can legitimately need a WIDER clip than its parent — an absolutely positioned node whose containing block sits above the overflow: hidden box it is nested in escapes that clip in a browser. An inherited clip is an intersection and cannot widen, so no assignment of inherited rectangles can express that; a per-view rectangle can.

Native and authored trees never set it and pay nothing.

◆ set_anchor_id()

void pulp::view::View::set_anchor_id ( std::string anchor)
inlineinherited

Stable anchor identity from the design-import IR.

The inspector uses this to key tweaks against the originating source element so they survive re-import.

Empty by default. Populated by the JS bridge's setAnchor() call for views constructed from imported designs; user-authored views that aren't part of an imported tree leave it empty.

◆ set_animation_play_state()

void pulp::view::View::set_animation_play_state ( std::string kw)
inlineinherited

Animation play-state.

Stored separately from staged animation tokens and consumed by tick_animations(); paused freezes active animation timelines while other values advance normally.

◆ set_appearance()

void pulp::view::View::set_appearance ( const std::string & value)
inlineinherited

CSS appearance — controls native form-widget rendering.

Pulp paints all widgets custom (no native form widgets), so this property is observably storage-only — none is the effective default for every Pulp View regardless of slot value. The slot exists so authors who set appearance: none for reset-style consistency see a no-op (not an unsupported drop) and the value round-trips through CSSStyleDeclaration.

◆ set_backdrop_blur()

void pulp::view::View::set_backdrop_blur ( float radius)
inlineinherited

CSS backdrop-filter: blur(px) — frosted-glass blur applied to whatever is behind this View when it paints.

Zero == no backdrop filter. Skia maps to saveLayer(SaveLayerRec{ .fBackdrop = Blur }).

◆ set_backdrop_filter_chain()

void pulp::view::View::set_backdrop_filter_chain ( std::vector< FilterOp > chain)
inlineinherited

CSS backdrop-filter with its full function list — saturate(), brightness(), invert(), and compositions of them.

Takes precedence over set_backdrop_blur when non-empty; a blur-only value can be expressed either way and means the same thing.

Callers that pass a list containing a blur SHOULD also call set_backdrop_blur with that radius: the repaint-damage pass reads the scalar to decide how far beyond the view's bounds a change reaches.

◆ set_backface_visible()

void pulp::view::View::set_backface_visible ( bool v)
inlineinherited

◆ set_background_attachment()

void pulp::view::View::set_background_attachment ( std::string kw)
inlineinherited

CSS background sub-properties.

These slots store the keyword for round-tripping; paint impact is partial — see notes: • background-attachment: only scroll is conformant in pulp's non-scrolling layout model. fixed / local need a scroll- context coupling we don't have. Catalog: noop. • background-clip: text would clip the bg paint to text glyphs via SkBlendMode::kSrcIn. Other values are no-ops on solid bg. Catalog: partial. • background-origin: the box a background gradient tile is sized and positioned in (content-box uses the padding box). Partial.

◆ set_background_clip()

void pulp::view::View::set_background_clip ( std::string kw)
inlineinherited

◆ set_background_color()

void pulp::view::View::set_background_color ( Color c)
inlineinherited

Background color (optional — if set, painted before children).

◆ set_background_gradient_conic()

void pulp::view::View::set_background_gradient_conic ( float cx,
float cy,
float start_angle,
const std::vector< Color > & colors,
const std::vector< float > & positions,
float sweep_turns = 1.0f )
inlineinherited

Conic (CSS conic-gradient / Figma angular).

cx/cy are fractions of the box; start_angle is in radians (0 = +x axis, matching the canvas API). sweep_turns is how much of a full turn the stop list spans, with the positions normalized to 0..1 across it. 1.0 is a plain conic-gradient; anything smaller is a repeating-conic-gradient and tiles its band around the circle.

◆ set_background_gradient_layers()

void pulp::view::View::set_background_gradient_layers ( std::vector< BackgroundGradient > layers)
inlineinherited

Replace the background-image stack, first layer on top.

◆ set_background_gradient_linear()

void pulp::view::View::set_background_gradient_linear ( float x0,
float y0,
float x1,
float y1,
const std::vector< Color > & colors,
const std::vector< float > & positions )
inlineinherited

Background gradient (CSS background: linear-gradient / radial-gradient).

◆ set_background_gradient_radial()

void pulp::view::View::set_background_gradient_radial ( float cx,
float cy,
float radius_frac,
const std::vector< Color > & colors,
const std::vector< float > & positions )
inlineinherited

Radial gradient.

cx/cy are fractions of the box; radius_frac is a fraction of the larger box dimension (resolved at paint).

◆ set_background_origin()

void pulp::view::View::set_background_origin ( std::string kw)
inlineinherited

◆ set_background_position()

void pulp::view::View::set_background_position ( std::string kw)
inlineinherited

CSS background-position / background-size.

background-size and background-position are read at paint for repeating gradient layers. Raster backgrounds and a sized non-repeating image remain storage-only until their own image paint pass exists.

Storing a keyword nothing reads is a deliberate strategy here, but it carries a cost worth naming: the compat entry for background-origin justified a supported claim on "pulp doesn't paint repeating gradient tiles", and when tile paint arrived that claim went false with no edit to the entry. If you make one of these slots load-bearing, re-read what the matrix says about its neighbours.

◆ set_background_repeat()

void pulp::view::View::set_background_repeat ( std::string kw)
inlineinherited

CSS background-repeat keyword.

Storage-only at the View level: paint() of solid-color backgrounds is a no-op for repeat semantics, but the value is preserved so image/gradient background paint can honor it without an API break. Accepted CSS keywords: repeat, repeat-x, repeat-y, no-repeat, space, round. Unknown / empty = repeat (CSS initial value).

◆ set_background_size()

void pulp::view::View::set_background_size ( std::string kw)
inlineinherited

◆ set_border()

void pulp::view::View::set_border ( Color c,
float width,
float radius = 0 )
inlineinherited

Border (optional — painted on top of background).

◆ set_border_bottom()

void pulp::view::View::set_border_bottom ( Color c,
float w )
inlineinherited

◆ set_border_bottom_color()

void pulp::view::View::set_border_bottom_color ( Color c)
inlineinherited

◆ set_border_bottom_width()

void pulp::view::View::set_border_bottom_width ( float w)
inlineinherited

◆ set_border_color()

void pulp::view::View::set_border_color ( Color c)
inlineinherited

Standalone border setters for RN parity.

Each setter flips the has_border_ flag on so paint_all() actually emits the stroke even when set_border() was never called.

◆ set_border_curve()

void pulp::view::View::set_border_curve ( BorderCurve c)
inlineinherited

◆ set_border_left()

void pulp::view::View::set_border_left ( Color c,
float w )
inlineinherited

◆ set_border_left_color()

void pulp::view::View::set_border_left_color ( Color c)
inlineinherited

◆ set_border_left_width()

void pulp::view::View::set_border_left_width ( float w)
inlineinherited

◆ set_border_radius()

void pulp::view::View::set_border_radius ( float r)
inlineinherited

◆ set_border_radius_pct()

void pulp::view::View::set_border_radius_pct ( float pct)
inlineinherited

Set corner radius as percent of min(width,height).

Resolved at paint time. Pass 0 to clear the percent and revert to the plain px slot.

◆ set_border_right()

void pulp::view::View::set_border_right ( Color c,
float w )
inlineinherited

◆ set_border_right_color()

void pulp::view::View::set_border_right_color ( Color c)
inlineinherited

◆ set_border_right_width()

void pulp::view::View::set_border_right_width ( float w)
inlineinherited

◆ set_border_style()

void pulp::view::View::set_border_style ( BorderStyle s)
inlineinherited

◆ set_border_top()

void pulp::view::View::set_border_top ( Color c,
float w )
inlineinherited

Per-side borders (CSS border-top, border-right, etc.).

Track an explicit per-edge "set" flag so a width of 0 on one edge can override the uniform shorthand. CSS / RN semantics: borderWidth: 10 followed by borderTopWidth: 0 must yield a 0-px top border, not the 10-px shorthand. Without a per-edge set bit, the stored 0 is indistinguishable from "unset" in apply_border_widths.

◆ set_border_top_color()

void pulp::view::View::set_border_top_color ( Color c)
inlineinherited

Color-only setters.

Setting borderTopColor alone must not mark the top edge's width as explicitly set; that would let a stale 0 override the uniform borderWidth shorthand. Mirrors CSS, where border-top-color and border-top-width are independent longhands.

◆ set_border_top_width()

void pulp::view::View::set_border_top_width ( float w)
inlineinherited

Width-only setters.

Setting borderTopWidth alone preserves the existing per-edge color and explicitly marks the width as set, including a width of 0, which then overrides any uniform shorthand on that edge.

◆ set_border_width()

void pulp::view::View::set_border_width ( float w)
inlineinherited

◆ set_bottom() [1/2]

void pulp::view::View::set_bottom ( float v)
inlineinherited

◆ set_bottom() [2/2]

void pulp::view::View::set_bottom ( float v,
DimensionUnit unit )
inlineinherited

◆ set_bounds()

void pulp::view::View::set_bounds ( Rect r)
inherited

◆ set_box_shadow()

void pulp::view::View::set_box_shadow ( float ox,
float oy,
float blur,
float spread,
Color c,
bool inset = false )
inlineinherited

Replaces the whole stack with one layer.

CSS box-shadow: A semantics — a declaration always supersedes the previous one rather than adding to it, so every existing single-shadow caller keeps its exact behavior.

◆ set_box_shadow_color()

void pulp::view::View::set_box_shadow_color ( Color c)
inlineinherited

RN iOS-legacy shadow* longhand setters.

RN 0.71+ added boxShadow as the cross-platform path, but the four per-attribute setters still appear in legacy code and the React Native API surface. Pulp mirrors the per-attribute pattern the text-shadow longhand uses: each setter mutates one field of the shared BoxShadow struct so a JSX prop diff that touches one prop doesn't clobber the others.

Any of these activates the shadow paint (matches React Native's behavior — setting any shadow prop activates it), creating a default-valued first layer if the stack is empty. RN has no multi-shadow longhand, so these address the first layer only.

◆ set_box_shadow_offset()

void pulp::view::View::set_box_shadow_offset ( float ox,
float oy )
inlineinherited

◆ set_box_shadow_opacity()

void pulp::view::View::set_box_shadow_opacity ( float a)
inlineinherited

◆ set_box_shadow_radius()

void pulp::view::View::set_box_shadow_radius ( float r)
inlineinherited

◆ set_captured_box_paint_rect()

void pulp::view::View::set_captured_box_paint_rect ( float left,
float top,
float right,
float bottom,
float device_scale )
inlineinherited

Browser-compatible device-space paint rectangle for this box's own paint (Chromium's CSS-edge snap, recorded by the importer).

Layout, hit testing and children keep the fractional box; both edges are kept because an integer origin can still have a fractional far edge.

◆ set_captured_frame_root()

void pulp::view::View::set_captured_frame_root ( bool v)
inlineinherited

Root of an imported frame: captured text snaps baselines to its grid.

◆ set_clip_marker_tolerance()

void pulp::view::View::set_clip_marker_tolerance ( bool on)
inlineinherited

Import-only accommodation.

A common imported-design pattern puts a circular value-marker (an XY-pad-style dot) as a position:absolute child of an overflow:hidden container, anchored at left:cx-r / top:cy-r. At edge values half the dot sits outside the content box and the strict CSS clip chops it. Opting in lets paint_all detect such circle-markers and expand the clip rect just enough to admit them. OFF by default so native (non-imported) trees pay neither the semantic deviation from CSS overflow:hidden nor the per-frame O(children) marker scan — the design importer turns it on for the containers it materializes.

◆ set_clip_path()

void pulp::view::View::set_clip_path ( const std::string & svg_path_d)
inlineinherited

◆ set_color()

void pulp::view::View::set_color ( std::string name,
Color c )
inlineinherited

Override ONE named color token on this view without replacing the rest of its theme.

Tokens this view does not carry keep resolving up the parent chain, so a per-view override is genuinely partial. This is the write side of resolve_color.

◆ set_contains_native_overlay()

void pulp::view::View::set_contains_native_overlay ( bool v)
inlineinherited

◆ set_continuous_repaint()

void pulp::view::View::set_continuous_repaint ( bool on)
inlineinherited

Opt a custom view into per-vsync repaints — required for live content (meters/spectrum, automation-tracking values) or it looks frozen.

◆ set_corner_radius_bl()

void pulp::view::View::set_corner_radius_bl ( float r)
inlineinherited

◆ set_corner_radius_bl_pct()

void pulp::view::View::set_corner_radius_bl_pct ( float pct)
inlineinherited

◆ set_corner_radius_br()

void pulp::view::View::set_corner_radius_br ( float r)
inlineinherited

◆ set_corner_radius_br_pct()

void pulp::view::View::set_corner_radius_br_pct ( float pct)
inlineinherited

◆ set_corner_radius_tl()

void pulp::view::View::set_corner_radius_tl ( float r)
inlineinherited

Per-corner border-radius (CSS border-top-left-radius, etc.).

When transitioning from uniform corner_radius_ to per-corner mode, seed the un-overridden corners from the uniform value so a sequence like set_border_radius(10); set_corner_radius_tl(2); renders as {2, 10, 10, 10} instead of {2, 0, 0, 0}.

◆ set_corner_radius_tl_pct()

void pulp::view::View::set_corner_radius_tl_pct ( float pct)
inlineinherited

Per-corner percent setters.

Same semantics as set_border_radius_pct: paint time resolves to pct * 0.01 * min(width, height).

◆ set_corner_radius_tr()

void pulp::view::View::set_corner_radius_tr ( float r)
inlineinherited

◆ set_corner_radius_tr_pct()

void pulp::view::View::set_corner_radius_tr_pct ( float pct)
inlineinherited

◆ set_cursor()

void pulp::view::View::set_cursor ( CursorStyle c)
inlineinherited

◆ set_default_hover_feedback()

void pulp::view::View::set_default_hover_feedback ( bool enabled)
inlineinherited

Baseline pointer feedback for semantic controls that keep an authored painter (for example imported lowercase HTML buttons).

Widget subclasses with their own hover paint leave this disabled. Importers may disable it when the authored design supplies a complete hover treatment.

◆ set_derived_access_label()

void pulp::view::View::set_derived_access_label ( std::string label)
inlineinherited

The CONTENT-DERIVED accessible name: a widget's visible text (Label::set_text, Knob/Fader/Toggle::set_label, TextButton::set_label).

It NEVER overwrites an author-set name — otherwise el.setAttribute('aria-label', 'Gain in decibels'); el.textContent = 'dB'; would leave the screen reader announcing "dB", and react-reconciler's commitTextUpdate re-writes textContent on every re-render, so even a safe initial order would be clobbered on the next render.

◆ set_direction()

void pulp::view::View::set_direction ( WritingDirection d)
inlineinherited

◆ set_effect()

void pulp::view::View::set_effect ( std::shared_ptr< canvas::ViewEffect > effect)
inlineinherited

Attach a GPU post-processing effect to this View's compositing layer.

◆ set_enabled()

void pulp::view::View::set_enabled ( bool e)
inlineinherited

◆ set_filter_blur()

void pulp::view::View::set_filter_blur ( float radius)
inlineinherited

CSS filter: blur(px) — per-element blur.

Legacy single-blur slot kept for API compatibility; the richer filter chain lives in filter_chain_ below and supersedes this when non-empty.

◆ set_filter_chain()

void pulp::view::View::set_filter_chain ( std::vector< FilterOp > chain)
inlineinherited

◆ set_focus()

void pulp::view::View::set_focus ( bool f)
inlineinherited

◆ set_focusable()

void pulp::view::View::set_focusable ( bool f)
inlineinherited

◆ set_font_variant()

void pulp::view::View::set_font_variant ( std::string kw)
inlineinherited

◆ set_frame_clock()

void pulp::view::View::set_frame_clock ( FrameClock * clock)
inherited

Set the frame clock on the root view.

Children access via frame_clock(). Hosts typically build the view tree before installing the clock, so this propagates an on_frame_clock_changed() notification down the whole subtree — a descendant that self-subscribes on a reachable clock (a live Meter, say) gets a chance to (re)subscribe now rather than silently missing the clock it was built before.

◆ set_hit_slop() [1/3]

void pulp::view::View::set_hit_slop ( float top,
float right,
float bottom,
float left )
inlineinherited

◆ set_hit_slop() [2/3]

void pulp::view::View::set_hit_slop ( float uniform)
inlineinherited

◆ set_hit_slop() [3/3]

void pulp::view::View::set_hit_slop ( HitSlop s)
inlineinherited

◆ set_hit_testable()

void pulp::view::View::set_hit_testable ( bool h)
inlineinherited

◆ set_host_actions()

void pulp::view::View::set_host_actions ( HostActionSurface * surface)
inherited

The runtime host command channel for this view tree, or nullptr.

Same ownership/propagation/null-degradation semantics as host_params().

◆ set_host_params()

void pulp::view::View::set_host_params ( HostParamSurface * surface)
inherited

The runtime host-parameter accessor for this view tree, or nullptr in previews/screenshots (a view degrades to local state when null, exactly like a sandboxed native view).

Set by the host that owns the tree — StateStore-backed natively, or ABI-backed under a foreign-host embed — and propagated to children like window_host()/plugin_view_host(). See pulp/view/host_surfaces.hpp for the tick-only call contract.

◆ set_hovered()

void pulp::view::View::set_hovered ( bool h)
inherited

◆ set_id()

void pulp::view::View::set_id ( std::string id)
inlineinherited

◆ set_implicit_access_role()

void pulp::view::View::set_implicit_access_role ( AccessRole role)
inlineinherited

◆ set_include_font_padding()

void pulp::view::View::set_include_font_padding ( bool v)
inlineinherited

RN's Android-only includeFontPadding.

Pure round-trip storage: Pulp's text-shaping pipeline doesn't add Android's vestigial vertical padding regardless of this value, so the bridge accepts the keyword + stores it (el.style.includeFontPadding === false reads back) and the paint pipeline ignores it. See compat.json rn/includeFontPadding notes for the honest CSS-subset rationale.

◆ set_inheritable_font_family()

void pulp::view::View::set_inheritable_font_family ( std::string f)
inlineinherited

Inheritable font-family cascade.

Mirrors the font-weight pattern; Labels read this when set_font_family hasn't been called directly. Font-manager resolution is independent from the cascade plumbing.

◆ set_inheritable_font_size()

void pulp::view::View::set_inheritable_font_size ( float size)
inlineinherited

◆ set_inheritable_font_weight()

void pulp::view::View::set_inheritable_font_weight ( int w)
inlineinherited

◆ set_inheritable_letter_spacing()

void pulp::view::View::set_inheritable_letter_spacing ( float sp)
inlineinherited

◆ set_inheritable_text_align()

void pulp::view::View::set_inheritable_text_align ( int a)
inlineinherited

0 = left, 1 = center, 2 = right (matches LabelAlign).

◆ set_inheritable_text_color()

void pulp::view::View::set_inheritable_text_color ( Color c)
inlineinherited

◆ set_inspector_cursor_hook()

void pulp::view::View::set_inspector_cursor_hook ( std::function< int(const MouseEvent &, View *event_root)> hook)
staticinherited

Inspector cursor-affordance hook.

The inspector overlay intercepts mouse-move before normal hit-testing, so the platform host cannot rely on the hit view's own cursor() to show move/resize affordances over a selected element. This hook lets the overlay override the cursor for the current pointer position: it returns the chosen CursorStyle cast to int when the overlay wants to drive the cursor (e.g. resize over a handle, move over the body), or -1 to defer to the normal hit-view cursor() path. The platform window host calls call_inspector_cursor_hook in its mouse-move handler and applies the returned style when it is >= 0. No-op (returns -1) when no hook is set.

Carries the event's root View so the installed hook gates to the inspected canvas root, matching the mouse + paint hooks. Without the gate a mouse-move inside the floating InspectorWindow would drive the canvas overlay's cursor affordance.

◆ set_inspector_key_hook()

void pulp::view::View::set_inspector_key_hook ( std::function< bool(const KeyEvent &)> hook)
staticinherited

◆ set_inspector_mouse_hook()

void pulp::view::View::set_inspector_mouse_hook ( std::function< bool(const MouseEvent &, View *event_root)> hook)
staticinherited

Inspector mouse hook.

Like the paint hook, the call carries the event's root View (event_root) so the installed hook can gate to the inspected canvas root. Without the gate, a secondary window's events (the floating InspectorWindow) leak into the canvas overlay: hovering/clicking/scrolling inside the inspector window would highlight/affect the canvas. The platform host passes the window's own root (the same source the paint hook uses for that host); the installed hook does if (event_root && event_root != &inspector.inspected_root()) return false;. nullptr means "root unknown" (legacy/headless callers) and the hook runs unconditionally.

◆ set_inspector_paint_hook()

void pulp::view::View::set_inspector_paint_hook ( std::function< void(canvas::Canvas &, View *painting_root)> hook)
staticinherited

Inspector hooks — set by the inspector module to intercept input and paint without a circular dependency (view doesn't link inspect).

The paint hook receives the painting root (see paint_overlays) so it can gate: the in-canvas overlay must paint only when the root being painted is the inspected root, not the floating inspector window's own root.

◆ set_inspector_text_hook()

void pulp::view::View::set_inspector_text_hook ( std::function< bool(const TextInputEvent &, View *event_root)> hook)
staticinherited

Inspector text-input hook for inline Text-tool editing.

The platform host routes UTF-8 character input here BEFORE the focused view so the inspector's inline text edit can consume it while the Text tool is active. Returns true when the inspector consumed the text (an inline edit is in progress); false otherwise, so normal text-input delivery to the focused widget proceeds.

Carries the event's root View so the installed hook gates to the inspected canvas root, matching the mouse + paint hooks.

◆ set_isolation()

void pulp::view::View::set_isolation ( std::string kw)
inlineinherited

◆ set_layout_mode()

void pulp::view::View::set_layout_mode ( LayoutMode m)
inlineinherited

◆ set_left() [1/2]

void pulp::view::View::set_left ( float v)
inlineinherited

◆ set_left() [2/2]

void pulp::view::View::set_left ( float v,
DimensionUnit unit )
inlineinherited

◆ set_list_style_image()

void pulp::view::View::set_list_style_image ( std::string url)
inlineinherited

◆ set_list_style_position()

void pulp::view::View::set_list_style_position ( ListStylePosition p)
inlineinherited

◆ set_list_style_type()

void pulp::view::View::set_list_style_type ( ListStyleType t)
inlineinherited

◆ set_looping()

void pulp::view::LottieView::set_looping ( bool looping)
inline

◆ set_mask()

void pulp::view::View::set_mask ( const std::string & value)
inlineinherited

CSS mask shorthand.

Stored verbatim alongside mask_image_; the longhand fan-out in the JS shim populates the image slot from this string.

◆ set_mask_image()

void pulp::view::View::set_mask_image ( const std::string & value)
inlineinherited

CSS mask-image: ....

View opens a masked compositing layer when this slot is set to a non-none value. Backends without mask support route through the default save_layer path and preserve the value for bridge round-tripping.

◆ set_mask_size()

void pulp::view::View::set_mask_size ( const std::string & value)
inlineinherited

CSS mask-size (pairs with mask-image).

Stored alongside mask_image_ and passed to the canvas mask layer. Honored values: auto (default), cover, contain, <length>, <length> <length>.

◆ set_meter_source()

void pulp::view::View::set_meter_source ( std::shared_ptr< MeterSource > source,
int channel = 0 )
inherited

Bind a MeterSource.

channel is the primary channel — the one on_meter_frame drives a single-value widget from. A view painting several meters reads the whole snapshot via meter_frame() instead.

◆ set_metrics()

void pulp::view::View::set_metrics ( std::shared_ptr< WidgetMetrics > m)
inherited

◆ set_mix_blend_mode()

void pulp::view::View::set_mix_blend_mode ( canvas::Canvas::BlendMode m)
inlineinherited

CSS / RN mix-blend-mode.

The blend mode applied when this View's compositing layer composites back onto its parent. Stored as the canvas BlendMode enum so the paint path can pass it straight through to the layer-paint without a string lookup. Default BlendMode::normal is a paint-time no-op (kSrcOver). Setting any non-default mode forces a saveLayer() at paint time so the subtree renders into an offscreen buffer that gets composited with the requested blend mode — same shape as opacity / filter:blur.

◆ set_needs_layer()

void pulp::view::View::set_needs_layer ( bool v)
inlineinherited

Force this View's subtree to render into a compositing layer.

Useful for caching, post-effects, or explicit layer isolation.

◆ set_object_fit()

void pulp::view::View::set_object_fit ( const std::string & value)
inlineinherited

CSS object-fit — controls how an <img> content's intrinsic size is fitted into its layout box.

ImageView consumes this slot at paint time when the backend can measure the decoded image's natural size; otherwise it falls back to fill and stretches to bounds. Honored values: fill (default), contain, cover, none, and scale-down.

◆ set_object_position()

void pulp::view::View::set_object_position ( const std::string & value)
inlineinherited

CSS object-position — alignment of the object inside its content box when object-fit leaves blank space (e.g.

contain in a wider box). ImageView consumes it alongside object-fit at paint time when a measurable image is available.

◆ set_opacity()

void pulp::view::View::set_opacity ( float o)
inlineinherited

Opacity (0.0 = transparent, 1.0 = opaque). Applied as layer alpha.

◆ set_outline_color()

void pulp::view::View::set_outline_color ( Color c)
inlineinherited

CSS / RN outline cluster.

Outline is a paint-time ring drawn outside the border-box; it does not affect Yoga layout. Slotting mirrors border-* but lives in its own quartet of fields so a JSX prop diff that touches one outline-* prop preserves the others. Reuses View::BorderStyle for the line-style enum since CSS keyword sets are identical. Skia inflates the box by outline_offset_ + outline_width_ / 2 and strokes; CG falls through for dashed/dotted same as border-style.

◆ set_outline_offset()

void pulp::view::View::set_outline_offset ( float px)
inlineinherited

◆ set_outline_style()

void pulp::view::View::set_outline_style ( BorderStyle s)
inlineinherited

◆ set_outline_width()

void pulp::view::View::set_outline_width ( float px)
inlineinherited

◆ set_overflow()

void pulp::view::View::set_overflow ( Overflow o)
inlineinherited

◆ set_overlay_anchor()

void pulp::view::View::set_overlay_anchor ( const View * anchor)
inherited

Declare the control that OPENED this overlay.

A press on it while the overlay is open toggles the overlay shut; see overlay_dismissal.hpp. A press-opened overlay learns it automatically; nullptr clears it.

◆ set_overlay_consumes_outside_click()

void pulp::view::View::set_overlay_consumes_outside_click ( bool consume)
inlineinherited

◆ set_overlay_trigger()

void pulp::view::View::set_overlay_trigger ( bool is_trigger)
inlineinherited

Mark this view as a control that OPENS an overlay — a dropdown field, a menu button, a popover trigger.

A press that lands on one while a different overlay is open means "switch menus", so the overlay-dismissal policy lets that press through to the trigger after dismissing, and the user changes dropdowns in one press instead of two. Ordinary content is NOT a trigger and keeps the dismiss-and-consume behaviour, or clicking away from a menu would also operate whatever control sits under the click.

ComboBox marks itself. A scripted or imported popover trigger is marked by its authoring surface.

◆ set_overscroll_behavior()

void pulp::view::View::set_overscroll_behavior ( std::string kw)
inlineinherited

◆ set_painter()

void pulp::view::View::set_painter ( std::shared_ptr< WidgetPainter > p)
inherited

◆ set_playing()

void pulp::view::LottieView::set_playing ( bool playing)

◆ set_plugin_view_host()

virtual void pulp::view::View::set_plugin_view_host ( PluginViewHost * host)
virtualinherited

Back-reference to the PluginViewHost that owns this editor tree.

Set by PluginViewHost when the root view is attached. Propagated to children. Virtual for the same reason as set_window_host(); an override MUST call the base to keep the propagation.

Reimplemented in pulp::view::NativeViewHost.

◆ set_pointer_capture()

void pulp::view::View::set_pointer_capture ( int pointer_id)
inherited

Capture pointer events for this view — all events for pointer_id route here regardless of hit-test until released.

◆ set_pointer_events()

void pulp::view::View::set_pointer_events ( PointerEvents p)
inlineinherited

◆ set_position()

void pulp::view::View::set_position ( Position p)
inlineinherited

◆ set_raster_cached()

void pulp::view::View::set_raster_cached ( bool enabled)
inherited

Retain rendered pixels for static leaf content inside its bounds.

This avoids rasterizing an unchanged canvas/gradient on every frame. Uses the same mutation invalidation as subtree caching, plus device/scale/size checks. Unsupported backends, non-leaves, transforms with rotation/skew or fractional pixel origins paint directly. Keep externally animated textures and backdrop-dependent content uncached. Opacity remains live. Turning this off restores the ordinary uncached path.

◆ set_requires_gpu_host()

void pulp::view::View::set_requires_gpu_host ( bool v)
inlineinherited

◆ set_resize()

void pulp::view::View::set_resize ( std::string kw)
inlineinherited

◆ set_right() [1/2]

void pulp::view::View::set_right ( float v)
inlineinherited

◆ set_right() [2/2]

void pulp::view::View::set_right ( float v,
DimensionUnit unit )
inlineinherited

◆ set_rotation()

void pulp::view::View::set_rotation ( float deg)
inlineinherited

◆ set_scalar_source()

void pulp::view::View::set_scalar_source ( std::shared_ptr< ScalarSource > source)
inherited

Bind a ScalarSource — one cached number (a readout, a modulation ring's modulated position).

◆ set_scale()

void pulp::view::View::set_scale ( float s)
inlineinherited

CSS transform properties.

◆ set_scroll_behavior()

void pulp::view::View::set_scroll_behavior ( std::string kw)
inlineinherited

CSS scroll-behavior + overscroll-behavior.

Slot storage on every View; consumed by ScrollView::scroll_by + clamp_scroll_targets (auto triggers instant scroll, smooth enables animated scroll; contain / none for overscroll match Pulp's existing "clamp at content bounds, no scroll chaining" behavior). Non-ScrollView views round-trip the value but the paint pipeline doesn't act on it, matching CSS semantics for non-scrollable elements.

◆ set_scroll_offset()

virtual bool pulp::view::View::set_scroll_offset ( float x,
float y )
virtualinherited

Set / advance the offset, clamped into [0, max_scroll_offset_*]: a container that fits stays at 0 and a wheel past either end stops there.

True when it actually moved, so a clamped no-op skips the repaint. Virtual so ScrollView routes through its own animated setter.

Reimplemented in pulp::view::ScrollView.

◆ set_skew()

void pulp::view::View::set_skew ( float x_deg,
float y_deg )
inlineinherited

◆ set_source_file()

bool pulp::view::LottieView::set_source_file ( const std::string & path)

◆ set_source_json()

bool pulp::view::LottieView::set_source_json ( const std::string & json)

◆ set_source_loc()

void pulp::view::View::set_source_loc ( SourceLocation loc)
inlineinherited

◆ set_speed()

void pulp::view::LottieView::set_speed ( float speed)
inline

◆ set_subpixel_layout()

void pulp::view::View::set_subpixel_layout ( bool v)
inlineinherited

Opt this view's layout pass out of Yoga's whole-pixel grid rounding.

A replayed design arrives with solved fractional geometry that per-node rounding would shift by up to ~0.7px per axis. Honored when ANY view in a layout pass sets it (one Yoga pass has one config).

◆ set_subtree_cached()

void pulp::view::View::set_subtree_cached ( bool v)
inherited

Cache this subtree's painted CONTENT (its outset shadows, clip, background/border, paint(), children, and post-decorations — i.e.

everything paint_content draws) as a replayable scene, re-recorded only when the subtree is invalidated. The view's own opacity / filter / mask / blend compositing layers stay LIVE outside the cache, so animating THOSE (e.g. a hover-opacity fade) does not thrash the cache.

Opt-in, default false. A no-op on backends without CanvasCapability::scene_cache (CoreGraphics, RecordingCanvas, the base canvas): those fall back to painting the subtree directly every frame, so nothing blanks. Implies nothing about needs_layer().

The cache invalidates automatically (see invalidate_subtree_caches_up) on the paths that change what the subtree draws:

Do NOT cache a subtree that animates on its own clock (needs_continuous_frames() true) — a time-driven descendant that updates a uniform each vsync WITHOUT calling request_repaint() would freeze at its recorded frame. (An animation driven through View::animate is safe: it calls request_repaint() per tick, which invalidates.) A debug build log-warns once at record time if it detects such a descendant.

◆ set_text_indent()

void pulp::view::View::set_text_indent ( float v)
inlineinherited

◆ set_text_overflow_ellipsis()

void pulp::view::View::set_text_overflow_ellipsis ( bool e)
inlineinherited

Text overflow: ellipsis (CSS text-overflow: ellipsis).

◆ set_text_selection_region()

void pulp::view::View::set_text_selection_region ( bool region)
inlineinherited

Mark this view as a TEXT CONTENT region — prose the reader may select, as opposed to controls they operate.

Text-bearing widgets inside a region are selectable BY DEFAULT, with no per-widget wiring; text outside every region behaves exactly as it always has. That asymmetry is the whole point. In a plugin editor a drag that starts on text is very often a control gesture — dragging a value readout, a band label, a knob caption — so a globally selectable tree would trade a missing feature for a regression in every existing UI. One declaration around the content the author means, and nothing else moves. The nearest enclosing region is resolved by enclosing_text_selection_region() in pulp/view/selectable_text.hpp — a free function, because "which region owns this view" is a question the selection subsystem asks, not state the View carries. Only the flag lives here.

◆ set_text_shadow_color()

void pulp::view::View::set_text_shadow_color ( std::string c)
inlineinherited

RN textShadow per-attribute storage.

Storage-only; SkPaint shadow integration is not wired here. Each slot is round-trippable so a commitUpdate that touches only one of the three preserves the others (mirrors the per-side border slot pattern). A combined CSS shorthand helper can write all three slots atomically.

◆ set_text_shadow_offset()

void pulp::view::View::set_text_shadow_offset ( float dx,
float dy )
inlineinherited

◆ set_text_shadow_radius()

void pulp::view::View::set_text_shadow_radius ( float r)
inlineinherited

◆ set_theme()

void pulp::view::View::set_theme ( const Theme & theme)
inlineinherited

◆ set_top() [1/2]

void pulp::view::View::set_top ( float v)
inlineinherited

◆ set_top() [2/2]

void pulp::view::View::set_top ( float v,
DimensionUnit unit )
inlineinherited

◆ set_transform_matrix()

void pulp::view::View::set_transform_matrix ( float a,
float b,
float c,
float d,
float e,
float f )
inlineinherited

Full 2D affine transform matrix on the View.

Mirrors the CanvasRenderingContext2D.setTransform contract: [ a c e ] [ b d f ] [ 0 0 1 ] Applied in paint_all() after positioning the canvas at bounds_.{x,y} but before painting any background, border, or children — so the matrix multiplies onto the current canvas transform rather than replacing it (parent transforms still compose). Layout is unaffected: transforms are paint-only, hit-testing and Yoga still see un-transformed bounds.

◆ set_transform_origin()

void pulp::view::View::set_transform_origin ( float x,
float y )
inlineinherited

Transform origin (0-1 normalized, default 0.5,0.5 = center).

Also tracks an "explicitly set" flag so the affine matrix path only honors the origin when the caller has actively chosen one. Without this, setTransform() call sites that never set an origin would silently start anchoring at center.

◆ set_transitions()

void pulp::view::View::set_transitions ( std::vector< TransitionSpec > ts)
inlineinherited

CSS transitions + animations.

set_transitions accepts the parsed shorthand; transitions() returns the slice for the dispatcher to consult when a property changes. Per the CSS spec, matching is a linear walk; later entries win when properties overlap (CSS cascade order).

◆ set_translate()

void pulp::view::View::set_translate ( float x,
float y )
inlineinherited

◆ set_user_select()

void pulp::view::View::set_user_select ( UserSelect s)
inlineinherited

◆ set_visible()

void pulp::view::View::set_visible ( bool v)
inlineinherited

Show or hide this view.

A visibility change is a change to what is on screen, so it dirties the surface. invalidate_subtree_caches_up() alone does NOT: it clears scene caches up the parent chain, returns immediately when nothing anywhere caches, and never reaches the host. Anything that shows a view programmatically — restoring window state, a startup flag, a deep link, a screenshot harness, switching a TabPanel tab — would otherwise render nothing until some unrelated event happened to dirty the window.

◆ set_white_space_mode()

void pulp::view::View::set_white_space_mode ( WhiteSpaceMode m)
inlineinherited

◆ set_white_space_nowrap()

void pulp::view::View::set_white_space_nowrap ( bool n)
inlineinherited

◆ set_window_host()

virtual void pulp::view::View::set_window_host ( WindowHost * host)
virtualinherited

Back-reference to the WindowHost that owns this view tree.

Set by WindowHost when the root view is attached. Propagated to children. Virtual so a widget can react to gaining/losing its host (e.g. NativeViewHost attaches/detaches its OS child view). An override MUST call the base to preserve the recursive propagation to children.

Reimplemented in pulp::view::NativeViewHost.

◆ set_word_break()

void pulp::view::View::set_word_break ( std::string kw)
inlineinherited

◆ set_writing_mode()

void pulp::view::View::set_writing_mode ( std::string kw)
inlineinherited

◆ set_z_index()

void pulp::view::View::set_z_index ( int z)
inlineinherited

◆ simulate_click() [1/2]

void pulp::view::View::simulate_click ( Point root_pos)
inherited

◆ simulate_click() [2/2]

void pulp::view::View::simulate_click ( Point root_pos,
const SimulatedPointer & pointer )
inherited

As above, driven by an explicit pointer device.

Non-left buttons follow the delivery verbs' rule and skip the button-less legacy channels.

◆ simulate_context_click()

bool pulp::view::View::simulate_context_click ( Point root_pos)
inherited

Dispatch a synthetic CONTEXT (right-button) press the way the platform hosts do, via route_context_press.

Returns true when a view claimed the menu. NOT the same as simulate_click with button = right, which delivers through the ordinary mouse channels and opens no menu; see press_reach.hpp for why that asymmetry gets its own verb.

◆ simulate_drag() [1/2]

void pulp::view::View::simulate_drag ( Point start,
Point end,
int steps,
const SimulatedPointer & pointer )
inherited

As above, driven by an explicit pointer device.

◆ simulate_drag() [2/2]

void pulp::view::View::simulate_drag ( Point start,
Point end,
int steps = 10 )
inherited

◆ simulate_hover()

void pulp::view::View::simulate_hover ( Point root_pos)
inherited

◆ sorted_children_by_z_index()

std::vector< View * > pulp::view::View::sorted_children_by_z_index ( ) const
inherited

Children stably sorted by z_index() ascending — paint order (higher-z on top); hit_test walks it reversed. Exposed for tests.

◆ source_loc()

const SourceLocation & pulp::view::View::source_loc ( ) const
inlineinherited

Returns the recorded source location, or an empty (!valid()) SourceLocation when none has been set.

◆ speed()

float pulp::view::LottieView::speed ( ) const
inline

◆ staged_animation() [1/2]

StagedAnimation & pulp::view::View::staged_animation ( )
inlineinherited

◆ staged_animation() [2/2]

const StagedAnimation & pulp::view::View::staged_animation ( ) const
inlineinherited

◆ start_drag()

bool pulp::view::View::start_drag ( DropData data)
inherited

◆ start_file_drag()

bool pulp::view::View::start_file_drag ( const FileDragRequest & request)
inherited

Drag existing on-disk files out of this view to another app (e.g.

drop a rendered .wav onto a DAW timeline). Routes through the attached host's native view to the platform backend; call from a pointer handler. False if no host, no files, or unsupported. See pulp/view/drag_drop.hpp.

◆ structure_generation()

std::uint64_t pulp::view::View::structure_generation ( )
staticnoexceptinherited

Process-wide compatibility generation retained for existing SDK users.

New internal caches should prefer root_structure_generation() so an unrelated editor's mutation does not invalidate their fast path.

◆ subpixel_layout()

bool pulp::view::View::subpixel_layout ( ) const
inlineinherited

◆ subtree_cached()

bool pulp::view::View::subtree_cached ( ) const
inlineinherited

◆ supported()

bool pulp::view::LottieView::supported ( )
static

True when Lottie support is compiled in (PULP_LOTTIE / PULP_HAS_LOTTIE).

◆ supports_reuse()

virtual bool pulp::view::View::supports_reuse ( ) const
inlinevirtualinherited

◆ text_indent()

float pulp::view::View::text_indent ( ) const
inlineinherited

◆ text_overflow_ellipsis()

bool pulp::view::View::text_overflow_ellipsis ( ) const
inlineinherited

◆ text_selection_region()

bool pulp::view::View::text_selection_region ( ) const
inlineinherited

◆ text_shadow_color()

const std::string & pulp::view::View::text_shadow_color ( ) const
inlineinherited

◆ text_shadow_offset_x()

float pulp::view::View::text_shadow_offset_x ( ) const
inlineinherited

◆ text_shadow_offset_y()

float pulp::view::View::text_shadow_offset_y ( ) const
inlineinherited

◆ text_shadow_radius()

float pulp::view::View::text_shadow_radius ( ) const
inlineinherited

◆ theme()

const Theme & pulp::view::View::theme ( ) const
inlineinherited

◆ tick_animations()

int pulp::view::View::tick_animations ( float dt)
inlineinherited

Advance every active CSS animation by dt seconds.

When animation_play_state_ == "paused", the call is a no-op so the animations' elapsed_seconds does not advance — the spec semantic of animation-play-state: paused. The default keyword is running; any value other than paused advances. Returns the number of animations that finished this tick (i.e. flipped active to false). The caller is responsible for committing finished animations; this method only ticks the timeline.

◆ time()

double pulp::view::LottieView::time ( ) const
inline

◆ top()

float pulp::view::View::top ( ) const
inlineinherited

◆ top_unit()

DimensionUnit pulp::view::View::top_unit ( ) const
inlineinherited

◆ transform_origin_explicit()

bool pulp::view::View::transform_origin_explicit ( ) const
inlineinherited

◆ transform_origin_x()

float pulp::view::View::transform_origin_x ( ) const
inlineinherited

◆ transform_origin_y()

float pulp::view::View::transform_origin_y ( ) const
inlineinherited

◆ transitions()

const std::vector< TransitionSpec > & pulp::view::View::transitions ( ) const
inlineinherited

◆ translate_x()

float pulp::view::View::translate_x ( ) const
inlineinherited

◆ translate_y()

float pulp::view::View::translate_y ( ) const
inlineinherited

◆ tree_layout_generation()

std::uint64_t pulp::view::View::tree_layout_generation ( ) const
noexceptinherited

Geometry generation scoped to this View's attached tree.

The public process-wide counter remains available as a diagnostic/test seam, but must not be used to decide whether this root needs layout: activity in another editor or helper tree is irrelevant to this one.

◆ unmarked_paint_mutation_count()

std::uint64_t pulp::view::View::unmarked_paint_mutation_count ( )
inlinestaticnoexceptinherited

◆ user_select()

UserSelect pulp::view::View::user_select ( ) const
inlineinherited

◆ valid()

bool pulp::view::LottieView::valid ( ) const

◆ visible()

bool pulp::view::View::visible ( ) const
inlineinherited

◆ wants_continuous_repaint()

bool pulp::view::View::wants_continuous_repaint ( ) const
inlineinherited

◆ wants_mouse_input()

virtual bool pulp::view::View::wants_mouse_input ( ) const
inlinevirtualinherited

True if this widget handles mouse down/drag through virtual methods even when it does not expose JS pointer callbacks or focus.

Reimplemented in pulp::timeline_view::ArrangerView, pulp::timeline_view::PianoRollView, pulp::view::ArrowButton, pulp::view::Breadcrumb, pulp::view::ChannelStrip, pulp::view::Checkbox, pulp::view::ColorPicker, pulp::view::ComboBox, pulp::view::ConcertinaPanel, pulp::view::ContextMenu, pulp::view::DesignFrameView, pulp::view::DesignStepper, pulp::view::DesignTabGroup, pulp::view::DualRangeSlider, pulp::view::EmptyState, pulp::view::EqCurveView, pulp::view::Fader, pulp::view::FileDropZone, pulp::view::GroupBox, pulp::view::HyperlinkButton, pulp::view::ImageButton, pulp::view::InCanvasDialog, pulp::view::InlineValueEditor, pulp::view::KeyMappingEditor, pulp::view::Knob, pulp::view::Label, pulp::view::LassoComponent, pulp::view::ListBox, pulp::view::LiveConstantEditor, pulp::view::MidiKeyboard, pulp::view::ModalOverlay, pulp::view::ModulationMatrixWidget, pulp::view::MusicalTypingKeyboard, pulp::view::NumberBox, pulp::view::PanControl, pulp::view::PresetBrowser, pulp::view::PropertyList, pulp::view::RangeSlider, pulp::view::ReorderList, pulp::view::ResizableCorner, pulp::view::ScrollBar, pulp::view::ScrollView, pulp::view::SegmentedControl, pulp::view::ShapeButton, pulp::view::SplashScreen, pulp::view::SplitView, pulp::view::StepGridViewBase, pulp::view::Stepper, pulp::view::TableListBox, pulp::view::TabPanel, pulp::view::TextButton, pulp::view::TextEditor, pulp::view::ThemeModeControl, pulp::view::Toast, pulp::view::Toggle, pulp::view::ToggleButton, pulp::view::Toolbar, pulp::view::TreeView, pulp::view::WaveformEditor, pulp::view::WaveformRecorder, and pulp::view::XYPad.

◆ wants_wheel_scroll()

virtual bool pulp::view::View::wants_wheel_scroll ( ) const
virtualinherited

True if this widget is itself a scroll container that should consume wheel input before an ancestor scroll view.

The base answer is true for an overflow: scroll view whose content actually overflows — a container that fits reports false so the wheel keeps bubbling to whatever ancestor CAN scroll, matching a browser.

Reimplemented in pulp::view::ScrollView, pulp::view::VirtualGrid, and pulp::view::VirtualList.

◆ wants_wheel_value()

virtual bool pulp::view::View::wants_wheel_value ( ) const
inlinevirtualinherited

True if this widget adjusts its VALUE on a scroll-wheel over it (knobs, faders, sliders, steppers, pan).

The host routes the wheel to such a widget under the cursor instead of scrolling an enclosing scroll view.

Reimplemented in pulp::view::ChannelStrip, pulp::view::Fader, pulp::view::Knob, pulp::view::NumberBox, pulp::view::PanControl, pulp::view::RangeSlider, and pulp::view::Stepper.

◆ white_space_mode()

WhiteSpaceMode pulp::view::View::white_space_mode ( ) const
inlineinherited

◆ white_space_nowrap()

bool pulp::view::View::white_space_nowrap ( ) const
inlineinherited

◆ window_host()

WindowHost * pulp::view::View::window_host ( ) const
inlineinherited

◆ word_break()

const std::string & pulp::view::View::word_break ( ) const
inlineinherited

◆ writing_mode()

const std::string & pulp::view::View::writing_mode ( ) const
inlineinherited

◆ z_index()

int pulp::view::View::z_index ( ) const
inlineinherited

Member Data Documentation

◆ active_overlay_

View* pulp::view::View::active_overlay_
staticinherited

◆ focused_input_

View* pulp::view::View::focused_input_
staticinherited

Global input-focus shim slot.

The platform window host calls claim_input_focus() when a click sets focus to a widget, and reads focused_input_ for text-input dispatch. The View destructor auto-clears the slot (and the owning root slot) if the focused widget is destroyed before focus is moved off it. Without this, the host's raw View* pointer dangles and the next keypress segfaults inside dynamic_cast<TextEditor*>.

◆ on_click

std::function<void()> pulp::view::View::on_click
inherited

Generic click callback (fires on mouse-down, if set).

◆ on_context_menu

std::function<void(Point position)> pulp::view::View::on_context_menu
inherited

Right-click context menu callback.

If set, called on right-click with view-local coords. Return a list of menu items; an empty return suppresses the menu.

◆ on_dom_pointer_event

std::function<void(const MouseEvent&, bool)> pulp::view::View::on_dom_pointer_event
inherited

One DOM origin.

◆ on_dom_pointer_move_event

std::function<void(const MouseEvent&, bool)> pulp::view::View::on_dom_pointer_move_event
inherited

◆ on_dom_wheel_event

std::function<void(const MouseEvent&, bool is_dom_origin)> pulp::view::View::on_dom_wheel_event
inherited

Bridge wheel delivery.

is_dom_origin selects the one full DOM dispatch; registered ancestors receive only their low-level on(id, "wheel", fn) callback so Element bubbling is not duplicated.

◆ on_drag

std::function<void(Point)> pulp::view::View::on_drag
inherited

JS pointermove during drag callback.

◆ on_drop

std::function<void(const std::string& type, const std::string& data, float x, float y)> pulp::view::View::on_drop
inherited

Drop callback — fired when files or text are dropped on this view.

Parameters: type ("file"/"text"), data (path or text), x, y

◆ on_gesture_cb

std::function<void(const GestureEvent&)> pulp::view::View::on_gesture_cb
inherited

JS gesture event callback.

◆ on_global_click

std::function<void(const std::string& id, uint16_t modifiers)> pulp::view::View::on_global_click
inherited

Global click callback (fires on any view click with widget id). Set on root.

◆ on_global_key

std::function<bool(const KeyEvent&)> pulp::view::View::on_global_key
inherited

Global key callback.

If set on root, called before normal key dispatch. Return true to consume the event.

◆ on_hover_enter

std::function<void()> pulp::view::View::on_hover_enter
inherited

Hover callbacks (CSS :hover equivalent). Fired by set_hovered().

◆ on_hover_leave

std::function<void()> pulp::view::View::on_hover_leave
inherited

◆ on_navigation_key

std::function<bool(const KeyEvent&)> pulp::view::View::on_navigation_key
inherited

Root-scoped callback installed only while a materialized document owns the bounded navigation-focus capability.

◆ on_overlay_dismissed

std::function<void()> pulp::view::View::on_overlay_dismissed
inherited

Fired when the active overlay is dismissed via a framework auto-dismissal path (ESC / outside-click).

Not fired for release_overlay() (JSX unmount / destructor). The bridge uses this to dispatch __dispatch__(id, 'dismiss', 0) so React <View overlay onDismissed> consumers can sync state.

◆ on_pointer_event

std::function<void(const MouseEvent&)> pulp::view::View::on_pointer_event
inherited

JS pointer event callback.

◆ on_pointer_move

std::function<void(const MouseEvent&)> pulp::view::View::on_pointer_move
inherited

JS pointermove carrying full pointer identity (id + type + pressure).

Distinct from on_drag, which collapses every move to pointerId:0/pointerType:'mouse'. Multi-touch hosts (iOS) call this so a scripted UI tracking >1 simultaneous pointer — e.g. OrbitControls pinch-zoom, which keys its dolly on two distinct touch pointerIds — receives each finger's move under its own identity. Desktop hosts that only ever deliver one pointer can keep driving on_drag.


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