Package-level declarations
Types
What the scaffold tells its contextual-toolbar slot each frame: where the bar actually docks (post fit-correction), the drag listener the bar must use so the scaffold's drop-zone chrome tracks the handle, and whether a vertical side dock is currently available as a drag target (the View canComposeContextualToolbarFitVertically gate).
The window edge a NutrientFloatingToolbar is docked against.
Observable UI state of a NutrientFloatingToolbar: which edge it is docked against and whether a drag is in flight. Create it with rememberFloatingToolbarState so the docked edge survives configuration changes and process death.
The captured backdrop shared between the content that draws it and the chrome that samples it.
Defaults for NutrientContextualToolbar, one per parameter, so a host overrides one value and inherits the rest — the TopAppBarDefaults shape — plus the sizing constants the bar shares with NutrientToolbarScaffold (the Compose home of the View ToolbarCoordinatorLayout styleable defaults).
Receives drag gestures from the contextual toolbar's drag handle. The host owns the drop-zone math and actually repositions the bar (via ToolbarCoordinator.setContextualToolbarPosition) — during Phase 2 that host is the ToolbarCoordinatorLayout bridge, from Phase 4 the NutrientToolbarScaffold. Passing no listener hides the drag handle even when the state says the bar is draggable.
Receiver scope for NutrientContextualToolbar's slots: the bar's rendered state (its dock after the scaffold's fit-correction, its kind, its items) and a dispatch that stamps every action with that kind — the same routing the bar's own items use, so a host button in a slot is indistinguishable from an SDK one to ToolbarCoordinator.addActionListeners.
Defaults for NutrientMainToolbar, one per parameter, so a host overrides one value and inherits the rest — the TopAppBarDefaults shape. The Floating… values are the matching set for a toolbar composed as a pill over the document rather than docked to the window edge.
Defaults for NutrientStatusBarScrim.
Receiver scope for NutrientMainToolbar's content, carrying the modifiers a piece of the toolbar uses to say how it wants to be sized and placed — the same two RowScope has, weight and align, and for the same reason: per-child layout control belongs on the child, not in the parent's parameter list. Everything else is a standard modifier: Modifier.fillMaxWidth() on a child grows a wrapping toolbar to the width it was offered, Modifier.width(…) fixes a child.
How a toolbar item shows that it is pressed, hovered, focused or selected: the shape its ripple, hover state layer and selection highlight are all clipped to, and the rippleColor of that ripple.
Properties
testTag on the document title overlay's text. Espresso/UIAutomator suites that targeted the legacy R.id.pspdf__activity_title_overlay TextView use onNodeWithTag(DOCUMENT_TITLE_OVERLAY_TEST_TAG).
The top inset the scaffold's content must consume so it is not hidden behind a top-docked toolbar — the Compose replacement for the View ToolbarCoordinatorLayout's getToolbarInset() / adjustContentViewTopPadding() sibling-padding machinery. Provided by NutrientToolbarScaffold to its content slot; 0.dp outside a scaffold.
The ToolbarItemIndication for items composed here — provided by NutrientMainToolbar and NutrientContextualToolbar from their itemIndication parameter, and what NutrientToolbarItemButton reads by default, so an item a host composes in a slot indicates like the SDK's own. Provide it yourself to restyle only part of a bar, say the item row in a slot. ToolbarItemIndication.Default outside a bar.
Functions
A popup anchored to a point in the document — the Compose replacement for the PopupWindow-based PopupToolbar (Phase 4 §4, P2-16). Renders content inside the host composition (no separate window), horizontally centered on the anchor with its bottom edge at the anchor, clamped to the host bounds inset by edgePadding (the View pspdf__popup_toolbar_edge_padding contract).
Records the drawing of the composable it is applied to into state, so chrome drawn later in the same composition can sample it — the "what's behind" half of a backdrop blur.
State-driven contextual (special-mode) toolbar — the one generic composable behind the annotation, document-editing, and content-editing bars. Renders coordinator's contextualToolbar state slice; nothing is painted while that flow is null.
The bar's close affordance — NutrientContextualToolbar's default closeButton: the View ContextualToolbar.updateCloseButton glyphs, a back arrow on a top-docked bar that ContextualToolbarState.usesBackButtonWhenHorizontal, the circled X otherwise, dispatching ToolbarAction.ItemClicked with R.id.pspdf__toolbar_close_button. Public so a host can keep it next to something of its own in the slot.
Creates the ComposeView that hosts NutrientContextualToolbar for coordinator — the contextual counterpart of nutrientMainToolbarComposeView, mounted once by PdfUiImpl into the ToolbarCoordinatorLayout top slot (Phase 2). The composable paints nothing while the coordinator's contextual slice is null; the host additionally toggles the view's top-slot bookkeeping via ToolbarCoordinatorLayout.setComposeContextualToolbarVisible.
The document title overlay — a separate strip rendered below the main toolbar row that shows the current document's title centered. It is the Compose successor of the legacy pspdf__activity_title_overlay TextView.
Creates a ComposeView hosting NutrientDocumentTitleOverlay for coordinator, so View-based hosts can embed the title overlay on its own. (The SDK's PdfActivity does not use this — it composes the overlay inside NutrientMainToolbar; this is for custom hosts that want just the title overlay.)
A Material 3 Expressive floating pill rendering of the contextual (special-mode) toolbars — the annotation creation, document editing and content editing bars — over a ToolbarCoordinator. The floating counterpart of NutrientContextualToolbar, and the companion of NutrientFloatingToolbar: both pills share one frame, so they dock against the same window edges, drag and fling identically, run on the same expressive spring motion, and paint the same Material 3 floating-toolbar color roles (vibrant picks primaryContainer, otherwise surfaceContainer).
A Material 3 Expressive floating toolbar rendering of a ToolbarCoordinator.
One item: a vibrant/standard M3 icon button. A selected item (the SDK marks the item of an open outline, grid or reader view, and an active tool, as selected) renders with a filled container, so "on" reads as such and invites the tap that turns it off. Only a ToolbarItem.Toggle is a Material toggle button; a ToolbarItem.Button is a plain icon button painted with the same colors, so its merged semantics carry selected and never a checked state. A ToolbarItem.Submenu renders as the same button with a submenu corner mark; tapping it opens the children in a Material 3 dropdown, and a child tap dispatches ToolbarAction.SubmenuChildClicked.
Applies the floating toolbar's Material 3 color mapping to SDK inline-search content.
NutrientMainToolbar with one content slot in place of the navigation-icon / title / actions three, for a bar that does not fit that shape: the pieces are laid out in a row exactly as composed, sized by what each asked for through NutrientToolbarScope (weight(), align()) or a standard modifier. The SDK's pieces are public, so "my own content" never means giving up the coordinator's items:
State-driven main toolbar. Renders coordinator's frame and items, emits ToolbarActions via coordinator.dispatch(…).
Creates the ComposeView that hosts NutrientMainToolbar for coordinator.
What NutrientMainToolbar's slots hold by default, as one piece of content: the coordinator's title, then its items taking the width that is left (NutrientToolbarScope.weight) — so trailing items pin to the far edge of a full-bleed bar while a floating one stays as wide as its icons.
The toolbar's own navigation (up / back) icon: com.pspdfkit.compose.toolbar.state.ToolbarFrame.navigationIcon, or nothing when the frame carries ToolbarIcon.None. NutrientMainToolbar's default navigationIcon, and the piece the SDK's own mount shows for PdfUi.setToolbarNavigationIcon.
The toolbar's own title: com.pspdfkit.compose.toolbar.state.ToolbarFrame.title, or nothing when the frame carries none. One line, ellipsized when the bar has no room for it. NutrientMainToolbar's default title.
Stylus-aware pointer input as a single primitive (STYLUS-1 / P1-8): one implementation, used everywhere a toolbar element handles taps.
Anchored popup primitive (POPUP-1 / P1-9) that toolbar submenus and the text-selection popup will build on in later phases. Owns anchoring with edge-overflow correction (clamp into the window, flip above the anchor when there isn't room below), themed chrome from UiTheme's popup colors, and dismissal (outside tap / back).
A scrim over the status-bar strip, optionally blurring the content behind it.
The render leaf for a single ToolbarItem — the smallest visual toolbar primitive.
The coordinator's items as a toolbar row: the ordered item list, re-grouped into row items and ⋮ menu entries by measured width (see NutrientToolbarLayout), dispatching to coordinator. NutrientMainToolbar's default actions.
One-pass, feedback-loop-free toolbar layout (P0-5).
The SDK toolbar tree, assembled: NutrientToolbarScaffold with NutrientMainToolbar and NutrientContextualToolbar pre-wired in its slots — placement, fit-correction, drag chrome, and theming (ToolbarCoordinator.mainToolbarColors through NutrientTheme, like the ComposeView factories) all connected. The single-tree successor of PdfUiImpl mounting two ComposeViews into the View ToolbarCoordinatorLayout (Phase 4 §2); custom hosts that want the stock bars over their own content use this directly.
Single-tree placement scaffold for the Nutrient toolbars — the Compose replacement for the View ToolbarCoordinatorLayout (Phase 4 §1, closes P0-4's overlay z-order bug class).
The inline search bar for coordinator's current search session, or nothing when no session is registered — the same UI com.pspdfkit.compose.search.composables.NutrientInlineSearchBar renders standalone, without its own background, for embedding in a toolbar that already draws one.
Creates and remembers a FloatingToolbarState. The docked edge, expansion state, and active item are persisted via rememberSaveable, so a drag to the bottom edge (or a collapse) survives rotation and process death.
Creates the NutrientBackdropState shared by a document view and the scrim over it. Call it in the composable that owns both, so the one instance can be passed to each.
Composable-scoped binding for ToolbarCoordinator.
The single accessibility contract for every toolbar item (A11Y-1 / P1-6).
Derives a Compose testTag from an R.id by resolving its resource entry name (e.g. R.id.pspdf__menu_option_search → "pspdf__menu_option_search").