EpubReadingItem

One stop in a page's reading order: what a screen reader would announce, in the order it would announce it.

for (item in book.readingOrder(page = 3)) {
when (item.role) {
EpubRole.HEADING -> speakHeading(item.text, item.headingLevel)
else -> speak(item.text)
}
}

Properties

Link copied to clipboard

The epub:type the source declared (footnote, noteref, pagebreak, ...), or null. EPUB's own semantic vocabulary, passed through as-is.

Link copied to clipboard

1..6 for a EpubRole.HEADING, 0 for everything else.

Link copied to clipboard

What this item is.

Link copied to clipboard

The words to announce. Never blank except for an image with no alt.

Functions

Link copied to clipboard
open override fun toString(): String