A dock panel's OS window gets its keys alone, so an Escape pressed there with
nothing focused became that window's Cancel, which no app code reads: a command
started from a floated palette could not be cancelled. The end hook hands a Cancel
left in such a window (`WindowSpec::hands_on_cancel`) to the window it was opened
from, which reads it as its own in its next pass. A popup or a modal open in the
floated window keeps the Escape, and a modal that opened meanwhile drops it.
An unclaimed press surrendered the focus of a canvas declared with
host_canvas at the press (apply_press), and egui's click-away rule took
a focus the app itself had given the canvas at the release. The press
rule now keeps a declared canvas focused, and the begin hook takes the
focus on it off egui's rule, whoever gave it. A canvas the app no longer
declares follows egui's rule again.
The runtime keeps its surrender rule on the focus it gave an app's own widget
until no pointer button is down, so the release of the press that gave the
focus does not take it back. The record of the given focus ends once egui's
focus is elsewhere. Whether a widget is drawn is read from egui's widgets of
the running pass, for the given focus and for `host_canvas` findings alike.
Focus given to a canvas before `host_canvas` registers it follows the canvas's
keys.
A canvas drawn in a disabled `Ui` is a `canvas-without-widget` finding too;
the finding's text is made only when it is kept, and a fault is logged once.
A widget drawn with the bare Sense::DRAG or Sense::CLICK is not focusable, and
egui takes the focus from it when it is drawn, so Tab is lost there too. The
end hook reads the sense of the canvas's widget and names it in the finding.
Focus that Tab, F6 or a framework request gave an app's own egui widget
kept the runtime's surrender rule (Never) while the runtime's press rule
left that widget to egui, so a press elsewhere released it nowhere. The
end hook of the pass that drew the widget leaves the focus to egui's rule,
the app's `surrender_focus_on`; until then the press or click of the pass
that gave the focus does not take it back. The stop of an app's own widget
sets no Escape filter, so Escape releases it as egui does; the declared
canvas keeps its filter.
egui drops the focus of an id no interactive widget of the pass has, so Tab
lost the focus at such a canvas and started over at the first stop. The end
hook looks each declared canvas up among the pass's widgets and reports
`canvas-without-widget` when it is not there; debug builds log it once.
- ui-panels iconic trial: the two literal 0.5 tolerances are relations (`first` above the
gripped first icon; the rule `near` the middle of the room).
- ui-shell Column start page: the bottom page margin is `add_space` of the token, not
`allocate_space`.
- ui-widgets Tile: `PAPER` (a blank page, data) and `Tile::page`'s width and height (a
proportion in any one unit) are marked and listed as exceptions.
- docs/components-index.md regenerated (Link's `LinkLook::Plain`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The focus service takes egui's focus candidates of the pass (Memory::focus_candidates) at every
order-dependent registration and at the end hook: each widget no component made becomes a stop of
the app's own, where it was drawn among the framework's stops, a text stop for a TextEdit. Recorded
views and lazy children replay them with their transcripts.
A bare Tab is the framework's move unless an egui popup is open or the app's focused widget keeps
Tab by its egui key filter. Removed: focus::host_stop and the separate egui-Tab path for windows
without framework stops. The scrim absorber no longer takes key focus.
TabStripOutput reports the overflow button's rect and access node id while
some tabs do not fit. The dock group passes it on (DockGroupOutput::overflow,
through the memoized tab row so a replay moves it with the row), and the dock
area reports it beside the group's tabs as SourceKind::Overflow, named by the
group's first panel, so a host can give the button an automation id.
focus::host_stop registers an app's own egui widget as a focus stop
(Stop::host, as host_canvas does, without marking a document canvas), so a
window that has framework stops and the app's own widgets keeps one framework
Tab order holding both, in registration order.
A canvas keeps Tab only while it has the focus. With nothing focused a bare Tab
moves focus into the window or toggles the panels, even for a canvas that
keeps Tab, as the unfocused canvas's claims already never take Tab: the canvas
cannot trap keyboard navigation. The last assertion of
a_host_canvas_marks_the_window_and_tab_toggles_its_panels changes to this
rule: with nothing focused, the Tab toggles the panels instead of reaching the
canvas in egui. The unused Strip::canvas field goes with the old rule.
While an app's own egui widget or popup has the focus, a plain Enter stays in
egui's input for it and no window Submit comes of it, as with Tab and Escape.
The window's Submit was offered beside the press, so an app editor read one
Enter and an app that returns the window's Submit to egui read two; an app
TextEdit in a framework dialog also fired the dialog's default button. With
nothing focused the plain Enter stays the window's Submit and in egui's input.
A host body keeps its presses and its egui focus, so the group takes
no focus and DockAreaOutput::focused never names the panel clicked
into. BodyCx::pressed_within reports a primary press in the body's
rect on its layer whatever took it, sharing the press geometry with
surface_pressed, and the dock area reports the group's shown panel as
pressed.
Layout memory requests its discard pass from egui in its end hook, after the
app's UI, so Context::will_discard() read by host code during a pass that a
changed size runs again is still false. frame::will_rerun is true when egui
will discard the pass or when this pass asked layout memory for the frame's
discard pass and will get it. Hosts gate frame counts and settle counts on it.
The discard request stays in the end hook, so lazy runs and memoized replays
keep their records of the asking pass.
A file drop on a floating OS window reports the shown panel of the group under
the drop, from the drop session's pointer; the first group's on the title row or
when no pointer is known. ui-docking.md covers documents, swatches, raise and
WindowFiles.
Conflicts resolved so that next's changes and this branch's fixes both hold:
- keys: next's unfocused-canvas state claims join the key stage's framework claims; the canvas's
declared claims stay the host's (egui keeps their presses).
- overlay: the app's own modal (`FrameInput::app_modal`) joins next's modal stack at the frame it
first showed in.
- docking: the tab-pick trial moves key focus into the group with Tab, since a click on a dock tab
leaves key focus where it is.
FrameInput::window_input(WindowInput::Dropped) drops a hosted window's own
events and OS files in the input filter, before injected input joins, so an
agent-driven session's floated panels take only injected input. eframe runs
raw_input_hook for the main window only; the root's input stays the host's.
The test kit's Windows takes the policy; trials cover the drop and a macOS
Control+Click in a hosted window.
A filled neutral tile with no edge at rest takes the hover fill and the control edge under the pointer and the
pressed fill with the accent edge under the press; disabled, it dims as a solid one does. surface.control follows
state.hover unless pinned, so only the VectorCraft Modern themes, which pin production's button fills, change.
An app sets PushButtonLook::Filled at its root to make it the default of its push and split buttons; a ribbon
keeps its flat look and toggles keep the outline.
- QuitCommand::Quit (window.quit, Cmd+Q) replaces egui's quit shortcut, which the runtime clears at
install. The runtime runs it from any source through the root window's close path, so the app's
close decision asks about unsaved work. Its default yields to another command bound to the chord,
as the window shortcuts' defaults do (library::yields_default).
- HostBuilder::icon_png gives the app's icon once, beside its AppInfo; the update dialogs show it in
their head instead of the name's initial.
- Docs: craft-framework.md §2.2 Quit and Zoom keys rows, craft-host README.
A dock panel's egui code (PanelSpec::host_body) ran in the framework's
measuring runs too, so egui saw its widgets twice per pass at two rects
and painted ID-clash warnings. HostStyle::show runs it in the real run
only; a measuring run takes the size its last real run took.
FrameInput::app_modal names the window where the app's own egui code
shows a modal; the app's other windows (native floats among them) are
blocked through the same path as under a framework app-modal layer.
- A pointer press on a dock's panel tab (a click, a drag's press, the tab menu's secondary press)
leaves key focus where it was (`TabStrip::keeps_focus`), so an app's own shortcuts keep working
after a tab drag or the tab menu; Tab still reaches the tabs. A press on a `host_body` panel's
body is the app's and no longer focuses the group's tabs.
- Floating windows leave the overlay's `set_layer_order` list and stack in egui's own area order,
which raises a layer when it first shows and when it is pressed: an app's own egui dialog opened
over a floating panel shows above it.
- A `host_body` panel's body is filled with the host style's panel fill (`HostStyle::paint_panel`)
and gets no body padding, as it showed outside the dock.
- Trials: tab presses keep focus, float order against an app window, the host body's fill and room,
and an unbound F6 reaching a hosted canvas (alone, and in a dock of host_body panels).
- The key target's declared claims count for Alt-code entry and the key stage: with nothing
focused the window's document canvas (`host_canvas`) stands for the focused component, so an
app's Alt+digit shortcut it claims reaches it on Windows and Linux. A host stop's claimed press
stays in egui's input, where the app reads it, focused or as the unfocused key target.
- `RootEnv::ctrl_wheel_pinch` (default on) makes the fold of a fractional Ctrl+wheel into
`Event::Zoom` a host choice: off, the wheel event stays as sent, for an app whose Ctrl+wheel
does something else or zooms at its own rate.
- `PanelSpec::host_body` marks a panel whose body is the app's own egui code: the dock hands its
body, footer, header, rail footer and group view the style of the `Ui` the dock was shown in
(`HostStyle`), while framework bodies keep the group's spacing.
Conflicts resolved (upstream's design and defaults win; the port's opt-ins stay):
- ui-contract fonts: upstream's served-faces provider, catalog job queue and byte budget;
the port's FaceBytes::chain (Word subset siblings, F-8) re-done on the provider: a served
face lists its served chain faces before the interface faces, a sibling landing after its
owner remakes egui's fonts once, drawing a face marks its chain drawn. The port's chain
trial moves onto upstream's rig, plus a late-sibling trial.
- text editor HostCx follows FacesCx's job-based document_face and document_face_bytes.
- ui-widgets Swatch: upstream's SwatchFill (split, spectrum, image, empty) with the port's
Swatch::optional / SwatchFace::optional (new SwatchFill::None, the "no colour" diagonal)
and Swatch::icon (glyph on the empty well) on top; both word sets kept.
- draw PaintBar: upstream's MixerLoad fill.
- font-manager: upstream's sample band; host rows (port) use it too.
- ui-panels / ui-patterns dock grips: upstream's drag_origin and named slack.
- platform clipboard tests: both trials kept.
Co-Authored-By: Claude <noreply@anthropic.com>
The dev-dependency rule covered egui alone; epaint_default_fonts slipped past
it. It now checks the egui crates every framework crate builds on (egui, epaint,
epaint_default_fonts, emath, ecolor): a feature a dev-dependency line asks of one
must also be asked by a normal line, feature-root's included.