Floating inspector window that displays the view hierarchy and properties of a target view tree in a separate OS window.
More...
#include <inspector_window.hpp>
Floating inspector window that displays the view hierarchy and properties of a target view tree in a separate OS window.
Privately implements CommandHandler so the inspector can register its toggle command with a shell-owned CommandRegistry (see register_command_handler) without exposing the handler interface as public API.
◆ HostFactory
Initial value: std::function<std::unique_ptr<WindowHost>(
Definition window_host.hpp:29
◆ InspectorWindow() [1/2]
Construct an inspector targeting the given root view.
- Parameters
-
| target_root | The root of the view tree to inspect. |
| mgr | Optional WindowManager for registration. |
| parent | Optional parent WindowHost (positions relative to it). |
| host_factory | Optional host creation override for tests or embedders that route inspector windows through a custom host. |
◆ ~InspectorWindow()
| pulp::view::InspectorWindow::~InspectorWindow |
( |
| ) |
|
◆ InspectorWindow() [2/2]
| pulp::view::InspectorWindow::InspectorWindow |
( |
const InspectorWindow & | | ) |
|
|
delete |
◆ hide()
| void pulp::view::InspectorWindow::hide |
( |
| ) |
|
Hide the inspector window.
◆ install_keyboard_shortcut()
| void pulp::view::InspectorWindow::install_keyboard_shortcut |
( |
| ) |
|
Install Cmd+I / Ctrl+I keyboard shortcut on the target root's on_global_key.
DEPRECATED — direct assignment owns the entire global-key hook, so a second tool installing its shortcut silently disables this one. New shells should own a CommandRegistry, call route_global_keys() once, and use register_command_handler() instead. Kept for backward compatibility with single-tool callers.
◆ is_visible()
| bool pulp::view::InspectorWindow::is_visible |
( |
| ) |
const |
Whether the inspector window is currently visible.
◆ operator=()
◆ refresh()
| void pulp::view::InspectorWindow::refresh |
( |
| ) |
|
Refresh the tree and properties from the target root.
◆ register_command_handler()
| void pulp::view::InspectorWindow::register_command_handler |
( |
CommandRegistry & | registry | ) |
|
Register the toggle command (kToggleCommand, default chord Cmd+I / Ctrl+I) with a caller-owned CommandRegistry.
Preferred over install_keyboard_shortcut(): the registry path composes with other tools instead of clobbering View::on_global_key. RAII: the handler is removed automatically in the destructor, so dispatch after this window is destroyed simply finds no handler. The registry must outlive this window (the destructor calls back into it). Re-registering moves the handler to the new registry. Does NOT touch target_root_.on_global_key; route the root key path once per shell with route_global_keys(root, registry).
◆ select_view()
| void pulp::view::InspectorWindow::select_view |
( |
View * | view | ) |
|
Select a specific view and update the property list.
◆ show()
| void pulp::view::InspectorWindow::show |
( |
| ) |
|
Show the inspector window.
◆ toggle()
| void pulp::view::InspectorWindow::toggle |
( |
| ) |
|
◆ kToggleCommand
| CommandID pulp::view::InspectorWindow::kToggleCommand = 0x504C5049 |
|
staticconstexpr |
The documentation for this class was generated from the following file: