Compact 3-segment control to pick the theme mode: system / light / dark. More...
#include <ui_components.hpp>
Public Member Functions | |
| ThemeModeControl () | |
| void | set_mode (ThemeMode m) |
| ThemeMode | mode () const |
| int | hovered_segment () const |
| for tests; -1 none | |
| void | paint (canvas::Canvas &canvas) override |
| void | on_mouse_down (Point pos) override |
| void | on_mouse_event (const MouseEvent &event) override |
| Mouse down with full event context. | |
| bool | wants_mouse_input () const override |
| True if this widget handles mouse down/drag through virtual methods even when it does not expose JS pointer callbacks or focus. | |
| float | intrinsic_height () const override |
| 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 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 | on_attached () |
| virtual void | on_detached () |
| 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_frame_clock_changed () |
| 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. | |
| 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 | 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_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 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(ThemeMode)> | on_mode_change |
| 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) |
Compact 3-segment control to pick the theme mode: system / light / dark.
Each segment is an icon (auto split-disc, sun, moon); the active one is highlighted and the hovered one shows its name. Clicking fires on_mode_change(ThemeMode). Pair it with a ThemeManager (call its set_mode() from the callback, and set_mode(manager.mode()) to reflect the live OS-follow state). Opt-in: a developer offering only one mode just never places this control.
|
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 | |
|
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 | |
|
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.
|
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. |
|
stronginherited |
|
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.
|
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 | |
|
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 | |
|
stronginherited |
|
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 | |
|
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 | |
|
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_ | |
|
inline |
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
The resolved accessible name: author-set if present, else content-derived.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Number of animations currently running on this view. For tests.
|
inlineinherited |
|
inlineinherited |
|
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.
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.
|
inherited |
|
inherited |
|
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.
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
Turns of the circle the conic stop list spans; < 1 means it repeats.
Exposed for tests/inspection.
|
inlineinherited |
0=none, 1=linear, 2=radial, 3=conic. Exposed for tests/inspection.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
Every layer, in CSS author order (first paints on top).
|
inlinestaticnoexceptinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
inherited |
Cancel a running animation by id (no-op if already finished/unknown).
|
inherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
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).
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
The content-derived name on its own, ignoring any author-set name.
|
inlinestaticnoexceptinherited |
|
inlineinherited |
|
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.
|
staticinherited |
Hosted variant acts only on scope's interaction slot.
|
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.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
Compute the effective uniform corner radius in px against the given bounds (called by paint code).
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Compute effective per-corner radius (px) against given bounds.
|
inlineinherited |
|
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").
|
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").
|
inlineinherited |
CSS :disabled equivalent — blocks input, reduces opacity.
|
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.
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Get the frame clock (walks up parent chain to find it).
|
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.
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
Returns the six affine components in (a,b,c,d,e,f) order; meaningful only when has_transform_matrix() is true.
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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).
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Per-corner radius accessors. corner_radii_[0..3] = TL, TR, BL, BR.
|
inlineinherited |
True when an author explicitly named this view (set_access_label / aria-label), as opposed to the name being derived from its content.
|
inlineinherited |
|
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).
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
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.
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
local_bounds() grown by hit_slop().
The rect hit_test() actually accepts, and the one a test should assert against.
|
inlineinherited |
|
inlineinherited |
CSS pointer-events: none — view is invisible to hit testing.
|
inlineinherited |
|
inlineinherited |
|
inline |
for tests; -1 none
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Walks own value, then parent chain. nullopt if no ancestor set it.
|
inherited |
Root-owned interaction state for this view's tree.
Root-aware code should prefer this over the process-global shim statics below.
|
inherited |
|
inlineoverridevirtual |
Reimplemented from pulp::view::View.
|
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.
|
inlineinherited |
Mark layout as needing recalculation (auto-invalidation).
|
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.
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
|
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.
|
inlineinherited |
|
inlinestaticnoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlinestaticnoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
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.
|
inlinenoexceptinherited |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Scrollable range, content - viewport clamped at 0.
Zero means the content fits and the container must not scroll.
|
inherited |
|
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.
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
|
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.
|
inlineinherited |
|
inlinestaticnoexceptinherited |
Record a paint change that requested no repaint of its own.
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlinevirtualinherited |
Reimplemented in pulp::view::LottieView, and pulp::view::TextEditor.
|
inlinevirtualinherited |
Reimplemented in pulp::view::LottieView.
|
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.
|
inlinevirtualinherited |
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 in pulp::view::InlineValueEditor, pulp::view::LottieView, pulp::view::StepGridViewBase, and pulp::view::TextEditor.
|
inlinevirtualinherited |
Gesture event (pinch/rotate from multi-touch or trackpad).
Reimplemented in pulp::view::EqCurveView.
|
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.
|
inlinevirtualinherited |
Key event with modifiers and up/down state.
Return true if handled (prevents propagation to parent).
Reimplemented in pulp::view::CallOutBox, pulp::view::ComboBox, pulp::view::ContextMenu, pulp::view::InlineValueEditor, pulp::view::KeyMappingEditor, pulp::view::ListBox, pulp::view::ModalOverlay, pulp::view::MusicalTypingKeyboard, pulp::view::NumberBox, pulp::view::PresetBrowser, pulp::view::ScrollBar, pulp::view::SegmentedControl, pulp::view::Stepper, pulp::view::TextEditor, pulp::view::TreeView, pulp::view::VirtualGrid, pulp::view::VirtualList, and pulp::view::WaveformEditor.
|
inlinevirtualinherited |
|
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.
|
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.
|
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.
|
overridevirtual |
Reimplemented from pulp::view::View.
|
inlinevirtualinherited |
Reimplemented in pulp::timeline_view::ArrangerView, pulp::timeline_view::PianoRollView, pulp::view::ChannelStrip, pulp::view::ColorPicker, pulp::view::DesignFrameView, pulp::view::DualRangeSlider, pulp::view::EqCurveView, pulp::view::Fader, pulp::view::Knob, pulp::view::LassoComponent, pulp::view::LiveConstantEditor, pulp::view::MidiKeyboard, pulp::view::MusicalTypingKeyboard, pulp::view::NumberBox, pulp::view::PanControl, pulp::view::RangeSlider, pulp::view::ReorderList, pulp::view::ResizableCorner, pulp::view::ScrollBar, pulp::view::ScrollView, pulp::view::SplitView, pulp::view::StepGridViewBase, pulp::view::Stepper, pulp::view::TextEditor, pulp::view::VirtualGrid, pulp::view::VirtualList, pulp::view::WaveformRecorder, and pulp::view::XYPad.
|
inlinevirtualinherited |
|
overridevirtual |
Mouse down with full event context.
Reimplemented from pulp::view::View.
|
inlinevirtualinherited |
Reimplemented in pulp::view::DesignFrameView, pulp::view::EqCurveView, pulp::view::Fader, pulp::view::HyperlinkButton, pulp::view::ImageButton, pulp::view::Knob, pulp::view::MusicalTypingKeyboard, pulp::view::NumberBox, pulp::view::PanControl, pulp::view::RangeSlider, pulp::view::ScrollView, pulp::view::ShapeButton, pulp::view::Stepper, pulp::view::TextButton, and pulp::view::Toggle.
|
inlinevirtualinherited |
Reimplemented in pulp::timeline_view::ArrangerView, pulp::timeline_view::PianoRollView, pulp::view::ColorPicker, pulp::view::DesignFrameView, pulp::view::DualRangeSlider, pulp::view::EqCurveView, pulp::view::Fader, pulp::view::Knob, pulp::view::LassoComponent, pulp::view::MidiKeyboard, pulp::view::MusicalTypingKeyboard, pulp::view::NumberBox, pulp::view::ReorderList, pulp::view::SplitView, pulp::view::StepGridViewBase, pulp::view::Stepper, pulp::view::TextButton, pulp::view::TextEditor, pulp::view::WaveformRecorder, and pulp::view::XYPad.
|
inlinevirtualinherited |
Reimplemented in pulp::view::TextEditor, pulp::view::VirtualGrid, and pulp::view::VirtualList.
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Instance id of the anchor (never a recyclable address), or 0 for none.
|
inherited |
|
inlineinherited |
|
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.
|
inherited |
Number of overlays currently open under this view's root.
Never allocates interaction state, so it is safe to ask on any tree.
|
inlineinherited |
True if this overlay was claimed nested on below; see claim_overlay.
|
staticinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
Reimplemented in pulp::view::DesignFitView, pulp::view::VirtualGrid, and pulp::view::VirtualList.
|
overridevirtual |
Reimplemented from pulp::view::View.
|
virtualinherited |
Reimplemented in pulp::view::NativeViewHost, and pulp::view::ScrollView.
|
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).
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
|
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.
|
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.
|
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".
|
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.
|
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.
|
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.
|
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.
|
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().
|
inlineinherited |
|
inherited |
|
inherited |
Resolve a dimension token: check own theme, walk up to parent.
|
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.
|
inlineinherited |
Resolve auto_ → ltr (LTR fallback, until first-strong-character detection is wired).
Use this at paint time when you need a concrete direction.
|
inlineinherited |
|
inlinevirtualinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinevirtualinherited |
|
inherited |
The latest scalar snapshotted on the clock.
0 until the first frame, and again from the moment the source is changed or unbound.
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
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.
|
inlinevirtualinherited |
Reimplemented in pulp::view::ScrollView.
|
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().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
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.
|
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.
|
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.
|
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 }).
|
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.
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
Background color (optional — if set, painted before children).
|
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.
|
inlineinherited |
Replace the background-image stack, first layer on top.
|
inlineinherited |
Background gradient (CSS background: linear-gradient / radial-gradient).
|
inlineinherited |
Radial gradient.
cx/cy are fractions of the box; radius_frac is a fraction of the larger box dimension (resolved at paint).
|
inlineinherited |
|
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.
|
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).
|
inlineinherited |
|
inlineinherited |
Border (optional — painted on top of background).
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
Root of an imported frame: captured text snaps baselines to its grid.
|
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.
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
Opt a custom view into per-vsync repaints — required for live content (meters/spectrum, automation-tracking values) or it looks frozen.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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}.
|
inlineinherited |
Per-corner percent setters.
Same semantics as set_border_radius_pct: paint time resolves to pct * 0.01 * min(width, height).
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
Attach a GPU post-processing effect to this View's compositing layer.
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
The runtime host command channel for this view tree, or nullptr.
Same ownership/propagation/null-degradation semantics as host_params().
|
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.
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
0 = left, 1 = center, 2 = right (matches LabelAlign).
|
inlineinherited |
|
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.
|
staticinherited |
|
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.
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
CSS mask shorthand.
Stored verbatim alongside mask_image_; the longhand fan-out in the JS shim populates the image slot from this string.
|
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.
|
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>.
|
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.
|
inherited |
|
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.
|
inline |
|
inlineinherited |
Force this View's subtree to render into a compositing layer.
Useful for caching, post-effects, or explicit layer isolation.
|
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.
|
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.
|
inlineinherited |
Opacity (0.0 = transparent, 1.0 = opaque). Applied as layer alpha.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
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.
|
inlineinherited |
|
inherited |
|
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.
|
inherited |
Capture pointer events for this view — all events for pointer_id route here regardless of hit-test until released.
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Bind a ScalarSource — one cached number (a readout, a modulation ring's modulated position).
|
inlineinherited |
CSS transform properties.
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
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).
|
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.
|
inlineinherited |
|
inlineinherited |
Text overflow: ellipsis (CSS text-overflow: ellipsis).
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
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.
|
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).
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inherited |
As above, driven by an explicit pointer device.
Non-left buttons follow the delivery verbs' rule and skip the button-less legacy channels.
|
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.
|
inherited |
As above, driven by an explicit pointer device.
|
inherited |
|
inherited |
Children stably sorted by z_index() ascending — paint order (higher-z on top); hit_test walks it reversed. Exposed for tests.
|
inlineinherited |
Returns the recorded source location, or an empty (!valid()) SourceLocation when none has been set.
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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.
|
inlinestaticnoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineoverridevirtual |
True if this widget handles mouse down/drag through virtual methods even when it does not expose JS pointer callbacks or focus.
Reimplemented from pulp::view::View.
|
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.
|
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
staticinherited |
|
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*>.
|
inherited |
Generic click callback (fires on mouse-down, if set).
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.
|
inherited |
One DOM origin.
|
inherited |
|
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.
|
inherited |
JS pointermove during drag callback.
|
inherited |
Drop callback — fired when files or text are dropped on this view.
Parameters: type ("file"/"text"), data (path or text), x, y
|
inherited |
JS gesture event callback.
|
inherited |
Global click callback (fires on any view click with widget id). Set on root.
|
inherited |
Global key callback.
If set on root, called before normal key dispatch. Return true to consume the event.
|
inherited |
Hover callbacks (CSS :hover equivalent). Fired by set_hovered().
|
inherited |
| std::function<void(ThemeMode)> pulp::view::ThemeModeControl::on_mode_change |
|
inherited |
Root-scoped callback installed only while a materialized document owns the bounded navigation-focus capability.
|
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.
|
inherited |
JS pointer event callback.
|
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.