Autocomplete — a text field with a suggestion list that floats below
it — and SuggestionList, the floating list itself, which a code
editor’s caret completion shares.
Badge widget — the non-interactive member of the chip family: a small
pill typically anchored over another element (avatar, icon, row). Three
contents:
Banner — an inline, semantic alert strip. Unlike a super::toast::Toast
(transient, auto-expiring) a banner is a persistent in-flow message the
person resolves or dismisses: “You’re offline — changes will sync when you
reconnect”, “This file has unsaved changes”, “You’re in a private window”.
Reusable shell-grade screenshot, recording and arbitrary-region PiP selector.
Pixel readback stays in the compositor; this widget emits semantic intents.
Time-series charts — Chart (a full line/area plot with grid lines,
axis ticks and a legend) and Sparkline (a compact, chromeless
variant for inline trend cells).
The shared multi-line code-editing widget: a retained Widget that
puts real code editing — caret, selection (shift/drag, word-wise),
clipboard, undo/redo, IME, and a multiline a11y node — on the sameTextInput core every other text field
uses. On top of that it adds a gutter with line numbers and a
current-line highlight, syntax highlighting through a pluggable
Highlighter (the widget owns rendering/caret/selection, the app
owns the language tokenizer, and every colour comes from the OS
Theme), and soft-tab / indent handling.
Event-driven: each press latches a DragTarget so a drag continues
to track the cursor even after it leaves the widget rect (see
wants_pointer_capture). All visuals pull colours from theme tokens —
no literal palette values live in this file.
ContextMenu primitive — a right-click / long-press invoked list of
actions with optional separators. Standalone owners draw it in their
overlay pass. open_anchored opts into measured, viewport-bounded geometry;
legacy open_at callers retain their point placement and fixed rows.
A context menu over any element: right-click it, or press the Menu key
or Shift+F10 while focus is inside it, and the shared ContextMenu
opens with the commands its owner offers there and then.
Action-bound controls: the capability a widget provides when it owns an
ActionEmitter (a button, a checkbox, a custom
painted control), and the walks the host uses to reach every control in a
retained tree.
Reusable drag-to-reorder interaction model — the single source of
truth for live-reflow list reordering (weather’s saved cities today;
notes, playlists, contacts next).
EmptyState — the centered “there’s nothing here yet” placeholder that
almost every list-shaped app hand-rolls (Inbox with no mail, a feed with
no articles, a contacts book with no contacts, …). Before this widget the
pattern was copy-pasted as a Column of a big icon + a heading Text +
a dim subtitle + an optional call-to-action Button across the fleet.
File-picker dialog widget — used by the FileChooser xdg-portal backend
and any “open / save file from app menu” flow. Self-contained: it draws
and hit-tests itself, and the host just positions it as a modal overlay
and drains FilePicker::take_outcome.
Turning a flood of individual changes into a small number of things a
person can name, collapse and restore to. History surfaces show
groups, expanding to individual changes on demand.
Interactive image viewer with pan + zoom semantics, unlike the static
crate::widget::Image widget: scroll-wheel zoom, click-drag pan, and
a deterministic “fit to viewport” reset. Interaction state (zoom, pan,
drag origin) lives on the widget directly; CRDT reflection is out of scope.
ListRow: one row of a content list (a message, a contact, a request,
a file, a device), as a retained widget and as the ListRowFace
immediate painter with identical geometry.
Compact, theme-aware page preview for print queues, scan flows, file
inspectors, and document pickers. It communicates page shape and progress
without pretending to rasterize content that is not available.
PageSidebar — a shared, reorderable page/slide preview rail: the PDF
reader’s page rail and the presentation editor’s slide rail both drive
this one widget. It owns the list geometry, scroll, drag-to-reorder
(via DragController), a right-click menu, and an optional “add”
affordance, emitting PageSidebarEvents the host applies to its model.
PropertyList: labelled values (a contact’s details, a file’s metadata,
a certificate’s fields), as a retained widget and as the
PropertyListFace immediate painter with identical geometry.
A single editable line of text wrapping a local-mode TextInput, the
leaf cell of a block editor. The inner TextInput handles cursor
placement, selection, IME, copy/paste; RichTextLine adds:
Shared scrollbar interaction model — the single source of truth for
thumb geometry, thumb dragging, and track paging used by every
scroll-capable widget in the toolkit (Scrollable, DataTable,
DocumentViewport).
SearchField — the in-content filter: a field with a leading magnifier,
an editable TextInput, a trailing clear button and a reserved slot for
the match count.
Selection handles for a canvas: the frame around what is selected, its
resize handles at the corners and (once the frame is big enough on
screen, or always with SelectionHandles::with_edges) at the middle of
each edge, and its rotation handle above (unless
SelectionHandles::without_rotation: a crop, a text box, a clip),
drawn in your colour and hit-tested at a constant size on screen whatever
the zoom.
SlashMenu — block-type conversion popover triggered by / inside
a BlockEditor block: a
FilterMenu over every block kind the editor supports. Filtering
matches keywords as well as labels, so /h2 finds “Heading 2”.
How much a time grid (a calendar’s week, a schedule) shows of each item,
decided from the width of one day column and the theme’s type, so every
app that lays out days in columns follows one rule.
ToggleGroup — the segmented control. A strip of segments of which one
is chosen (or, before the person has chosen, none). Clicking a segment
chooses it and fires the on_change callback with the new index.
The toolbar: a measured strip of commands with a shared ContextMenu
for overflow, so every command stays reachable however narrow the window.
The extent cache is the sole source for intrinsic sizing, fitting and placement.
TransportFace: the previous, play/pause and next controls of a media
player, for a painted host that owns its hit-testing (a music bar, a
video’s controls).
TreeView — hierarchical list. One row per visible node, indented by
depth; branch nodes carry an expand/collapse glyph. Selection and focus
are tracked separately so arrow-key navigation can move the focus ring
without committing a selection until the user explicitly chooses.
One bounded page from a widget-owned remote root catalogue. next_cursor
is meaningful only while exhausted is false and is never interpreted by
a different widget or document revision.
A reusable action-intent queue for controls, including custom widgets.
Widgets call emit from any interaction path. Mounted shared
controls install independent host custody; custom producers should use
new_in with their actual owner domain. The private take
path remains only as explicitly unqualified migration compatibility.
Standard actions in declaration/focus order: secondaries, then primary.
Unspecified buttons use measured content sizing; explicit sizes remain manual.
Each wrapped line aligns to the trailing edge.
A command palette entry contributed by an app. Invoked with a mutable
CRDT handle and the app’s root ObjId so the command can mutate state
directly (matching quick-ui’s direct-mutation event model).
A breakpoint or pane width authored at 1× for a painted app’s
crate::widget::SidebarDrawer, resolved against the theme once when
the tree is built. NavShell reads its widths from the metrics and
applies the same rule to them.
What an immediate-mode Banner::paint shows: severity, leading icon,
title, optional message, up to two actions and whether it offers a
dismiss control.
The idle fade of an overlay scroll bar: fully visible for a moment after
scrolling, then fading out, unless something holds it (the pointer near
the bar, a drag, keyboard focus, reduced motion, an always-visible bar).
One timer for Scrollable and painted super::ScrollRegions, so every
bar in the system appears and fades alike.
An immediate-mode button: the Button look for a canvas host that owns
its own hit-testing. Built fluently:
ButtonFace::new(rect, "Save").role(ButtonRole::Primary).hovered(hit).
The retained Button tracks these itself; an immediate-mode caller
(a canvas app that owns its own hit-testing) passes what it knows —
usually just hovered.
A live shell/app surface that can be selected without first moving it
fully onto the physical display. virtual_rect is its place in Tilo’s
continuous desktop; visible_rect is the portion currently paintable on
this output.
Reflows its cards into equal, aligned columns by width. Each row is as
tall as its tallest card; cards share the row’s height so their footers
line up, and a row of short cards stays short.
Wraps the multiline TextInput core and enables its gutter +
syntax-highlight path, so all caret/selection/clipboard/undo/IME/a11y
behaviour is the one shared implementation.
A widget’s composition: the element tree it rebuilds at every layout and
lays out as the only child of its own node, plus the box it was given and
whether the owner asked for a rebuild. The owning widget forwards its tree
methods here.
Each bool below is an independent builder toggle (background, height
fill, padding, grow behaviour) set at construction time, not a state
machine with meaningful combinations to enumerate — a bitflags/enum
refactor would ripple across every one of Container’s call sites in
the crate for no behavioural gain.
A selectable row of a short list whose items carry real controls (a
layers panel with each layer’s thumbnail, name and switches; a list of
versions with a restore button): a crate::widget::Row of widgets
standing in the list row’s selection lift.
Payload published when a tab drag ends outside the row’s own band; the
shell hit-tests the release point against other strips and delivers it
via GroupRow::accept_cross_strip_drop or returns it to source.
The source group is already mutated (detached) by the time this is
published, matching what WindowGroup::detach_tab returns.
A modern chronological scrollbar face plus its ephemeral interaction
state. It intentionally has no document binding: scroll position and
density are per-user presentation preferences, not shared collection data.
An unguessable capability for one Files document-open route. A capability
minted anywhere else is insufficient: the shell compares it against the
exact capability installed in its current hosted Files inputs.
One Files-to-shell document-open request. The Files widget owns the
strong cell; the shell receives only a weak witness, so a detached widget
cannot leave an actionable request behind.
The composing viewport widget: wraps content (a child widget or a draw
closure), owns the zoom/pan input, and paints scrollbars on top. See the
module docs for when to prefer the standalone ViewportState kernel
instead.
An immediate-mode dropdown: the closed Dropdown look for a painted
host (a camera’s controls, a reader’s settings) that owns its own
hit-testing. Pair it with an option crate::widget::Popover
(Popover::new().with_items(..), opened with
open_at(face.field_rect(theme), Some(selected))) for the list.
The document as a host lends it to one pass that may change it: read
freely, changed only through a typed action the action host applies (a
resource’s dispatcher applies it), so every change is an action that is
attributed, recorded in history and undone like any other.
Direct CRDT mutation is rejected at the widget boundary:
One visible label and what it labels: a standard control (which takes
the label as its accessible name, so it is read once), a custom element,
or nothing for a control row. Help copy reads under the label while the
label stands beside the control, and under the control once stacked;
validation copy always stays with the control.
Content with a filter: a SearchField::filter in a band above the
content, narrowing the first Filterable inside it. Ctrl+F (⌘F)
focuses the field. A navigation shell’s filter slot is the same field
wired with sync_filter.
A form under its title, on a page: the title in LargeTitle (or none,
FormPage::untitled) with an optional header action, an optional
description, then the form, on the readable column aligned to the
leading edge, scrolling vertically, with optional pinned actions.
with_max_content_width(None) resets only the readable-width override.
Fraction thresholds (inclusive lower bounds) at which a gauge switches
from success → warning → danger. The default mirrors the dashboard
convention: >= 0.85 danger, >= 0.6 warning, else success.
Domain-free canvas. Supplied controls retain their framework action bindings.
The canvas paints only connections; applications own typed graph resources.
Persistable shape of one live window group after a same-strip tab move.
Tile content remains owned by the shell’s WorkspaceTree; the UI only
reports identities and presentation state, avoiding a second copy of app
data at the widget boundary.
An author that acted for someone: an agent’s change is the agent’s, on
behalf of its person, in every history (an app’s, the Files history, and
what the history actions return).
Not crypto material — just enough metadata to render a per-author
colour dot, display name, and a short identity hash for
disambiguation when two authors share a name.
Opaque: only ever compared for equality (revert/restore callbacks
pass it back to the caller). The caller picks the byte layout —
UUID-v4 today, a content hash later.
Empty fields are “match everything” so a freshly-constructed filter
behaves like no filter at all. The chrome owns the filter (not the
widget) so the host can persist it across remounts, e.g. a workspace
switch, without poking at widget internals.
The window’s History control in a painted header row: what the host
offered, the pointer’s hover over it, and a press waiting to go through
the History door. Modelled on crate::search::SearchOpener: return
Self::take from ActionControls::take_control_invocation.
Shared vector controller/Joy-Con silhouette used in device pickers and
shortcut help. It intentionally uses theme strokes instead of bundled
vendor artwork, so it stays crisp at every scale and in high contrast.
Private, process-local physical press state shared across page recomposition.
It contains no entered text or logical input history and never edits a document.
One logical line’s highlight result: ordered, non-overlapping Spans
(gaps render in the default text colour) plus the HlState the next
line begins with.
Immediate-mode list row. Build one per row per frame, measure it for
its height, then paint it into the rect you laid out: the row’s outer
rect, the list’s content edge grown by row_bleed on both sides.
A manual region whose children keep their standard rendering and interaction.
The policy measures children, places every child, and returns its desired size.
It can run repeatedly before painting and must not change child topology.
Rectangles are relative to this region, represented by Taffy’s logical f32.
Safe child-indexed measurement/placement services supplied by the host.
Measurements solve current retained topology; they never apply geometry or
rebuild widgets. Actual placement participates in the normal host settlement.
Explicit invalidation for inputs captured by a retained Manual policy.
After changing an input, call Self::invalidate and schedule a normal
host layout frame. This handle does not schedule a window redraw itself.
A button that opens a menu anchored to its own rect
(crate::widget::Button::with_menu): a header’s More button, a
toolbar’s sort menu. The menu opens under the button, lines up with
whichever of its edges keeps it in the window, and flips above near the
bottom; Enter, Space or a click opens it, and the button reads as
expanded while it is open.
A modal dialog: a title, any content widget, and up to three footer
actions, over a scrim that covers the window. Generic over the content
type so callers pass any Widget without boxing.
The immediate-mode sheet for a painted host that keeps its own state (a
question with three answers, a confirmation over a canvas): it lays the
sheet out, paints it with hover, press and keyboard focus on its
actions, keeps the layout of its last paint for hit-testing, and turns
input into a SheetResponse. The host paints only its body.
Immediate-mode number stepper: − value +, the face of a
NumberInput. Inline (the default) it is the toolbar stepper of
NumberInput::compact, bare steppers either side of the value;
Self::framed gives the secondary steppers of the framed control,
whose value the host’s field draws.
The head of a detail view: an avatar or an icon, the object’s name in
Title and one Caption line under it, rhythm.tight apart, on the
content edge (“Ada Lovelace / [email protected]”, a password’s site).
A page of sections: optional head items (a summary, a filter), then
sections spaced rhythm.group apart, on a readable column aligned to
the leading edge of the column it fills, scrolling vertically. It has
no title of its own: the shell’s header titles the page. Actions that
must stay reachable while it scrolls are pinned under it with
Page::with_pinned_actions.
The pressable targets of a widget that paints its own content (a
calculator’s keys, a map’s markers, a timeline’s clips): the same hover,
press, focus and activation the retained controls have, for rects the
host lays out itself.
One remote participant’s live presence (caret/selection), published by a
multi-participant widget under that participant’s identity. Same key and
payload shape as the local window’s own presence (Writer: wp_block key,
byte offsets into the caret block).
A button that opens a popover anchored to its own rect
(crate::widget::Button::with_popover): a filter’s options, a share
sheet’s details. A click, Enter or Space opens it and closes it again;
the button reads as expanded while it is open.
The body of a prompt popover (Popover::prompt): a caption, one
field and a hint under it. Enter submits what was typed; Escape closes
the popover without it.
A label column shared by several property lists, so their values line
up (the lists of one Section share one on
their own). Clone the handle into each list with
PropertyList::shared_column.
A read-only value as a control: the value a Field
shows where it cannot be edited (an account id, a generated key), in
primary ink with its kind’s text treatment and an optional trailing copy
action. Unbreakable kinds are elided before the action.
Holds the source bytes plus the cached encoded matrix. Re-encodes when
the payload changes via set_payload — the pairing-channel screen
calls it every few seconds as the broker rotates the nonce.
Optional on HistoryEntry — when present, the widget renders the
row with the struck-through summary, suppresses the [Revert] chip,
and exposes the redactor + reason on hover.
The GroupRow constructs one per inter-group gap (N-1 handles for N
groups) and refreshes the handle’s (left, right) rect snapshot each
layout pass. Width updates flow back through callbacks the row
supplies, keeping the widget free of row/group-specific knowledge.
A fixed-capacity rolling window of samples — the store behind a live,
streaming chart or sparkline. Once full, every push drops
the oldest sample, so as_slice always reads oldest →
newest and can be handed straight to Series or Sparkline::paint.
A row’s selection with its neighbours’, for a delegate that paints its
own selection: a run of selected rows is one lift
(crate::chrome::RowJoin), and a separator hides beside a selected
row.
The results overlay. Populate it with set_groups each
time the query changes, drive selection with the keyboard or pointer, and
drain activations with take_activated.
An immediate-mode section header for a painted host, with the retained
SectionHeader’s geometry: the title on the content edge, the count
after it, the action’s label on the trailing edge, one fixed height.
The retained control and painted strips share one touch recognizer.
Only a completed single-finger gesture chooses; cancellation, a second
finger, a removed strip or an externally changed selection refuses it.
One labelled data series. data is sampled left-to-right across the
plot; color is the line/area tint; legend is the label shown in the
chart’s legend strip (empty string = omit from the legend).
Compact, chromeless trend line — no axis, grid, title or legend. Just
the area fill + line, sized to fill its rect. Drop one into a table cell
or a stat card to show a recent trend.
The divider between two panes: hit-testing, hover, dragging, keyboard
steps, painting and its accessible separator node. ResizableSplit
keeps one; a host that paints its panes itself (a query editor over its
results, a source beside its preview) keeps one too, sets its rect each
layout and lays its panes out in SplitHandle::pane_rects.
The share of a two-pane split the first pane takes, clamped to bounds
so neither pane collapses. One model for ResizableSplit and for
painted hosts (SplitHandle).
Children painted on top of one another, each position: Absolute and
anchored at the stack’s top-left. There is deliberately no alignment
option: a child that wants a corner or the centre positions itself (a
Column/Row with its own insets and justify, or a Container with
with_centered_max_width), so the stack stays a pure z-order primitive
and the layer’s geometry is owned by the layer. If a caller needs the
stack itself to anchor, add an opt-in that maps to inset on the child
node rather than changing this default.
A set of stat tiles that reflows by width: all in one row when they fit,
then half per row (a 2×2 for four), then one per row. Tiles are separated
by space, never boxed.
A non-interactive status: a RowStatus dot and a Caption sentence on
the content edge (“Engine running”, “3 containers stopped”), for a list’s
footer or a detail’s state.
A selected-text command requested from a field’s context menu. The host can
execute this asynchronously (translate, rewrite, explain, grammar review)
without putting model or network work in the widget’s input path.
Interaction state for the immediate-mode toggle face; the retained
Toggle tracks these itself. A canvas app doing its own hit-testing
usually only knows hovered.
One controller owned by crate::app::App — not one tooltip widget per
control — is what makes tooltips work for every widget exposing
Widget::tooltip with zero per-app
wiring, and guarantees at most one chip on screen. Timing is wall-clock
through an injected now: Instant, so it’s unit-testable.
One annotation along a scroll track: where a search hit, a change or a
diagnostic sits in the content, painted as a short mark across the
track so the person sees where to scroll.
A compact action shown at the trailing edge of the hovered row (a “new
child” plus, a “more” ellipsis). Assistive technology sees every row’s
actions as buttons named "{accessible_name} {row label}".
Per-row presentation painted by the tree itself: a leading icon, a label
tone, trailing secondary text (a count, a type) and an accessible
description. Unlike TreeView::with_row_delegate nothing is mounted, so
decorations are recomputed every frame at no retained cost; disclosure,
selection, hover, the current row, focus and semantics stay owned by the
tree.
The pure zoom/pan state kernel. Owns the zoom factor and the scroll
offsets, derives the content↔screen transform, and reduces input events
(wheel, drag, arrow keys) into new state. Render-agnostic and cheap to
clone — a host stores one of these and drives it from its own event +
draw paths. See the module docs for the two usage shapes.
Turns fractional-detent scroll deltas into whole steps. No quiet-time
decay: it would stop slow scrolling from ever accumulating a whole
detent, and a stale sub-detent balance is harmless since it clears the
next time the user reverses direction.
A child shown only while a condition holds. While it does not, the
child is out of its container’s flow: no box, no gap around it, no
paint, no focus and no accessibility node. The condition is read on
every synchronization, so state that changes it (a LocalState, the
document) shows or hides the child on the next frame; the child keeps
its own state while hidden.
A typed, device-local request from app content to shell chrome. Keeping
this on the common app contract lets both in-process tiles and future IPC
adapters use one destination without an app reaching into compositor
state or pretending a status toast completed the navigation.
A semantic, UUID-addressed mutation emitted by the optional action bridge.
It intentionally contains no Automerge object ids, making it safe to replay
on another replica or use from apps with a different document layout.
What a history entry did, as the history and activity views mark,
filter and group it. Read from the change itself (its entry and what it
wrote), not from the transport that carried it.
Drained by the host via FilePicker::take_outcome once per frame;
None means “user hasn’t decided yet”. The terminal variants resolve
the host’s oneshot::Sender<Option<Vec<PathBuf>>>.
A lightweight icon descriptor usable before the full asset pipeline lands.
Glyph is a Nerd Font / unicode codepoint (existing approach in both
the iced file-explorer and quick-terminal). Named is a symbolic name for
future theme-driven icon resolution.
Mirrors the variants of the shell’s consumer-facing
quick_shell::shell::state::GrantScope plus an explicit
PromptChoice::Deny for the negative path. Held one-shot on
PermissionPrompt::pending_choice until the host drains it.
Commands for the compositor-owned recording session. Keeping controls in
the same semantic intent stream as Start makes shell chrome, shortcuts and
future remote controls share one state machine.
What a structural change a subtree reported (Widget::take_structure_change)
asks of its host. Ordered: a change joined with a larger one is the larger.
What a tab’s content is doing, marked in the tab’s leading slot in place
of its icon: loading, or making sound. A sound mark is a control: a
click on it is reported by TabBar::take_mark_click (the host mutes
or unmutes).
The syntactic category a run of source falls into. The editor never
hard-codes a colour for these — the theme’s
SyntaxPalette resolves each to a
concrete colour, so syntax tracks the active theme in light, dark and high
contrast.
State returned for a logical child slot. A model can publish its total
child count before all child ids are resident, allowing the tree to retain
correct scrollbar geometry while requesting only visible pages.
How a pointer press activates a row (see TreeView::on_activate).
Keyboard Enter and the accessibility Activate verb activate the
focused row in either mode.
A granular notification from an external tree model. Structural and slot
identity changes reconcile the expanded-order index once per batch; label
changes preserve geometry and query fresh data on the next frame.
A structural move of one row — what a drag does, as a single step for the
keyboard (Alt + arrows, or Tab / Shift+Tab with
TreeView::tab_indents) and for assistive technology, which sees one
button per move on every row.
A leading glyph for a decorated row. Colours are resolved by the caller
from the Theme handed to the decoration callback, so they track the
active theme.
Stable identity of either a resident model node or an unresolved child
slot. Selection remains node-only, while focus and viewport anchoring can
safely include placeholders.
Persisted width of a [crate::WindowGroup], as a fraction of the
strip’s usable width — a stored pixel count would mean a different
screen share on every monitor.
8 px each side → 16 px total, the smallest touch-friendly target
Fitts’-law-wise while still leaving room for the surrounding tab-bar
affordances (the bar’s drag-detach pill rect is also ~16 px tall).
This is the strip’s inter-group gap: the row declares no gap of its own
and lets the handle supply the whole footprint, so anything that walks
the strip’s canvas (GroupRow::usable_per_group) has to step by this
between adjacent groups.
The unscaled title-bar height: a floating window’s title bar is a Bar
(HIG §9.1/§9.6), so it takes metrics.bar_height — the same 40 px the
top bar, a toolbar and the shared Button use. Live geometry reads the
ui_scaled token from the theme the window was laid out with
(FloatingWindow::title_bar_height); this constant is for callers that
need the reference value in a const context.
A pure fraction has no floor — 15% of an 800px strip is 120px, too
narrow for a tab pill or scrollbar — so resolved width clamps up to
this (and back down to the strip width if that’s narrower still).
Trait every in-process app implements so the shell can host it inside a
TileContent::App. AppWidget: Widget means the shell always falls
through to the widget contract for layout, draw, and events.
A pluggable, per-line source tokenizer. The CodeEditor owns rendering,
caret, and selection; a Highlighter owns only the language lexing —
mapping a line of source to coloured Spans. SyntaxHighlighter
covers every language with a grammar; hand it (or a wrapper that adds
app-specific spans) to CodeEditor::with_highlighter.
Panic-free node construction, used by every build_layout implementation
in this module. TaffyTree::new_leaf and new_with_children are typed
-> TaffyResult<NodeId> for API generality, but taffy 0.10’s
implementation shows neither can return Err: new_leaf always
inserts and returns Ok, and new_with_children only fails for a child
NodeId belonging to a different tree, which never happens here since
every child passed in was just built in this same tree by the calls
immediately above each call site. Widget::build_layout returns a bare
NodeId (not a Result) across every implementor, so surfacing a
theoretical error here would mean threading a Result through the whole
toolkit for a branch that can’t be taken.
Source-agnostic hierarchy queried by stable id. Implementations may be
backed by a database, an async cache, a CRDT, or the owned TreeNode
adapter. The view asks only for expanded children and visible labels.
IDs must be unique, parent/child queries must be inverse, and the reachable
hierarchy must be acyclic.
Measure the leading column that fits every badge in badges, so a list
of rows with badges of different lengths keeps one title edge. Pass the
result to every row’s ListRowFace::leading_column. A Section
does this for the retained rows it holds.
Measure the host tree and settle allocation-dependent styles before calling
Widget::apply_layout. App and the headless runner use this same solver.
Manual hosts may use it with the maps from their current build_layout.
Raw Taffy layout still works for ordinary Grid tracks, but cannot resolve
CardGrid’s below-minimum single-column fallback without this adjustment.
A window’s application mark at any size: the app’s own artwork when it
has some, else the app-kind glyph its tab pill wears, scaled up from the
pill’s 14 px design size. Every surface that names a window by its app
(the tab pill, the window switcher, the overview) paints this one mark.
Used by both widgets so the wording stays uniform with every other
“time ago” label (crate::format::relative). Re-renders every frame,
so the label freshens naturally as now advances — no clock plumbing
needed.
The first letters of the first and the last word, upper-cased:
"Ada Lovelace" gives "AL", "Grace Brewster Hopper" gives "GH",
"ada" gives "A". Words without a letter are skipped, so "Tilo 4"
gives "T", never "T4".
Padding per side in CSS order (top, right, bottom, left). Negative values
are clamped to zero: taffy treats a negative inset as undefined and a
caller subtracting an overlap can otherwise drift below it.
Lay aspects (width / height) out in justified rows width wide: each
row is filled at target_height, then scaled so it spans the width
exactly. The last row keeps the target height instead of stretching,
capped at the height of the row above it.
Returns one rect per item, relative to the origin.
The window area content is seen through while it is being placed: the
viewport of the nearest enclosing scroll view (intersected with any
outer one), or None when nothing clips it. A collection reads it in
Widget::apply_layout to keep only the rows near what is shown laid
out; drawing culls against PresenceCtx::should_cull instead.
Tell the host that what a widget presents to the resource surface (the
resources, actions or semantic controls it declares) changed on input it
did not mark handled and without a document edit: hovering a menu row
that opens a nested menu. The host keeps the published resource tree
across bare pointer motion, so such a widget must call this or the tree
agents and assistive technology read would go stale. Clicks, keys and
handled events outside the explicit view-only scroll contract republish.
Paint one match highlight over rect, the span of the matched glyphs —
never a whole line or block. Every match is a wash of the searcher’s own
selection colour; the current one is stronger and outlined so it can be
told apart at a glance.
The keyboard focus ring around a pressable surface of radius: your
colour, 2 px, just outside the surface so it never covers its content.
Composites that own their focus (rows, cards) paint it themselves; a
painted surface with its own hit-testing calls this.
Paint the pending input method composition on a shaped line. Editors
supply the segment from their own projection (proportional formula text
or a fixed-width code line); its appearance follows the shared input role.
Whether a strip panned to scroll (whole pixels) can be drawn in canvas
coordinates: the retained canvas spans the content from no pan to the
furthest, plus pad past either end for the rubber band.
Every resource widget’s subtree publishes, as the host’s action
catalogue collects them. A host that embeds components under its own
root (a desktop surface) reads what its search offers through this.
Route event through a container’s children, first handler wins. A
child latching a drag gets it exclusively, so the drag survives the
cursor crossing a peer whose handler would otherwise claim it first; a
child holding an open modal owns the input the same way, so nothing
standing behind the sheet takes the press meant for it.
Derive native semantic-action provenance for actionable synthetic nodes in
a custom widget’s accessibility tree. This is the intended low-level escape
hatch: authors draw anything they want, provide stable semantic targets,
and opt those targets into the shared action route with one method call.
Carry field’s edits to the Filterable in content: call after
routing each event. The field shows the count the view reports, and its
“Search everywhere” escalation narrows to the view’s scope.
The app’s model, lent to a widget pass. The toolkit only passes it on to
children; the layer that owns the model reads it (the document runtime
through crate::doc::document). A host passes its model by reference
and it coerces: widget.sync(&mut doc, &root).
A draw callback supplied to DocumentViewport::from_draw. It receives
the content→screen Affine already composed with the host transform, so
the closure paints in content space and the viewport handles the
zoom + pan. The viewport rect is supplied for clipping decisions.
Opaque cross-line carry so multi-line constructs — block comments, fenced
code — survive from one line to the next. 0 is the document start; a
Highlighter owns the meaning of every other value. Line-local
highlighters ignore it and always return 0.
Colours spans of a field’s text from the theme: each (range, colour)
is a byte range of the text and the ink it takes (a reference in a
formula, in the colour of the cells it outlines).