Decoration

data class Decoration(val id: DecorationId, val locator: Locator, val style: Decoration.Style, val extras: Map<String, Any> = mapOf()) : JSONable, Parcelable

A decoration is a user interface element drawn on top of a publication. It associates a style to be rendered with a discrete locator in the publication.

For example, decorations can be used to draw highlights, images or buttons.

Parameters

id

An identifier for this decoration. It must be unique in the group the decoration is applied to.

locator

Location in the publication where the decoration will be rendered.

style

Declares the look and feel of the decoration.

extras

Additional context data specific to a reading app. Readium does not use it.

Constructors

Link copied to clipboard
constructor(id: DecorationId, locator: Locator, style: Decoration.Style, extras: Map<String, Any> = mapOf())

Types

Link copied to clipboard
interface Style : Parcelable

The Decoration Style determines the look and feel of a decoration once rendered by a Navigator.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open override fun toJSON(): JSONObject
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)