RtfEvent

sealed interface RtfEvent(source)

A single event emitted while parsing an RTF document — the idiomatic sealed-type replacement for the upstream per-event classes. Consumers can drive a when over these, or implement RtfListener.

Inheritors

Types

Link copied to clipboard
class BinaryBytes(val bytes: ByteArray) : RtfEvent

Raw binary bytes from a \binN blob.

Link copied to clipboard
data class Command(val command: Command, val parameter: Int, val hasParameter: Boolean, val optional: Boolean) : RtfEvent

A command, with its optional integer parameter.

Link copied to clipboard
data object DocumentEnd : RtfEvent

The parser has reached the end of the document.

Link copied to clipboard
data object DocumentStart : RtfEvent

The parser has started reading the document.

Link copied to clipboard
data object GroupEnd : RtfEvent

The end of a group.

Link copied to clipboard
data object GroupStart : RtfEvent

The start of a group.

Link copied to clipboard
data class Text(val text: String) : RtfEvent

A decoded run of text.