KiteBookmark

sealed class KiteBookmark

A reading position that survives a re-flow. Save this when the reader leaves, hand it back when they return, and they land where they were even if the font size, page size or margins changed in between.

Resolve one with KiteDocument.locate. Each handler has its own subtype because "the same place" means something different per format: a PDF page index never moves, while a paragraph in a book does.

Inheritors

Types

Link copied to clipboard
data class Flow(val chapter: Int, val charOffset: Int = 0, val fragment: String? = null) : KiteBookmark

A place inside one reflowable chapter.

Link copied to clipboard
data class Page(val pageIndex: Int) : KiteBookmark

A page index in a PDF. Pages are fixed, so the index IS the position.

Properties

Link copied to clipboard
abstract val chapter: Int

The chapter this position lives in. Resolving needs only this chapter.