Package-level declarations

Types

Link copied to clipboard

Supplies the grouping preset the contextual toolbar applies at the current capacity — the Compose successor to the legacy MenuItemGroupingRule.

Link copied to clipboard

Which contextual (special-mode) toolbar is being shown. Mode bars share one generic renderer and state slice; the kind is what per-mode binders and customer item providers key on.

Link copied to clipboard
data class ContextualToolbarState(val kind: ContextualToolbarKind, val items: PersistentList<ToolbarItem> = persistentListOf(), val position: ToolbarPosition = ToolbarPosition.Top, val isDraggable: Boolean = true, val defaultChildIds: PersistentList<Int> = persistentListOf(), val allowedPositions: PersistentList<ToolbarPosition> = persistentListOf(ToolbarPosition.Top, ToolbarPosition.Start, ToolbarPosition.End), val usesBackButtonWhenHorizontal: Boolean = true)

State slice for the currently displayed contextual toolbar. null on the coordinator's contextualToolbar flow means no contextual toolbar is shown.

Link copied to clipboard
data class DocumentTitleOverlayState(val title: String? = null, val isVisible: Boolean = false)

State of the document title overlay — the strip rendered directly below the main toolbar row that shows the current document's title. It is the Compose successor of the legacy pspdf__activity_title_overlay TextView, but lives inside the main toolbar composable (below the toolbar row), rather than as a separate overlay in the activity layout.

Link copied to clipboard
sealed interface ToolbarAction

One-way event emitted by a toolbar composable.

Link copied to clipboard
data class ToolbarFrame(val isVisible: Boolean = true, val height: Dp = 56.dp, val position: ToolbarPosition = ToolbarPosition.Top, val title: String? = null, val navigationIcon: ToolbarIcon = ToolbarIcon.None, val navigationContentDescription: String? = null, val insets: ToolbarInsets = ToolbarInsets.StatusBars)

Frame-level toolbar state — visual chrome that's independent of which items are shown. Splitting this from ToolbarItems means changing frame colors doesn't recompose item rows, and vice-versa (loophole P1-13).

Link copied to clipboard
sealed interface ToolbarIcon

Sealed type describing how a toolbar item renders its icon.

Link copied to clipboard
sealed interface ToolbarInsets

Host-neutral description of the window insets the main toolbar reserves for its own content.

Link copied to clipboard
sealed interface ToolbarItem

One toolbar entry. Fully immutable; safe for Compose stability.

Link copied to clipboard
data class ToolbarItems(val visible: PersistentList<ToolbarItem> = persistentListOf(), val overflow: PersistentList<ToolbarItem> = persistentListOf())

The ordered, pre-grouped collection of items for one toolbar.

Link copied to clipboard
data class ToolbarItemState(val isEnabled: Boolean = true, val isSelected: Boolean = false, val isVisible: Boolean = true)

Per-item dynamic state. Split from ToolbarItem so enabled/selected changes recompose only the affected button (loophole P1-13).

Link copied to clipboard

Logical position of a toolbar relative to its host container.

Link copied to clipboard
data class ToolbarPresetEntry(val id: Int, val actionId: String, val childIds: List<Int>? = null)

One entry of a capacity-keyed contextual-toolbar grouping preset: either a single item reference (childIds null) or a group whose children collapse into a ToolbarItem.Submenu.

Functions

Link copied to clipboard

Returns this action stamped with the contextual toolbar kind it originated from. Non-click actions (overflow, navigation, position) pass through unchanged — they are frame-level and carry no per-item source.