DslSlide

interface DslSlide

Shared contract for slides whose content is authored with the kotlinx.html DSL. Implemented by HorizontalDslSlide and VerticalDslSlide. This is the only slide type that can host the extension DSLs (com.kslides.playground, com.kslides.diagram, com.kslides.codeSnippet, letsPlot{}).

Members prefixed with private_ are implementation details (crossing the DSL/renderer boundary) and should not be called by user code. The exposed global*Config / presentation*Config / *Path accessors are intended for extension DSLs that need to look up merged configuration and output paths when generating iframe content.

Inheritors

Properties

Link copied to clipboard
abstract var classes: String

CSS class list applied to the <section>.

Link copied to clipboard
Link copied to clipboard
abstract var id: String

HTML id applied to the <section>; blank omits the attribute.

Link copied to clipboard
open val krokiPath: String

Filesystem directory where Kroki diagram files are written.

Link copied to clipboard

Version of the Lets-Plot JS runtime loaded by generated Lets-Plot iframes.

Link copied to clipboard

Filesystem directory where Lets-Plot iframe HTML files are written.

Link copied to clipboard

Filesystem directory where Playground iframe HTML files are written.

Link copied to clipboard

The Presentation that owns this slide.

Link copied to clipboard
Link copied to clipboard

Implementation detail — do not use.

Link copied to clipboard
abstract var private_dslBlock: SECTION.() -> Unit

Implementation detail — do not use.

Link copied to clipboard
abstract var private_iframeCount: Int

Implementation detail — counter for per-slide iframe filenames.

Link copied to clipboard
abstract var private_section: SECTION?

Implementation detail — do not use.

Link copied to clipboard
abstract val private_slideId: Int

Implementation detail — unique slide id used to generate iframe filenames.

Link copied to clipboard
abstract var private_useHttp: Boolean

Implementation detail — do not use.

Link copied to clipboard
abstract var style: String

Inline CSS applied to the <section>; blank omits the attribute.

Functions

Link copied to clipboard
fun DslSlide.diagram(diagramType: String, diagramBlock: DiagramDescription.() -> Unit)

Embed a Kroki-rendered diagram inside a DslSlide content{} block. The diagram source is POSTed to Kroki; the resulting image is cached by filename so repeated renders of the same presentation do not re-hit Kroki.

Link copied to clipboard
fun DslSlide.include(src: String, linePattern: String = "", beginToken: String = "", endToken: String = "", exclusive: Boolean = true, trimIndent: Boolean = true): String

include variant for use inside a com.kslides.slide.DslSlide content{} block. Same semantics as CODE.include — HTML escaping and the indent token are turned off.

Link copied to clipboard
open fun krokiFilename(filename: String): String

Resolve filename relative to the configured Kroki output directory.

Link copied to clipboard
open fun letsPlotFilename(filename: String): String

Resolve filename relative to the configured Lets-Plot output directory.

Link copied to clipboard
open fun newFilename(suffix: String = "html"): String

Generate a unique per-slide filename for iframe or image content. Each call increments the internal counter so multiple playgrounds / diagrams / plots on the same slide get distinct filenames.

Link copied to clipboard
fun DslSlide.playground(srcName: String, vararg otherSrcs: String = emptyArray(), configBlock: PlaygroundConfig.() -> Unit = {})

Embed an interactive Kotlin Playground iframe inside a DslSlide content{} block. The source file referenced by srcName is inlined into the Playground editor; any otherSrcs are attached as hidden <textarea class="hidden-dependency"> elements that Playground loads alongside the main file.

Link copied to clipboard
open fun playgroundFilename(filename: String): String

Resolve filename relative to the configured Playground output directory.

Link copied to clipboard
abstract fun processSlide(section: SECTION)

Apply the slide's attributes to the enclosing <section>. Invoked by the renderer.