15#include <choc/containers/choc_Value.h>
24#include <unordered_map>
25#include <unordered_set>
33using namespace pulp::view;
34using namespace pulp::canvas;
101 atlas_inventory_ = inv;
104 return atlas_inventory_;
163 reparent_source_sink_ = std::move(sink);
166 return static_cast<bool>(reparent_source_sink_);
188 knob_apply_sink_ = std::move(sink);
207 agent_request_sink_ = std::move(sink);
220 const std::vector<KnobHit>&
knob_hits()
const {
return knob_hits_; }
244 if (edit_history_) edit_history_->clear();
252 choc::value::Value
value,
253 std::string_view source =
"inspector-gesture");
280 manipulate_only_ =
on;
281 if (
on) dragging_enabled_ =
true;
328 return move_active_ && !move_float_ && drop_target_ !=
nullptr &&
329 (drop_indicator_.width > 0 || drop_indicator_.height > 0);
447 if (!
path.empty()) eyedropper_target_ = std::move(
path);
585 selected_ == text_edit_target_;
666 if (!
path.empty()) text_tweak_path_ = std::move(
path);
714 const std::vector<TweakStore::DriftedTweak>&
drifted()
const {
766 std::vector<ReconcileRow>
rows;
787 reconcile_tab_visible_ =
visible;
791 reconcile_tab_visible_ = !reconcile_tab_visible_;
799 return reconcile_rows_.size();
829 atlas_viewer_visible_ =
visible;
833 atlas_viewer_visible_ = !atlas_viewer_visible_;
882 bool active_ =
false;
884 View* selected_ =
nullptr;
885 View* hovered_ =
nullptr;
888 View* distance_anchor_ =
nullptr;
899 View* alt_hover_target_ =
nullptr;
902 float panel_width_ = 300.0f;
903 float tree_scroll_y_ = 0.0f;
914 std::string editing_field_;
915 std::string edit_buffer_;
916 std::size_t edit_caret_pos_ = 0;
917 float edit_original_value_ = 0.0f;
918 View* edit_target_view_ =
nullptr;
929 View* text_edit_target_ =
nullptr;
930 std::string text_edit_buffer_;
931 std::string text_edit_original_;
932 std::string text_tweak_path_ =
"text";
940 std::size_t text_caret_ = 0;
941 std::size_t text_sel_anchor_ = 0;
942 mutable std::uint32_t text_blink_ticks_ = 0;
950 struct EditableField {
955 std::vector<EditableField> editable_fields_;
963 bool tweaks_panel_visible_ =
false;
964 float tweaks_scroll_y_ = 0.0f;
965 enum class TweakAction : std::uint8_t {
none, bypass, lock, remove };
967 std::string anchor_id;
968 std::string property_path;
973 std::vector<TweakRow> tweak_rows_;
982 pulp::design::KnobSchema knob_schema_;
983 std::function<void(
const KnobApplyEdit&)> knob_apply_sink_ =
nullptr;
985 std::unordered_map<std::string, std::string> knob_selection_;
986 std::vector<KnobHit> knob_hits_;
987 bool agent_field_active_ =
false;
988 std::string agent_text_buffer_;
989 std::size_t agent_caret_ = 0;
990 Rect agent_field_bounds_{};
991 Rect agent_send_bounds_{};
994 std::unordered_set<const View*> collapsed_;
997 render::RenderPassManager* rpm_ =
nullptr;
1006 static constexpr std::size_t kPassTypeCount = 5;
1008 std::array<float, kPassHistoryFrames> cpu_ms{};
1009 std::array<int, kPassHistoryFrames> draw_calls{};
1010 std::size_t count = 0;
1011 std::size_t head = 0;
1015 bool present_last_frame =
false;
1017 std::array<PassRing, kPassTypeCount> pass_rings_{};
1018 int budget_overrun_count_ = 0;
1019 std::uint64_t pass_frames_captured_ = 0;
1023 std::uint64_t last_captured_frame_ = 0;
1024 bool pass_viewer_enabled_ =
false;
1028 TweakStore* tweak_store_ =
nullptr;
1033 pulp::state::EditHistory* edit_history_ =
nullptr;
1047 struct LayoutSnapshot {
1049 float preferred_width = 0.0f;
1050 float preferred_height = 0.0f;
1051 Dimension dim_width{};
1052 Dimension dim_height{};
1059 bool has_left =
false;
1060 bool has_top =
false;
1066 float origin_x = 0.5f;
1067 float origin_y = 0.5f;
1078 std::optional<choc::value::Value> value;
1082 LayoutSnapshot snapshot_layout(
const View*
v)
const;
1086 void restore_layout(View*
v,
const LayoutSnapshot& s)
const;
1088 std::vector<PriorTweak> snapshot_tweaks(
1089 std::string_view anchor,
1090 const std::vector<std::string>& paths)
const;
1092 void restore_tweaks(std::string_view anchor,
1093 const std::vector<PriorTweak>& prior,
1094 std::string_view source)
const;
1098 LayoutSnapshot resize_before_layout_{};
1099 std::vector<PriorTweak> resize_before_tweaks_;
1100 std::string resize_anchor_;
1103 LayoutSnapshot move_before_layout_{};
1104 std::vector<PriorTweak> move_before_tweaks_;
1105 std::string move_anchor_;
1110 InspectorConfig config_{};
1121 std::vector<TweakStore::DriftedTweak> drifted_;
1122 bool drift_drawer_open_ =
false;
1123 bool drift_refreshed_once_ =
false;
1127 Rect drift_header_hit_{};
1136 bool reconcile_tab_visible_ =
false;
1137 float reconcile_scroll_y_ = 0.0f;
1138 std::vector<ReconcileRow> reconcile_rows_;
1149 bool atlas_viewer_visible_ =
false;
1150 const render::AtlasInventory* atlas_inventory_ =
nullptr;
1151 float atlas_scroll_y_ = 0.0f;
1152 std::size_t atlas_row_count_ = 0;
1156 bool dragging_enabled_ =
false;
1162 enum class DragCorner : std::uint8_t {
1163 none, nw, ne, sw, se, n, s, e, w
1165 DragCorner active_drag_ = DragCorner::none;
1166 Point drag_start_pos_{};
1167 Rect drag_start_bounds_{};
1168 float drag_start_pref_w_ = 0.0f;
1169 float drag_start_pref_h_ = 0.0f;
1180 bool resize_proportional_ =
false;
1181 float drag_start_scale_ = 1.0f;
1186 DragCorner hit_test_drag_handle(Point pos)
const;
1198 bool manipulate_only_ =
false;
1209 bool move_active_ =
false;
1210 bool move_refused_grid_ =
false;
1211 Point move_start_pos_{};
1212 float move_seed_left_ = 0.0f;
1213 float move_seed_top_ = 0.0f;
1229 Point move_grab_offset_{};
1231 Point move_cursor_{};
1246 bool move_float_ =
false;
1254 View* drop_target_ =
nullptr;
1255 int drop_index_ = 0;
1256 bool drop_inside_ =
false;
1260 Rect drop_indicator_{};
1261 bool drop_indicator_is_line_ =
false;
1268 void resolve_drop_target(Point pos);
1272 bool commit_reflow_drop(View* dragged);
1275 static bool is_self_or_ancestor(
const View* ancestor,
const View*
v);
1284 void reparent_view(View*
v, View* new_parent,
int index);
1288 bool hit_test_body(Point pos)
const;
1296 const View* containing_block_of(
const View*
v, Rect& block_root_out)
const;
1303 void seed_move_origin(
const View*
v);
1307 bool selected_parent_is_grid()
const;
1312 bool eyedropper_active_ =
false;
1313 bool eyedropper_has_sample_ =
false;
1314 Color eyedropper_sample_{0.0f, 0.0f, 0.0f, 0.0f};
1315 Point eyedropper_cursor_{};
1316 std::string eyedropper_target_ =
"style.background_color";
1323 bool resolved_color_under(Point pos,
Color& out)
const;
1327 void paint_eyedropper_cursor(Canvas& canvas);
1332 bool zoom_active_ =
false;
1333 int zoom_factor_ = 20;
1334 Point zoom_sample_center_{};
1335 Color zoom_center_color_{};
1336 bool zoom_center_from_readback_ =
false;
1342 void update_zoom_sample(Canvas& canvas);
1347 bool resolve_view_color_at(Point
p,
Color& out)
const;
1354 std::vector<TreeItem> flat_tree_;
1355 void rebuild_flat_tree();
1366 bool text_edit_target_reachable()
const;
1367 void clear_text_edit_state();
1377 View* resolve_anchor(
const std::string& anchor)
const;
1384 static std::string preceding_sibling_anchor(
const View* parent,
1393 std::vector<View*> raw_history_views_;
1394 void track_raw_history_view(View*
v);
1395 bool any_raw_history_view_dangling()
const;
1411 struct GestureUndoTarget {
1412 View* raw =
nullptr;
1414 bool anchored =
false;
1418 return anchored ? ov.resolve_anchor(anchor) : raw;
1427 GestureUndoTarget capture_undo_target(View*
v,
bool anchored_gate =
true);
1430 Rect view_bounds_in_root(
const View*
v)
const;
1441 float effective_scale_in_root(
const View*
v)
const;
1444 void paint_highlight(Canvas& canvas);
1449 void paint_drop_indicator(Canvas& canvas);
1454 void paint_drag_ghost(Canvas& canvas);
1455 void paint_distance_lines(Canvas& canvas);
1456 void paint_box_model(Canvas& canvas,
const View*
v);
1457 void paint_panel(Canvas& canvas);
1458 void paint_tree_section(Canvas& canvas,
float x,
float y,
float w,
float& cursor_y);
1459 void paint_props_section(Canvas& canvas,
float x,
float y,
float w,
float h);
1460 void paint_stats_bar(Canvas& canvas,
float x,
float y,
float w);
1465 void paint_pass_attribution(Canvas& canvas,
float x,
float y,
float w,
float h);
1470 float paint_drift_drawer(Canvas& canvas,
float x,
float y,
float w);
1475 void paint_zoom_panel(Canvas& canvas);
1479 void paint_tweaks_section(Canvas& canvas,
float x,
float y,
float w,
float h);
1486 float paint_knob_controls(Canvas& canvas,
float x,
float y,
float w,
float h);
1491 bool handle_knob_panel_click(Point
p);
1495 void submit_agent_request();
1502 void paint_reconcile_tab(Canvas& canvas,
float x,
float y,
float w,
float h);
1509 void paint_atlas_tab(Canvas& canvas,
float x,
float y,
float w,
float h);
1527 struct MouseGesture {
1528 const MouseEvent& event;
1537 MouseGesture resolve_mouse_gesture(
const MouseEvent& event)
const;
1539 std::optional<bool> mouse_text_tool(
const MouseGesture&
g);
1541 void mouse_zoom_loupe(
const MouseGesture&
g);
1542 std::optional<bool> mouse_eyedropper(
const MouseGesture&
g);
1543 std::optional<bool> mouse_active_resize(
const MouseGesture&
g);
1544 std::optional<bool> mouse_begin_resize(
const MouseGesture&
g);
1545 std::optional<bool> mouse_active_move(
const MouseGesture&
g);
1546 std::optional<bool> mouse_begin_move(
const MouseGesture&
g);
1547 std::optional<bool> mouse_panel(
const MouseGesture&
g);
1549 std::optional<bool> mouse_select(
const MouseGesture&
g);
1552 bool point_in_panel(Point
p)
const;
1553 const TreeItem* tree_item_at_y(
float panel_y)
const;
1559 TweakAction tweak_action_at(Point
p, std::size_t& out_row)
const;
1564 int editable_field_at(Point
p)
const;
1567 bool handle_edit_key(
const KeyEvent& event);
1571 void apply_edit_buffer_to_view();
1574 float read_field_value(std::string_view field_path)
const;
1577 void write_field_value(std::string_view field_path,
float value);
1580 static constexpr float kRowHeight = 20.0f;
1581 static constexpr float kIndent = 16.0f;
1582 static constexpr float kFontSize = 11.0f;
1583 static constexpr float kStatsBarHeight = 24.0f;
1589 static constexpr int kZoomGridCells = 11;
1590 static constexpr int kZoomFactorMin = 4;
1591 static constexpr int kZoomFactorMax = 40;
1592 static constexpr float kZoomReadoutH = 36.0f;
1593 static constexpr float kZoomPanelMargin = 12.0f;
1618 std::string_view property_path,
1619 const choc::value::Value&
value);
1640 float badge_w,
float badge_h,
1643 float top_margin = 0.0f);
Definition canvas.hpp:240
Definition inspector_overlay.hpp:36
void text_move_word(int direction, bool extend)
Move the caret one word in direction (-1 left / +1 right), skipping the run of non-word then word byt...
bool handle_text_input(const TextInputEvent &event)
void set_selected_view(View *v)
Set the selected view directly (used by the floating Inspector window so the two surfaces share one s...
Definition inspector_overlay.hpp:288
std::string knob_selection(std::string_view knob_id) const
The knob's currently-selected value (empty when never set).
void text_move_home(bool extend)
Move the caret to the buffer start / end (Cmd+Left / Cmd+Right / Home / End — single-line).
void set_edit_history(pulp::state::EditHistory *h)
Attach an EditHistory so every committed manipulation gesture (drag-to-move, corner-resize,...
Definition inspector_overlay.hpp:130
const std::string & text_edit_buffer() const
Definition inspector_overlay.hpp:564
const std::string & agent_text_buffer() const
Definition inspector_overlay.hpp:223
void toggle_dragging()
Definition inspector_overlay.hpp:265
bool is_active() const
Definition inspector_overlay.hpp:48
void text_select_all()
Select the entire buffer (Cmd+A).
void set_eyedropper_target(std::string path)
Definition inspector_overlay.hpp:446
bool text_editing() const
Definition inspector_overlay.hpp:563
std::size_t reconcile_row_count() const
Number of tweak rows the reconciliation tab laid out on the most recent paint() while it was visible.
Definition inspector_overlay.hpp:798
bool drop_indicator_is_line() const
Definition inspector_overlay.hpp:339
bool has_knob_apply_sink() const
Definition inspector_overlay.hpp:190
void set_eyedropper_active(bool active)
Toggle eyedropper mode.
std::size_t atlas_row_count() const
Number of atlas rows the viewer laid out on the most recent paint() while it was visible.
Definition inspector_overlay.hpp:840
const pulp::design::KnobSchema & knob_schema() const
Definition inspector_overlay.hpp:181
bool tweaks_panel_visible() const
Definition inspector_overlay.hpp:678
void toggle_tool()
Definition inspector_overlay.hpp:69
bool eyedropper_active() const
Definition inspector_overlay.hpp:428
std::uint64_t pass_frames_captured() const
Total frames sampled into the rolling history since construction (saturates conceptually — only the l...
Definition inspector_overlay.hpp:400
CursorAffordance cursor_affordance_at(Point pos) const
Point zoom_sample_center() const
Last cursor position the loupe sampled around, in root (window) coordinates.
Definition inspector_overlay.hpp:873
View * text_edit_target() const
Definition inspector_overlay.hpp:565
int cursor_style_for(Point pos) const
Map a CursorAffordance to a View::CursorStyle; returns the int cast the cursor hook reports to the ho...
void set_manipulate_only(bool on)
Definition inspector_overlay.hpp:279
void toggle_tweaks_panel()
Definition inspector_overlay.hpp:679
void set_text_tweak_path(std::string path)
Definition inspector_overlay.hpp:665
void text_delete_forward()
void set_tweaks_panel_visible(bool visible)
Definition inspector_overlay.hpp:677
void set_atlas_viewer_visible(bool visible)
Toggle the texture-atlas viewer tab.
Definition inspector_overlay.hpp:828
bool commit_field_edit()
Commit the current edit buffer as a tweak, then exit edit mode.
Rect agent_field_bounds() const
Definition inspector_overlay.hpp:221
void clear_edit_history()
Clear the attached EditHistory.
Definition inspector_overlay.hpp:243
SelectionMode selection_mode() const
Current selection mode.
Definition inspector_overlay.hpp:483
void text_insert(const std::string &utf8)
Insert UTF-8 text at the caret, replacing any selection.
void text_delete_backward()
Delete the selection if any; otherwise the codepoint before the caret (Backspace) or after it (Delete...
void paint(Canvas &canvas)
bool text_has_selection() const
Definition inspector_overlay.hpp:630
std::size_t drift_count() const
Number of drifted/orphaned tweaks from the last refresh_drift().
Definition inspector_overlay.hpp:705
std::vector< PassAttribution > pass_attribution() const
Per-pass attribution computed over the current rolling history, ordered by RenderPassType (background...
void set_dragging_enabled(bool enabled)
Toggle drag-handles mode.
Definition inspector_overlay.hpp:263
bool dragging_enabled() const
Definition inspector_overlay.hpp:264
void text_move_caret(int delta, bool extend)
Move the caret by delta UTF-8 codepoints (negative = left).
Tool
Definition inspector_overlay.hpp:66
@ text
Definition inspector_overlay.hpp:66
@ select
Definition inspector_overlay.hpp:66
void set_agent_request_sink(std::function< void(const AgentRequestEdit &)> sink)
Definition inspector_overlay.hpp:206
void toggle_pass_viewer()
Definition inspector_overlay.hpp:408
bool emit_tweak_for_selection(std::string_view property_path, choc::value::Value value, std::string_view source="inspector-gesture")
Emit a tweak for the currently-selected view's anchor.
bool handle_key_event(const KeyEvent &event)
View * selected_view() const
Definition inspector_overlay.hpp:466
Color eyedropper_sample() const
Last color sampled by the eyedropper (updated on every mouse-move while eyedropper mode is active).
Definition inspector_overlay.hpp:435
const View * drop_target() const
Definition inspector_overlay.hpp:341
const std::string & eyedropper_target() const
The dotted color property the eyedropper writes to on click.
Definition inspector_overlay.hpp:445
bool selection_shows_resize_handles() const
Definition inspector_overlay.hpp:575
void set_render_pass_manager(render::RenderPassManager *rpm)
Definition inspector_overlay.hpp:91
static const char * reconcile_status_str(ReconcileStatus status)
Stringify a ReconcileStatus for the panel + tests.
void toggle_reconcile_tab()
Definition inspector_overlay.hpp:790
bool selection_uses_subtle_edit_outline() const
True when the selected element should render the subtle thin-blue text-edit outline instead of the or...
Definition inspector_overlay.hpp:583
int budget_overrun_count() const
Count of frames in history where the manager reported the frame exceeded its time budget (RenderPassM...
Definition inspector_overlay.hpp:395
bool atlas_viewer_visible() const
Definition inspector_overlay.hpp:831
Tool tool() const
Definition inspector_overlay.hpp:67
CursorAffordance
Definition inspector_overlay.hpp:311
@ resize_ns
T/B edge — vertical ↕
Definition inspector_overlay.hpp:315
@ none
Definition inspector_overlay.hpp:312
@ resize_ne_sw
TR/BL corner — diagonal ↗↙
Definition inspector_overlay.hpp:314
@ move
Definition inspector_overlay.hpp:312
@ resize_nw_se
TL/BR corner — diagonal ↖↘
Definition inspector_overlay.hpp:313
@ resize_ew
L/R edge — horizontal ↔
Definition inspector_overlay.hpp:316
const std::vector< TweakStore::DriftedTweak > & drifted() const
Read-only access to the last computed drift list — for tests and host-side badges.
Definition inspector_overlay.hpp:714
const std::string & editing_field() const
Definition inspector_overlay.hpp:524
bool manipulate_only() const
Definition inspector_overlay.hpp:283
bool drop_indicator_active() const
Whether a drop indicator (the blue insertion line / container highlight) would paint right now.
Definition inspector_overlay.hpp:327
Rect drop_indicator_rect() const
Definition inspector_overlay.hpp:340
std::size_t tweak_row_count() const
Number of tweak rows currently laid out in the management panel (populated by the most recent paint()...
Definition inspector_overlay.hpp:685
void set_reparent_source_sink(std::function< void(const ReparentSourceEdit &)> sink)
Definition inspector_overlay.hpp:162
bool apply_eyedropper_pick()
Apply the last sampled color as a tweak to the current selection's eyedropper_target_ property,...
InspectorOverlay(View &root)
ReconcileStatus
Reconciliation state of a single stored tweak.
Definition inspector_overlay.hpp:746
@ locked_to_source
Anchor locked + resolves — survives re-import.
Definition inspector_overlay.hpp:747
@ unresolvable
Anchor not found in the live tree (orphaned).
Definition inspector_overlay.hpp:749
bool is_editing() const
Definition inspector_overlay.hpp:527
int zoom_factor() const
Magnification factor — how many panel pixels per source pixel.
Definition inspector_overlay.hpp:868
void toggle_selection_mode()
Flip between follows_focus and follows_mouse.
Definition inspector_overlay.hpp:488
bool begin_field_edit(std::string field_path, float initial_value)
Begin editing the named property on the current selection.
void toggle()
Definition inspector_overlay.hpp:50
bool text_copy()
Clipboard: copy / cut / paste the selection (Cmd+C / X / V).
bool agent_field_active() const
Definition inspector_overlay.hpp:224
void set_reconcile_tab_visible(bool visible)
Toggle the reconciliation tab.
Definition inspector_overlay.hpp:786
Color zoom_center_color() const
Resolved color of the center (sample) pixel — what the loupe readout reports as a hex string.
Definition inspector_overlay.hpp:878
bool has_agent_request_sink() const
Definition inspector_overlay.hpp:209
void cancel_field_edit()
Cancel the current edit without writing a tweak.
bool capture_pass_frame()
Sample the attached RenderPassManager's current-frame pass stats into the rolling history.
bool sample_color_at(Point pos, Canvas *canvas, Color &out) const
Sample the color under pos (root coords) WITHOUT applying it.
SelectionMode
How the selected node is chosen as the pointer moves.
Definition inspector_overlay.hpp:478
@ follows_focus
Definition inspector_overlay.hpp:478
@ follows_mouse
Definition inspector_overlay.hpp:478
ReconcileReport reconcile_report() const
Recompute the reconciliation report by classifying every stored tweak against the live view tree's an...
const InspectorConfig & config() const
Definition inspector_overlay.hpp:500
static void set_editable_text_of(View *v, const std::string &text)
Write text to a text-bearing View's copy, marking layout dirty so the new text reflows + repaints.
static std::string editable_text_of(const View *v)
Read the current text of a text-bearing View (empty if v is null or carries no editable text).
bool eyedropper_has_sample() const
Whether eyedropper_sample_ reflects a real sample yet (false until the first mouse-move inside the ca...
Definition inspector_overlay.hpp:439
pulp::state::EditHistory * edit_history() const
Definition inspector_overlay.hpp:131
View & inspected_root() const
Definition inspector_overlay.hpp:45
std::pair< std::size_t, std::size_t > text_selection() const
Selection range as [start, end) byte offsets (start == end → none).
bool begin_text_edit(View *v)
Begin an inline text edit of v's copy, seeding the buffer with the current text.
void toggle_zoom()
Definition inspector_overlay.hpp:863
void set_pass_viewer_enabled(bool enabled)
Toggle the per-pass attribution panel section.
Definition inspector_overlay.hpp:406
void toggle_eyedropper()
Definition inspector_overlay.hpp:429
void toggle_drift_drawer()
Definition inspector_overlay.hpp:710
static constexpr std::size_t kPassHistoryFrames
Number of frames the rolling per-pass history retains.
Definition inspector_overlay.hpp:376
View * hovered_view() const
Definition inspector_overlay.hpp:467
Rect agent_send_bounds() const
Definition inspector_overlay.hpp:222
void set_atlas_inventory(const render::AtlasInventory *inv)
Attach the render layer's texture-atlas inventory so the atlas viewer tab (A hotkey) can report per-a...
Definition inspector_overlay.hpp:100
void set_drift_drawer_open(bool open)
Definition inspector_overlay.hpp:709
void set_tweak_store(TweakStore *store)
Connect the inspector overlay to the in-process TweakStore so gesture detectors can persist direct-ma...
Definition inspector_overlay.hpp:114
SourceJumpResult jump_to_selection_source(bool dry_run=true)
Resolve the selected view's authored source location and (unless dry_run) open the user's editor at t...
std::size_t text_caret() const
Caret byte-offset into the edit buffer (UTF-8 boundary-aligned).
Definition inspector_overlay.hpp:627
void set_knob_apply_sink(std::function< void(const KnobApplyEdit &)> sink)
Definition inspector_overlay.hpp:187
static bool view_has_editable_text(const View *v)
True if v exposes editable text the Text tool can edit (today a Label or a TextEditor).
int drop_index() const
Test-visible accessors for the resolved reflow drop.
Definition inspector_overlay.hpp:338
bool has_reparent_source_sink() const
Definition inspector_overlay.hpp:165
const std::string & text_tweak_path() const
Dotted property path the Text tool writes the edited copy to.
Definition inspector_overlay.hpp:664
const std::string & edit_buffer() const
Definition inspector_overlay.hpp:525
void set_knob_schema(pulp::design::KnobSchema schema)
Semantic knobs → apply-to-artifact.
Definition inspector_overlay.hpp:180
void cancel_text_edit()
Cancel the inline text edit, restoring the View's original text.
void toggle_atlas_viewer()
Definition inspector_overlay.hpp:832
bool drift_drawer_open() const
Whether the drift drawer is currently expanded.
Definition inspector_overlay.hpp:708
void refresh_drift()
Recompute the drift list by diffing the attached TweakStore against the current live view tree's anch...
void set_zoom_factor(int factor)
void set_config(InspectorConfig config)
The editor-URL config used to format source-jump URLs.
Definition inspector_overlay.hpp:499
void set_selection_mode(SelectionMode mode)
Definition inspector_overlay.hpp:484
TweakStore * tweak_store() const
Definition inspector_overlay.hpp:115
bool zoom_active() const
Definition inspector_overlay.hpp:861
bool pass_viewer_enabled() const
Definition inspector_overlay.hpp:407
void set_active(bool active)
const std::vector< KnobHit > & knob_hits() const
Definition inspector_overlay.hpp:220
void text_move_end(bool extend)
const render::AtlasInventory * atlas_inventory() const
Definition inspector_overlay.hpp:103
bool handle_mouse_event(const MouseEvent &event)
bool reconcile_tab_visible() const
Definition inspector_overlay.hpp:789
void set_zoom_active(bool active)
bool commit_text_edit()
Commit the inline text edit: keep the live View text, emit a text content tweak (path == text_tweak_p...
std::size_t edit_caret_pos() const
Definition inspector_overlay.hpp:526
In-memory record of inspector direct-manipulation edits ("tweaks"), keyed by stable_anchor_id + dotte...
Definition tweak_store.hpp:53
A read-only collection of atlas snapshots for the inspector.
Definition atlas_inventory.hpp:96
Frame-level render pass manager.
Definition render_pass.hpp:41
Global undo/redo history for the application.
Definition edit_history.hpp:39
Overflow
Overflow mode.
Definition view.hpp:1826
Position
CSS position property.
Definition view.hpp:1753
Definition affine_transform.hpp:24
@ path
Definition scene_node.hpp:93
Definition agent_context.hpp:7
bool apply_move_tweak_to_view(View &view, std::string_view property_path, const choc::value::Value &value)
Move-tweak namespace bridge.
InspectorOverlay * g_active_inspector
Global inspector instance for the current window.
Definition inspector_overlay.hpp:1649
BadgePlacement compute_badge_placement(float sel_x, float sel_y, float sel_h, float badge_w, float badge_h, float root_w, float gap=5.0f, float top_margin=0.0f)
Place a badge of size (badge_w × badge_h) for a selection whose top-left is at (sel_x,...
void uninstall_inspector_hooks()
Tear down what install_inspector_hooks() set up: nulls g_active_inspector and releases all five View ...
void install_inspector_hooks(InspectorOverlay &inspector)
Install the inspector into the View system's paint and input hooks.
Definition gpu_fwd.hpp:31
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
@ inspector
Resizable inspector panel.
Definition window_manager.hpp:20
DimensionUnit
Definition geometry.hpp:392
canvas::Color Color
Definition theme.hpp:12
@ value
the widget's primary value (Knob, Fader, RangeSlider, Toggle, ProgressBar)
Definition binding_diagnostics.hpp:19
@ visible
Content renders beyond bounds (default for views).
Definition geometry.hpp:384
@ h
Definition input_events.hpp:39
@ y
Definition input_events.hpp:42
@ c
Definition input_events.hpp:39
@ p
Definition input_events.hpp:40
@ x
Definition input_events.hpp:41
@ v
Definition input_events.hpp:41
@ g
Definition input_events.hpp:39
@ t
Definition input_events.hpp:41
@ on
Definition accessibility.hpp:132
A design's declared set of knobs.
Definition design_knobs.hpp:70
Computed top-left placement for a selection badge (the type W×H hover tooltip and the grid-refuse "ca...
Definition inspector_overlay.hpp:1623
float y
Definition inspector_overlay.hpp:1625
float x
Definition inspector_overlay.hpp:1624
bool below
true when flipped below the selection
Definition inspector_overlay.hpp:1626
Inspector runtime configuration.
Definition editor_url.hpp:38
Send-to-agent → free-text request.
Definition inspector_overlay.hpp:203
std::string text
the human's free-text request
Definition inspector_overlay.hpp:204
Definition inspector_overlay.hpp:183
std::string knob_id
the chosen knob's stable id
Definition inspector_overlay.hpp:184
std::string value
the selected position: label (Enum/Toggle) or slider value
Definition inspector_overlay.hpp:185
One knob control's on-screen hit-rect from the last paint.
Definition inspector_overlay.hpp:215
Rect bounds
root coords
Definition inspector_overlay.hpp:218
std::string value
Definition inspector_overlay.hpp:217
std::string knob_id
Definition inspector_overlay.hpp:216
Aggregated attribution data for a single render pass type, computed over the rolling frame history.
Definition inspector_overlay.hpp:362
const char * name
Human-readable pass name.
Definition inspector_overlay.hpp:364
float avg_cpu_ms
Mean CPU time_ms over recorded history.
Definition inspector_overlay.hpp:367
int type
RenderPassType cast to int.
Definition inspector_overlay.hpp:363
int last_draw_calls
Draw calls in the most recent frame.
Definition inspector_overlay.hpp:369
bool present
Pass appeared in the most recent frame.
Definition inspector_overlay.hpp:365
float peak_cpu_ms
Worst CPU time_ms over recorded history.
Definition inspector_overlay.hpp:368
float last_cpu_ms
CPU time_ms in the most recent frame.
Definition inspector_overlay.hpp:366
int peak_draw_calls
Worst draw-call count over history.
Definition inspector_overlay.hpp:370
std::size_t samples
Number of recorded frames for this pass.
Definition inspector_overlay.hpp:371
Aggregate reconciliation report over every tweak in the attached TweakStore, classified against the c...
Definition inspector_overlay.hpp:765
std::size_t total() const
Definition inspector_overlay.hpp:771
std::size_t unresolvable_count
Definition inspector_overlay.hpp:769
std::size_t locked_count
Definition inspector_overlay.hpp:767
std::vector< ReconcileRow > rows
Definition inspector_overlay.hpp:766
std::size_t drifted_count
Definition inspector_overlay.hpp:768
One classified tweak row in the reconciliation report.
Definition inspector_overlay.hpp:756
std::string property_path
Definition inspector_overlay.hpp:758
ReconcileStatus status
Definition inspector_overlay.hpp:759
std::string anchor_id
Definition inspector_overlay.hpp:757
Structural reparent → lock-to-source.
Definition inspector_overlay.hpp:157
std::string new_parent_anchor
Definition inspector_overlay.hpp:159
std::string insert_after_anchor
Definition inspector_overlay.hpp:160
std::string child_anchor
Definition inspector_overlay.hpp:158
Outcome of a source-jump resolution.
Definition source_jump.hpp:34
Rich key event with key code, modifiers, and repeat state.
Definition input_events.hpp:193
Rich mouse/pointer event with position, modifiers, button state, pointer ID, and stylus properties.
Definition input_events.hpp:104
Definition geometry.hpp:20
Axis-aligned rectangle in continuous (float) coordinates.
Definition geometry.hpp:52
Text input from IME or keyboard composition (separate from KeyEvent).
Definition input_events.hpp:210