-
public interface TocHandlerInterface for Table of Contents handlers. Implement this to create custom TOC UI (sidesheet, bottom sheet, dialog, etc.)
-
-
Method Summary
Modifier and Type Method Description abstract UnitupdateToc(List<PdfBookmark> bookmarks)Update the TOC with the given bookmarks. abstract Unitshow()Show the TOC UI abstract Unithide()Hide the TOC UI Unittoggle()Toggle TOC visibility abstract BooleanisVisible()abstract UnitonBookmarkSelected(Function1<Integer, Unit> callback)Set the callback for when a bookmark is selected. -
-
Method Detail
-
updateToc
abstract Unit updateToc(List<PdfBookmark> bookmarks)
Update the TOC with the given bookmarks. Called when the PDF document is loaded.
- Parameters:
bookmarks- List of bookmarks from the PDF
-
onBookmarkSelected
abstract Unit onBookmarkSelected(Function1<Integer, Unit> callback)
Set the callback for when a bookmark is selected. The callback receives the page index to navigate to.
- Parameters:
callback- Function that receives the target page index (0-indexed)
-
-
-
-