Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Hosts and components: what can live where

A host is a place egui-pop draws content in (a docked panel, a floating palette, a dialog). A component is something drawn there (the image viewport, the tree, the terminal). Each cell answers: can this component be mounted in this host, and if not, why not?

This page is generated from the mount contract (ADR 0013): each component declares what it needs (Mountable), each host what it offers (HostOffer), and each cell is the verdict of egui_pop::model::mount::check on the pair. cargo xtask hosts writes it, and a test fails when the committed page is stale. In an application, AppHandle::where_can gives the same verdicts and the debug bridge’s mounts collector shows them to agents.

How to read a cell

CellStatusMeaning
yesfitsNothing in the way; mounted by the mount tests.
if c…fits under conditionsFits, under every condition named (see Conditions).
D…does not fit, by designIt would break a named rule on purpose; the rule says what to do instead.
E…does not fit, egui-pop limitegui-pop does not do it yet; an estimated cost is given.
U…does not fit, upstream limitegui, eframe or another dependency cannot do it; linked to upstream.md.
…*not triedFits by the declarations, but no headless test can mount it there (see Notes): a gap, not a refusal.

“Impossible” is only ever a D or a U. An E is work not done yet.

The hosts

ColumnHostWhere in the codeWhat it offers
PDocked panelCtx::panel, PanelSpec, workbenchA whole rect; resized by the user; shared focus; persistent; main window; the keymap reaches it; keeps its place; gives a Ui, an AppHandle, a focus scope, a fault boundary; wide gamut; may hide its content.
FFloating palettepalettesA bounded width, the content’s height; resized by the user; the keyboard once clicked into; persistent; main window; the keymap reaches it; keeps its place, size; gives a Ui, an AppHandle, a focus scope, a fault boundary; sRGB; may hide its content.
WAuxiliary windowworkbench::windows, show_viewport_immediateA whole rect; resized by the user; shared focus; persistent; an auxiliary window; the keymap reaches it; keeps its place, size; gives a Ui, an AppHandle, a focus scope, a fault boundary; sRGB; system cursors only.
DDialog (four kinds)dialogs: Confirm, Form, Choose, InfoA bounded width, the content’s height; not resizable; modal: the whole keyboard; owns Enter, Escape; closed by an answer, Escape; transient; main window; the keymap reaches it; keeps its place; gives a Ui; descriptor fields only; sRGB.
CCustom dialogdialogs: Dialog::Custom, Dialogs::open_customA size of its own declaration; not resizable; modal: the whole keyboard; owns Enter, Escape (given to a content claiming them); closed by an answer, Escape; transient; main window; the keymap reaches it; keeps its place; gives a Ui, an AppHandle, a focus scope, a fault boundary; sRGB.
MRaw modaloverlay::show with Kind::ModalA bounded width, the content’s height; not resizable; modal: the whole keyboard; owns Escape; closed by Escape; transient; main window; the keymap reaches it; gives a Ui, an AppHandle, a fault boundary; sRGB.
OPopoveroverlay::show with Kind::Popover, egui::PopupA bounded width, the content’s height; not resizable; shared focus; owns Escape; closed by Escape, a click outside; transient; main window; the keymap reaches it; gives a Ui, an AppHandle; sRGB.
LLine zonezones: TOP_BAR, TOP_BAR_END, TITLE_BAR, ACTIVITY_BAROne row; not resizable; shared focus; persistent; main window; the keymap reaches it; gives a Ui, an AppHandle, a focus scope, a fault boundary; sRGB.
SStatus barzones: STATUS_BAR, stripsOne row; not resizable; shared focus; persistent; main window; the keymap reaches it; gives a Ui, an AppHandle, a focus scope, a fault boundary; sRGB.
TSettings pageCtx::settings_page, SettingsPageA bounded width, the content’s height; not resizable; modal: the whole keyboard; owns Escape; closed by Escape; transient; main window; the keymap reaches it; gives a Ui, an AppHandle, a focus scope, a fault boundary; sRGB; may hide its content.
VViewport overlayegui_pop_viewport::overlayno Ui: data only; no keyboard; persistent; its panel’s window; sRGB.
GGallery storyCtx::story, StoryA whole rect; resized by the user; shared focus; persistent; main window; the keymap reaches it; gives a Ui, an AppHandle, a focus scope, a fault boundary; wide gamut.

Hosts that take no component at all, by design, and so have no column:

  • Toast (toasts): text, a level, actions and a job’s progress; data only. A component goes in the jobs centre or a panel the toast’s action opens.
  • Menus and the command palette: items, not content.
  • A palette outside the main window (a native utility window): not built, and blocked upstream, U3.

The components

RowCrateWhat it needs
Image viewportegui-pop-viewportKeys while hovered, claims Space, Escape; drags, wheel, bitmap cursors; workers, bounded while hidden, kept under a modal; wide gamut wanted; fills; role image.
Navigatoregui-pop-viewportKeys when focused; drags, wheel; at least 120 by 80, at most 320 by 214, aspect 1.5; role image.
Node graphegui-pop-viewportKeys when focused, claims Escape, Space; keymap bindings; drags, wheel; fills; holds a session; role group.
Curvesegui-pop-viewportKeys when focused, claims Escape; drags; at least 120 by 120, at most 320 by 320, aspect 1; role image.
Wheelsegui-pop-viewportKeys when focused, claims Escape; drags; at least 48 by 48, 160 by 160 preferred, aspect 1; role slider.
Histogramegui-pop-viewportKeys when focused, claims Escape; drags; at least 120 by 40, at most 600 by 200; a preview mode; role image.
Thumbnailegui-pop-viewportNo keyboard; at least 16 by 16, 96 by 72 preferred; a preview mode; role image.
Library gridegui-pop-viewsKeys when focused, claims Space; keymap bindings; drags, wheel; workers, bounded while hidden; fills; role grid.
Filmstripegui-pop-viewsKeys when focused, claims Space; keymap bindings; drags, wheel; workers, bounded while hidden; at least 120 by 120, fills; role grid.
Compare viewegui-pop-viewsNo keyboard; drags, wheel; workers, bounded while hidden; at least 0 by 80, fills; role image.
Treeegui-pop-viewsKeys when focused, claims Enter, Space; drags; workers, bounded while hidden; fills; popups of its own; role tree.
Table, listegui-pop-viewsKeys when focused, claims Enter, Space; drags; fills; popups of its own; role grid.
Text editoregui-pop-editorsKeys when focused, claims Enter, Tab, Escape; keymap surface editor; drags; fills; holds a session; role text.
Code editoregui-pop-editorsKeys when focused, claims Enter, Tab, Escape; keymap surface editor; drags; workers, bounded while hidden; fills; holds a session; popups of its own; role text.
Terminalegui-pop-editorsevery key while focused, claims Enter, Tab, Escape; keymap surface terminal; drags; workers, bounded while hidden; at least 32 by 32, fills; holds a session; role terminal.
Slidersegui-pop-coreKeys when focused, claims Enter, Escape; drags; at least 120 by 20; a descriptor field; role slider.
Formsegui-pop-coreKeys when focused, claims Enter; at least 200 by 48; popups of its own; a descriptor field; role form.
Progressegui-pop-coreNo keyboard; at least 40 by 4, 200 by 8 preferred; a preview mode; role progressbar.
Jobs centreegui-pop-apiKeys when focused; keymap bindings; at least 240 by 120, fills; one per application; an AppHandle; role list.
Theme editoregui-pop-apiKeys when focused; keymap bindings; at least 520 by 320, fills; one per application; an AppHandle; holds a session; popups of its own; role form.
Tipsegui-pop-apiKeys when focused; at least 240 by 80; an AppHandle; role group.

The matrix

ComponentPFWDCMOLSTVG
Image viewportyesif c1 c3if c3*D6if c3 c9if c1 c3 c4if c1 c3 c4D1D1if c1 c3 c4D2yes
Navigatoryesyesyes*D6yesyesyesD1D1yesD2yes
Node graphyesif c1yes*D6if c9 c10if c1 c4 c10D3D1D1if c1 c4 c10D2yes
Curvesyesyesyes*D6if c9if c4if c4D1D1if c4D2yes
Wheelsyesyesyes*D6if c9if c4if c4D1D1if c4D2yes
Histogramyesyesyes*D6if c9if c4if c4D1D1if c4D2yes
Thumbnailyesyesyes*D6yesyesyesif c6if c6yesD2yes
Library gridyesif c1yes*D6yesif c1if c1D1D1if c1D2yes
Filmstripyesif c1yes*D6yesif c1if c1D1D1if c1D2yes
Compare viewyesif c1yes*D6yesif c1if c1D1D1if c1D2yes
Treeyesif c1yes*D6if c5 c9if c1 c5if c1 c5D1D1if c1 c5D2yes
Table, listyesif c1yes*D6if c5 c9if c1 c5if c1 c5D1D1if c1 c5D2yes
Text editoryesif c1yes*D6if c9 c10if c1 c4 c10D3D1D1if c1 c4 c10D2yes
Code editoryesif c1yes*D6if c5 c9 c10if c1 c4 c5 c10D3D1D1if c1 c4 c5 c10D2yes
Terminalyesif c1yes*D6if c9 c10if c1 c4 c10D3D1D1if c1 c4 c10D2yes
Slidersyesyesyes*if c4 c8if c9if c4if c4if c6if c6if c4D2yes
Formsyesyesyes*if c4 c5 c8if c5 c9if c5if c5D1D1if c5D2yes
Progressyesyesyes*D6yesyesyesif c6if c6yesD2yes
Jobs centreif c7if c1 c7if c7*D6if c7if c1 c7if c1 c7D1D1if c1 c7D2if c7
Theme editorif c7if c1 c7if c7*D6if c5 c7 c10if c1 c5 c7 c10D3D1D1if c1 c5 c7 c10D2if c7
Tipsyesyesyes*D6yesyesyesD1D1yesD2yes

Columns: P docked panel, F floating palette, W auxiliary window, D dialog (four kinds), C custom dialog, M raw modal, O popover, L line zone, S status bar, T settings page, V viewport overlay, G gallery story.

Counts

StatusCells
fits (yes)84
fits under conditions (if)87
does not fit, by design (D1 36, D2 21, D3 5, D6 19)81
does not fit, egui-pop limit0
does not fit, upstream0
total (21 components by 12 hosts)252

Of the cells that fit, 21 are not tried (*): their host cannot be mounted headless.

Rules

Each rule looks at one need against one offer. The worst verdict wins, and every condition is kept.

RuleNameWhat it compares
R1sizeThe size needed (minimum, fills) against the room the host gives (a rect, a given size, the content’s height, one row).
R2keyboardThe keyboard needed and the keys claimed against the host’s focus policy and the keys it owns; bindings of the keymap against the host’s keymap reach.
R3sessions and lifetimeA session (unsaved work, a running program) or popups of the component’s own against a transient host and what dismisses it.
R4questionsA question to answer against a host that is not modal.
R5displayWide gamut wanted or required, and bitmap cursors, against what the host’s window can show.
R6instancesOne state per application against a host that may show it beside another mount.
R7applicationA component needing the application against a host giving none.
R8a UiAny component against a host that gives no Ui.
R9workersWorkers drained when the component is drawn against a host that can stop drawing it.
R10view stateA view-state key against a host that keeps no view values and is outside the projection.
R11dialog contentFree content against a dialog of the four kinds, which takes value-descriptor fields only.

Conditions

CodeCondition
c1Content-sized host. The palette, the raw modal, the popover and the dialogs of the four kinds size themselves from their content: a component that fills the space it is given must be given an explicit size (.size(), a ScrollArea with a maximum height) or it grows to the window. A palette keeps its content’s size until the user resizes it.
c2No keymap in this window. The host’s window is not reached by the key dispatcher, so bindings of the keymap (global and surface ones: an editor’s find and save, the terminal’s clear, the library’s commands) do not fire while it has the keyboard. Keys a widget reads itself (arrows, zoom keys, typing) work. No host of egui-pop has this condition since E3 closed; a host an application declares may.
c3sRGB and system cursors. Wide gamut and HDR fall back to sRGB in this host, with the reason reported (U2); bitmap tool cursors fall back to their system cursor (U1).
c4The host takes its keys first. The host owns keys the component claims: Escape closes a modal or a popover before any component sees it, Enter accepts a dialog (ADR 0007’s Escape order). A component’s own Escape (a graph’s deselect, a terminal program’s Escape) never arrives; Shift+Escape still leaves the terminal.
c5Popups inside a transient host. The component opens egui areas of its own (completion lists, context menus, drop-downs) outside egui-pop’s overlay stack; whether a click in them counts as a click outside the host (which closes a popover) is not checked.
c6One row. A compact size given by the application: a slider at least 120 wide, a small thumbnail, a thin bar, within one row.
c7One state per application. The component draws a service’s state: two mounts (a panel and a popover) show the same jobs or the same draft, not two independent instances.
c8As a descriptor field only. In a dialog of the four kinds, the component exists only as a Form field made from a value descriptor (a slider from a float or int), not as a free widget; a Custom dialog takes it as it is.
c9Claims honoured by declaration. The host owns Enter and Escape, and gives them to a content that claims them: when the content claims Enter, Ctrl+Enter accepts; Escape goes first to a content that claims it and has something to cancel (a drag), then cancels.
c10A session per showing. The host is transient: shown again, the component starts a new session (a new program, an empty draft) unless the application keeps its state; closing it asks first or loses the session.
c11A queue while hidden. The host can stop drawing its content (a tab behind another, a palette hidden by Tab or rolled up) while the component’s workers keep delivering: their queue grows until it is drawn again (docs/threading.md, section 2.2). No component of egui-pop has it: each drains its queue off-draw or caps it (Mountable::bounded_workers); a component an application declares with workers() may.
c12View state not kept. The host keeps no view values and is outside the context stack’s projection: the component’s zoom, scroll or selection is not kept across places and restarts.

Reasons

By design

CodeRuleDo instead
D1Line hosts hold one row. The top bar, the caption, the activity bar and the status bar hold indicators and small controls; nothing there takes the keyboard for long or needs more than a row.An item in the line that opens a popover (the jobs centre’s status item) or focuses a panel (<panel>.focus).
D2Viewport overlays are data. Overlays on the image are shapes and handles in image coordinates, drawn by the viewport, their edits handed back as signals; there is no Ui to put a component in.A palette floating over the canvas (a navigator, a toolbox), or a heads-up host over the viewport (not built yet: decided for later).
D3Popovers are transient. A click outside or Escape closes them; an edit session (graph wiring, an editor with unsaved text, a running program, a theme draft) would end by accident (confirmed 2026-10-14).A panel, a palette, or a dialog that asks before closing.
D4Only a modal asks. Palettes are never modal (decided 2026-10-13), nor are panels and popovers: a question that must be answered before going on goes in a modal.A dialog.
D5One dialog at a time. Dialogs queue; a dialog does not open another over it.Draw the second choice inline in the dialog (as a form’s path field draws the in-app file picker).
D6The four dialog kinds take descriptors. Confirm, Form, Choose and Info are drawn from data: a form’s fields come from value descriptors, and no kind takes free content.A Custom dialog, which takes a body and keeps every dialog rule.

D4 and D5 constrain how a component is used rather than where it fits: no component of today asks a question of its own, and a dialog’s body draws a second choice inline.

egui-pop limits

CodeLimitEstimated cost
E1No free-content dialog (closed). Closed by Dialog::Custom (ADR 0013): a dialog with a body of its own, keeping the dialog rules.Done.
E2Palettes are not resizable (closed). Closed: a palette is resized by its right and bottom edges, between the palette.min-* and palette.max-* tokens, its size kept in the layout.Done.
E3No keymap in auxiliary windows (closed). Closed: the key dispatcher runs in each auxiliary window’s pass, in that window’s context (its focus chain, window naming its panel).Done.
E4Overlays live in the main window (closed). Closed: each window has its own overlay stack. A dialog, the command palette and a popup menu open over the window in use, a context menu over its widget, and the toasts show in the active window, each going to the main window when its window closes; while a modal is open every other window is blocked.Done.
E5No custom page in the settings window (closed). Closed by settings pages (Ctx::settings_page): a page a plugin draws itself in the settings window, placed in its tree, searched, with its reset (column T).Done.

Upstream limits

CodeLimitEntry
U1No custom cursor in immediate viewports. eframe shows no custom cursor in an immediate viewport (nor on the web): bitmap cursors fall back to system cursors there.upstream.md
U2Wide gamut in the main window only. Wide gamut goes through the image’s own Wayland surface, made from the main window’s handles: eframe gives no surface colour space and winit no colour management, so other windows draw sRGB.upstream.md
U3No owner window for egui viewports. A palette in a native utility window would float above every application.upstream.md

U1 and U2 degrade a cell (condition c3) rather than refuse it: no component of today requires wide gamut. One that did (a mastering view) would be refused outside the main window with U2.

Notes

  • Evidence. crates/egui-pop-gallery/tests/it/mounts.rs mounts every component’s gallery story in a mock host built from each offer that accepts it (the panel and the story by the gallery itself; the palette as an area of bounded width; the raw modal and the popover through the overlay stack; the custom dialog as a Dialog::Custom; the lines as one row), checks that nothing faults, that every interactive node has a name and that no diagnostic is raised, and checks that each refused mount is reported with its rule.
  • Workers. Tile, thumbnail, tree and terminal sources run on the application’s threads and keep running whatever the host, a modal included. Hidden, a component keeps bounded memory (c11 closed): the terminal and the jobs take their input off-draw; the viewport folds its source’s changes past source::NOTICES, the tree reloads past tree::EDITS_WAITING edits, the library keeps its INBOX latest requests and a console its CONSOLE_PENDING latest bytes, each counting what it dropped (docs/threading.md, section 2.2).
  • Accessibility in an auxiliary window is not tried: whether eframe gives an immediate viewport its own AccessKit tree has not been checked.
  • Tests across windows. egui_kittest draws an immediate viewport inside the main one. The keys, overlays and focus of auxiliary windows are tested with an immediate viewport renderer of the tests’ own (crates/egui-pop-api/tests/it/windows.rs), each window’s pass run with its own input, but no component is mounted in a real window there: the cells stay *.
  • Declarations can lie. A component declared as reading keys when focused that reads one globally (the node graph’s Space) shows a fit where it misbehaves; the mount tests are the guard.
  • A plugin that goes takes its components, its host offers and their mounts with it, and the mounts made while its code ran (ADR 0028): the mounts collector no longer lists them, and its plugin.disconnected event counts them (components, hosts, mounts). Connected again, it declares them again.