Caption

class Caption(val content: Widget, val top: Widget? = null, val bottom: Widget? = null) : Widget

Add a top and/or bottom caption to content

Constructors

Link copied to clipboard
constructor(content: Widget, top: String? = null, bottom: String? = null, topAlign: TextAlign = TextAlign.CENTER, bottomAlign: TextAlign = TextAlign.CENTER)
constructor(content: Widget, top: Widget? = null, bottom: Widget? = null)

Properties

Link copied to clipboard
val bottom: Widget? = null
Link copied to clipboard
Link copied to clipboard
val top: Widget? = null

Functions

Link copied to clipboard
open override fun measure(t: Terminal, width: Int): WidthRange
Link copied to clipboard
open override fun render(t: Terminal, width: Int): Lines
Link copied to clipboard
fun Widget.withPadding(padding: Padding, padEmptyLines: Boolean = true): Widget

Add padding around this widget.

fun Widget.withPadding(padEmptyLines: Boolean = true, padding: Padding.Builder.() -> Unit): Widget
fun Widget.withPadding(all: Int, padEmptyLines: Boolean = true): Widget
fun Widget.withPadding(top: Int, right: Int, bottom: Int, left: Int, padEmptyLines: Boolean = true): Widget