24using namespace pulp::view;
25using namespace pulp::canvas;
46 View* header_ =
nullptr;
47 View* content_ =
nullptr;
49 static constexpr float kHeaderHeight = 24.0f;
66 std::string timestamp_;
145 selection_readonly_ = readonly;
171 std::unique_ptr<View> build_elements_tab();
172 std::unique_ptr<View> build_console_tab();
173 std::unique_ptr<View> build_performance_tab();
174 std::unique_ptr<View> build_state_tab();
175 std::unique_ptr<View> build_wiring_tab();
178 void refresh_elements();
179 void refresh_console();
180 void refresh_performance();
181 void refresh_state();
184 void refresh_wiring();
187 void select_wiring_node(
const std::string& node);
189 std::string figma_reveal_url(
const std::string& node)
const;
192 void show_properties_for(
View*
view);
195 View* inspected_root_ =
nullptr;
209 ToolStrip* tool_strip_ =
nullptr;
210 int active_tool_ = 0;
220 View* elements_props_container_ =
nullptr;
224 View* console_list_ =
nullptr;
227 Label* fps_label_ =
nullptr;
228 Label* frame_time_label_ =
nullptr;
229 Label* gpu_render_label_ =
nullptr;
230 Label* budget_label_ =
nullptr;
231 View* pass_list_ =
nullptr;
232 Label* view_count_label_ =
nullptr;
236 View* state_list_ =
nullptr;
239 View* wiring_list_ =
nullptr;
241 Label* wiring_detail_ =
nullptr;
242 Label* wiring_status_ =
nullptr;
243 std::string figma_file_key_;
244 std::string wiring_selected_;
245 std::map<std::string, std::string> wiring_notes_;
248 struct WiringEntry { std::string node; std::string kind;
bool wired =
false; };
249 std::vector<WiringEntry> wiring_entries_;
252 View* selected_view_ =
nullptr;
257 bool selection_readonly_ =
false;
271 std::size_t tree_signature_ = 0;
273 std::size_t compute_tree_signature(
const View*
view)
const;
276 Label* prop_type_label_ =
nullptr;
277 Label* prop_id_label_ =
nullptr;
280 Label* prop_bounds_label_ =
nullptr;
281 Label* prop_direction_label_ =
nullptr;
282 Label* prop_gap_label_ =
nullptr;
283 Label* prop_padding_label_ =
nullptr;
284 Label* prop_margin_label_ =
nullptr;
285 Label* prop_grow_shrink_label_ =
nullptr;
288 Label* prop_opacity_label_ =
nullptr;
289 Label* prop_bgcolor_label_ =
nullptr;
290 Label* prop_border_label_ =
nullptr;
291 Label* prop_corner_label_ =
nullptr;
292 Label* prop_visible_label_ =
nullptr;
293 Label* prop_enabled_label_ =
nullptr;
296 Label* prop_widget_value_label_ =
nullptr;
Definition canvas.hpp:240
A disclosure-triangle section: click header to expand/collapse content.
Definition inspector_window.hpp:30
CollapsableSection(std::string title, bool initially_expanded=true)
bool is_expanded() const
Definition inspector_window.hpp:34
void paint(canvas::Canvas &canvas) override
void on_mouse_event(const MouseEvent &event) override
Mouse down with full event context.
void set_expanded(bool e)
View * content() const
The content container — add children here.
Definition inspector_window.hpp:38
Captures JS console output (console.log/warn/error) for inspector display.
Definition console_capture.hpp:22
Displays a single console log entry with colored level badge and timestamp.
Definition inspector_window.hpp:55
void paint(canvas::Canvas &canvas) override
float intrinsic_height() const override
Definition inspector_window.hpp:61
void set_entry(const ConsoleCapture::Entry &entry)
void set_state_inspector(StateInspector *si)
Set the state inspector for the State tab.
Definition inspector_window.hpp:92
void set_console_capture(ConsoleCapture *capture)
Set the console capture for the Console tab.
Definition inspector_window.hpp:86
void set_selection_readonly(bool readonly)
When true, clicking a tree row only shows that node's properties (read-only display) and never change...
Definition inspector_window.hpp:144
bool export_wiring_annotations(const std::string &path) const
Write the Wiring-tab annotations (each design-sourced control's node id, kind, wired flag,...
std::function< void(View *view)> on_view_selected
Called when a view is selected in the tree.
Definition inspector_window.hpp:125
void set_render_pass_manager(render::RenderPassManager *rpm)
Set the render pass manager for the Performance tab.
Definition inspector_window.hpp:89
void set_figma_file_key(std::string key)
Figma file key used to build "Reveal in Figma" URLs for Wiring-tab rows (e.g.
Definition inspector_window.hpp:104
std::function< void(int tool_index)> on_tool_picked
Fired when the user clicks a tool button in the strip.
Definition inspector_window.hpp:167
InspectorWindow(View &root)
Convenience: construct and immediately set the inspected root.
void reflect_selection(View *view)
Reflect the canvas-driven selection into this window WITHOUT firing on_view_selected (no feedback loo...
void set_inspected_root(View *root)
Set the root view to inspect (Elements tab).
void set_active_tool(int tool_index)
Index of the active tool the strip highlights (0 = Select, 1 = Text).
int active_tool() const
Definition inspector_window.hpp:162
void refresh()
Refresh all tabs with latest data. Call once per frame.
void select_tab(std::string_view title)
Programmatically select a tab by title (e.g.
bool selection_readonly() const
Definition inspector_window.hpp:147
void select_view(View *view)
Select a view from external code (e.g., Cmd+click in plugin window).
Monitors StateStore parameters for the inspector.
Definition state_inspector.hpp:25
Frame-level render pass manager.
Definition render_pass.hpp:41
Definition widgets.hpp:56
Tabbed container that shows one child at a time.
Definition ui_components.hpp:356
Text editing widget with comprehensive keyboard/mouse interaction.
Definition text_editor.hpp:47
Hierarchical tree view widget.
Definition tree_view.hpp:57
friend class ScrollView
Definition view.hpp:2792
View * parent() const
Definition view.hpp:163
Definition affine_transform.hpp:24
Definition agent_context.hpp:7
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
@ path
Definition anchor_strategy.hpp:42
@ e
Definition input_events.hpp:39
A captured log entry.
Definition console_capture.hpp:25
Rich mouse/pointer event with position, modifiers, button state, pointer ID, and stylus properties.
Definition input_events.hpp:104
A node in the tree hierarchy.
Definition tree_view.hpp:18
Hierarchical tree display widget for file browsers, plugin lists, etc.
Additional UI components: ComboBox, Tooltip, ProgressBar, CallOutBox, TabPanel, ListBox,...