NutrientContextualToolbarScope

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.

Properties

Link copied to clipboard

The state the bar is rendering — ContextualToolbarState.position is the dock it is laid out for.

Functions

Link copied to clipboard
abstract fun dispatch(action: ToolbarAction)

Dispatches action to the coordinator stamped with this bar's kind, closing an open submenu first.

Link copied to clipboard

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.