focus::host_canvas registers the app's own egui widget as a canvas stop
through the stop registration a framework canvas uses, so a bare Tab
toggles that window's panels, and the canvas takes keys as its KeyUse says
while it has focus.
The focus end hook records whether egui holds a label text selection; while
it does, the key stage leaves the copy and cut events in egui's input, so
egui copies the selection. A focused framework editor still takes them.
The focus end hook records whether egui focus is on a widget no framework
component made, or an egui popup is open, while no framework press or drag
is captured. While that holds, the key stage leaves Tab, Shift+Tab, plain
Escape and egui's clipboard events in egui's input and routes nothing for
them.
The input hook leaves IME events in egui's input, and the end hook leaves
PlatformOutput.ime alone, unless a framework editor owns the IME or the
engine's reset is pending, so an app's own TextEdit or IME reader keeps
working under the runtime.
classify_press compares the press target with egui's focused widget, so a
host's own focused egui field keeps its focus when pressed, as a focused
framework stop already did.
A content-sized inline container shown in a `Stack` body given its width
passes that width on to its own body: its children measure and show as in
a given column, so a child that fills (a fill-width row, a list, a divider,
a picture, a side-labelled control) takes the width, and the container
takes what its content took. A content-sized mount (dialog, popover, menu),
a row, a grid or a held container stops it, so their bodies stay content
columns and measure as before.
The env carries the fact as `given_column`, set by a `Stack` body that is
not a content column and listed in the measure key's env facts. No pass,
record or measuring run is added.
Panel roots that set `fill_width()` only to span their pane now take the
default: CharacterControls, ParagraphControls, TimecodePanel,
ReorderableSections and BlendIfBar each hold a fill child, and where they
sit in a content column (BlendIfBar in the Layer Style page) the column
around them hugs them either way.
The fill_column trial shows the given column, nesting, a row stopping it,
the hug kept in a popover, and the measuring-run count against a
fill-width column.
shell::embed holds install (runtime plus fonts), before_input, logic and
before_ui, and CloseDecision. app::run's Driver calls the same hooks.
runtime::keys::with_window_intents is public: the host's read of the
window-level keys no component took. docs/craft-framework.md 2.2
describes the recipe and what install takes over. A trial drives its
own frame loop through the hooks alone.
The subset feature uses craft-font-subset's cut_face (HarfBuzz) in place of
skera, which leaves the workspace. CFF interface faces now cut correctly, so
Error::NotTrueType goes; a cut keeps its source's extension.
embed_permission reads the OS/2 fsType usage permission (installable, editable,
preview and print, restricted) and the no-subsetting and bitmap-only bits, with
the precedence cadcraft's PDF export uses; allows_subset says whether an
exported file may carry a subset.
Moves font-preview-service's HarfBuzz subsetter into the framework as the one
font subsetter: harfbuzz-subset-sys builds the vendored HarfBuzz 15.0.0
subsetter and holds the safe wrappers, so unsafe stays in that crate (added to
design-lint's contract/unsafe-allow). craft-font-subset keeps the service's
API (subset, subset_renamed, encode_woff2, closure, codepoints) and tests, and
adds cut_face for build-time interface cuts. The facade gets the native-only
font-subset feature.
Component::DISABLED picks how a disabled instance looks: the style's Disabled
state (DisabledLook::States, the default for chrome controls) or its enabled
look at Opacity::DISABLED (DisabledLook::Faded). Step 13 fades the surface,
part layers, paint, faces and paint_over of a faded component; its children
and step 14 paint outside the fade and show their own disabled look. egui
fades a shape as it is added, so a settled region replays the faded paint.
Tile, RowThumb, Swatch, PointPicker, Navigator, PreviewPane, ColorStrip,
ColorArea, PaintChip, PagePicture, PagePictures, ReadingView and DrawPad
declare Faded. The tile's disabled veil and the Disabled entries of the tile
and swatch looks go. Opacity::DISABLED is 0.5, the old disabled fade and the
old knob's disabled share.
A list row with a thumbnail is at least a standard control and the panel padding tall (the old
thumb_row_min), a centred notice reads about 38 body sizes wide, and the stage tokens become the story
stage (size.story), whose least width also sets the gallery's story columns. A gallery card is at
least a story and its padding wide, and its height guesses come from type and control roles.
size.thumb_row goes.
The angle dial is 1.75 standard control heights across with a dead zone of 0.1 (the old dial), the brush
ellipse two dials, the switch track twice its height (the old SWITCH_ASPECT), a progress bar two grooves
thick, and a thumb row thumb as the old levels thumb from the handle sides. size.dial, hit.dead_zone,
toggle, meter and marker go.
The slider thumb lengths were the only component tokens. A round knob is the control's glyph across
(StyleCx::glyph, shared with the icon-only button glyph); a tab knob is the control's icon side tall.
Themes choose the shape with shape.knob; Classic sets the tab, its old 10 x 16 thumb. TokenRef
collapses into ColorToken, and the theme file's components maps go.
Every build cl composes passes --timings (the newest 200 reports kept), and
every cl command appends one line to <target>/cl.log with its build and
test-run wall time, exit code and report, so a slow loop can be read from
data afterwards.
cl test builds with cargo test --no-run and runs each test binary itself, as
cargo would, through CL_RUNNER. A wrapper that limits how many test binaries
run at once then holds its limit only for the run; held for the build, it
queued every build behind the slowest one while the job pool already shares
the cores between builds.
A part that senses SETS_ON_PRESS runs its gesture through Cx::follow_press: the press begins it with the value under the pointer, shown in the press pass, a drag follows the pointer and the release commits. PointPicker (and ColorArea through it), ColorStrip, ColorWheel and ColorRamp use it in place of their own DragStart, Drag, Release and click handling; their drags take no modifiers, as before the port. ValueDrag::at gives an absolute drag's value at a point. The suite's slop case expects a one-value gesture within slop on such a part.
PartsCx::selectable_text declares a run as a selection part with a press-only
stop in no group; step 8b gives the focused one Select All and Copy; and
PaintUi::selectable_text shows it through the text widget with the run's own
galley, in the state's colours. Notice title and message, MetadataTable values
(ListRow::cell_selectable) and SelectableText use it. SelectableText loses its
Bind and Input::Text path and becomes a label whose value is its text. The
suite presses the focus registration's press-only stops when Tab reaches
nothing, instead of guessing from Input::Text and a read-only node.
The tour card is a popup that blocks and dims nothing and stays on an outside press; Backdrop::ScrimWithHole and the
cover layer's hole go with it. ViewportWindow blocks nothing until app_modal(backdrop). A modeless Dialog without a
footer ignores Escape; a modal one or one with a footer closes on it. PreferencesWindow drops modeless and takes the
shared app-modal path (blocked cursor, refused close).
Along a height its parent sizes from its content, a container that fills takes its content height, at most the
room it is offered. When the content is taller, the measuring run is taken back and the container is laid out as
given the room, so its list and the bar under it share it; a record of the content height lets later runs and kept
transcripts lay it out the same. room_height only offers a finite room inside a scroll: a gallery card is as tall as
its story's content, at most the view, as the old gallery's tiles were.
layout_memory::draft runs a measuring run whose hand-forwards can be taken back once its result is seen: records,
kept transcripts, the open transcript's items, leaves and inputs, and each contribution (Contribution::undo for
column widths, label control minimums and reads). steps::id::draft takes the Auto id ordinals back with it. The
shrinking row's least probe is a draft taken back that reads nothing from outside.
A scrolling collection that fills keeps to its measured height in the real run under a body sized from its content,
so a footer under it stays below its rows. The PlacesTree story keeps the old 380 pt box.
The stacking keys replace Alt+Up and Alt+Down as the reorder keys of every reorderable
collection and section stack, from one table in the key table. ] moves toward the front:
the start of a vertical order, later in a horizontal strip. The keys move the selection
as a block (the lead alone when it is not selected), with the tree rule for into_groups;
the single-row nudge helpers go. Alt+Down is Open everywhere.
A panel or group floated out of the dock opens at its docked width and at
the height its group measures at in a floating window's room, at most
size.float.height. Content that fills its body opens at that height.
- Proposal::Size measures a component as it is shown at a rect of that
size, with no share of the parent body's room.
- drag::amend lets a host change a drag's payload in the frame the drag
started. The dock area measures the dragged panel there and puts the
size on PanelDrag::source / GroupDrag::source. The Float command and a
tab torn out of the window measure where they run.
- DockGroupOutput::drag_started also reports tab drags.
- FloatSpace::size_of caps a panel's, group's or column's height at the
default float height. FloatSpace::record and its contents are gone.
The tracked macOS move sent StartMove a pass after the pointer passed the
click distance. winit hands performWindowDragWithEvent the event AppKit is
handling when the command runs, and in that later pass it is often not the
press, or none, so the drag took only some of the time.
- StartMove goes out in the band's Down pass where the OS tracks moves. The
move is reported (Begin, Update, Commit) once the system pointer has passed
the click distance; a click on the row moves and docks nothing.
- A window whose move the app runs keeps AppKit's own movable flag: the band
writes nothing for it and the end hook leaves it alone. AppKit moves such a
window for the hand-off and resizes it from its edges only while it is
movable.
An edit to the runtime's 65k lines spent 35-90 s in opt-level 1 codegen before
its test binary linked. The hot pipeline is generic and compiles in the
dependants anyway; theme, behavior and proof stay at opt-level 1.
cargo unifies features only over the packages a command selects, so a framework
crate's tests, a domain crate's tests, the gallery and the story renderer each
built their own copy of the framework and of wgpu. feature-root carries the
gallery's dependencies with every domain crate; cl selects it beside every
command's package and names the crate's own targets, so nothing of it builds.
The per-crate feature anchors go; cl check also checks a crate's bins.
Lazy::reveal asks its scroll body to glide until the child starts at the
view's start, run or not; the body follows the child's place on the motion
service's follow curve and a move of its own ends the glide. It replaces
Lazy::keep. The gallery's Overview passes the selected card's reveal in the
pass its cards follow the selection, in place of egui's scroll_to_rect,
which no scroll body reads.
A floating dock group in its own OS window now moves through a window move
gesture the app runs, which reports Begin, Update, Commit and Cancel like a
layer's move, so the dock marks the target under the pointer and docks the
whole window on release.
- macOS (Caps::OS_MOVES_TRACKED): the OS moves the window (StartMove), and the
app follows the system pointer, button and Cmd through SystemWindows, the
running platform's WindowSystem in craft-window. The hand-off ends when the
system reports the button up.
- X11 and Windows: the app moves the window with SetOuterPosition so the
pressed point stays under the pointer; Escape puts it back.
- A drag started by a container shown in its own OS window follows that
window's pointer, not its parent's.
- The runtime's end hook sets NSWindow.movable for every window; a window
whose move the app runs is never moved by AppKit from its band.
A tool window's frame comes from policy::tool_frame, whatever frame the main
window has: Inset with the traffic lights hidden on macOS, undecorated with no
caption buttons elsewhere. The installed decision applies to the other kinds.
DockConfig::native_windows is on by default. A float opens native where the
window host opens OS windows and reports their positions (ShellInfo::window_positions,
WindowHost::positions_reported: not on Wayland); a float never shown native opens
over its place in the main window. AppSpec::new takes the backend winit opens on.
The OS close of a native float is its Close action, taken when every panel in the
window may close; the group's open state belongs to the dock model. The gallery's
mock editor keeps its floats inside its preview.
- 3.1 to 3.4: the six library crates and the craft-ui facade, with a dependency
diagram, the crate table and the craft-win32 unsafe exception; taxonomy covers
every crate.
- 2.1 and 2.3: the gallery profile, cl and the story renderer.
- 3.6: layout memory's kept text; the scroll extent lives beside the offset.
- 3.7: the aiongg/egui pin, its 19 commits and what landing needs.
- 7.1: the step rule of closed list controls (Entry::stepped).
- 8.2: the gates that exist.
- 9.7 to 9.9: measured series size, landing rows without the pasted step rows,
the facade and API map in place of deprecated aliases, aliases as a question.
- Appendix B: entries for craft-behavior, each library crate and craft-win32;
where each concept lives.
The extent that bounds a body's offset lived in shown memory (`BodyView`),
which is evicted soon after a body stops showing, while the offset and its
anchor live in session memory (`ScrollState`). A body shown again after a
longer hide clamped its kept offset against an extent of 0 and came back
at the top. The extent now lives in `ScrollState` beside the offset, with
the same lifetime; `BodyView` keeps the view rect.
The anchor rule runs only in the run that lays the content out for the
view: a measure run places no Lazy children, so it would clear the anchor.
A Lazy child no pass showed yet takes the estimate its app gives
(`Lazy::new(key, estimate)`): that long along the axes its scroll area
scrolls, nothing across them, as a collection places rows it never built
by its item layout's estimate. The never-shown "always run" branch of
`lazy::decide` is gone. Gallery cards estimate their height from their
story rows.
A scroll position the framework holds is also named by content: the
first child at or after the view's start (`lazy::Anchor`, kept with the
offset in `ScrollState` and a collection's `Scrolled`). When extents
before it change, the offset follows the child and the pass runs again,
so the content in view does not move. Bound offsets keep no anchor.
Entries of the out-of-view store record their scroll area. A frame drops
only the entries an area that ran did not reach, so a hidden area (a tab
switched away) keeps its children's extents.
Trials: first show, shown again after a hide, content in view stays when
an estimate above it resolves, collection rows stay when a row above them
changes height; the gallery trial asserts each level first runs the cards
in view.