Pdf Fragment Toolbar Binder
Producer-side bridge between PdfFragment and a ToolbarCoordinator.
One instance per fragment. Call attach from Fragment.onViewCreated and detach from onDestroyView. After detach the binder holds no reference to the fragment — this is what makes the leak-free guarantee from loophole P0-3 enforceable at the fragment-flavor boundary.
Action-ID convention (ADR-Toolbar-4):
pspdf.undo/pspdf.redofor the undo manager.pspdf.annotation.{tool}for annotation tools, where{tool}is the lowercase name of the AnnotationTool enum (e.g.pspdf.annotation.ink).
Items present in the coordinator with these action IDs are kept in sync with the fragment automatically. Items with other action IDs are untouched — they belong to the caller.
STATE-3 (Pre-Phase 0). Listener wiring is fragment-flavor only; the coordinator it talks to stays host-agnostic.
Types
Functions
Release all listeners and the writer slot, clear the fragment reference. Idempotent — safe to call without a matching attach. Release on a non-active binder is a silent no-op at the coordinator level (e.g. when this binder already lost its slot to a concurrent attach on a sibling fragment).