Skip to main content

Module inspect

Module inspect 

Source
Expand description

Devtools’ inspect mode: click an element (or reach it with Tab and the arrows, then Enter) and a dialog says what egui and egui-pop know of it, with a Copy button, so that a misbehaving element can be named precisely in a report.

The command devtools.inspect (Ctrl+Shift+F12; View menu, the palette, the picker button at the menu bar’s end, the devtools panel) enters the mode, a second press or Escape leaves it. While it is on, the menu bar’s button is pressed (CONTEXT_INSPECTING) and the pointer is a crosshair (CURSOR), but over the inspect dialog. Not Ctrl+Shift+C: browsers take it for their own element picker before a web build sees it. It works in every window, a detached panel’s included. The picking itself is egui_pop_core::inspect’s; this side adds the window, the zone, block or panel and the plugin owning it, the theme, its kit and density, and what the application adds through DevtoolsPlugin::describe (the gallery: its page and story).

Copy puts a readable text block on the clipboard (the plain-text fallback) with its JSON form (application/x-egui-pop.inspect+json), through the clipboard’s clipboard.copy step when its plugin is connected. Report… (when the application declares help.report, see crate::about) opens a new issue prefilled with the pick. The last pick is the inspect collector’s snapshot.

Structs§

Describe
What an application adds to a pick: rows of a name and a value (the gallery: its page and story).
Inspected
A pick with what the application knows of it.

Constants§

CMD_INSPECT
Enters or leaves the inspect mode.
CONTEXT_INSPECTING
The context key saying the mode is on (true or false): the command’s checked clause, which draws its menu bar button pressed.
CURSOR
The pointer over the window while the mode is on (not over the inspect dialog): a crosshair, as browsers’ element pickers.
ENDPOINT
The clipboard endpoint Copy takes the last pick from.
FORMAT
The JSON form of a pick on the clipboard.

Functions§

active
Whether the mode is on.
copy
Copies the last pick: through the clipboard’s clipboard.copy step when its plugin is connected, else as text to the system clipboard.
last
The last pick, with what the application knows of it.
start
Enters the mode (when the devtools setting is on).
stop
Leaves the mode.

Type Aliases§

DescribeFn
The function behind Describe.