Package-level declarations

Types

Link copied to clipboard
class Caption(val content: Widget, val top: Widget? = null, val bottom: Widget? = null) : Widget

Add a top and/or bottom caption to content

Link copied to clipboard
Link copied to clipboard

A widget with 0 width, 0 height, and no content.

Link copied to clipboard

A line drawn across the terminal, with an optional title.

Link copied to clipboard

A numbered list of widgets.

Link copied to clipboard
data class Padding(val top: Int, val right: Int, val bottom: Int, val left: Int)
Link copied to clipboard
class Panel : Widget

A box drawn around another widget, with optional top and bottom titles.

Link copied to clipboard

A horizontal bar that tracks progress.

Link copied to clipboard

A list widget with selectable items.

Link copied to clipboard
class Spinner(frames: List<Widget>, duration: Int = 1, initial: Int = 0) : Widget

A widget that will loop through a fixed list of frames.

Link copied to clipboard
class Text : Widget
Link copied to clipboard
Link copied to clipboard
class Viewport(content: Widget, width: Int?, height: Int? = null, scrollRight: Int = 0, scrollDown: Int = 0) : Widget

Crop or pad another content widget to a fixed size, and optionally scroll visible portion of the widget within that size.

Functions

Link copied to clipboard

Build a definition list widget.

Link copied to clipboard
fun OrderedList(vararg listEntries: Widget, numberStyle: TextStyle? = null, numberSeparator: String? = null): OrderedList
fun OrderedList(vararg listEntries: String, numberStyle: TextStyle? = null, numberSeparator: String? = null): OrderedList
Link copied to clipboard
operator fun Padding.plus(other: Padding): Padding
Link copied to clipboard
fun UnorderedList(vararg listEntries: Widget, bulletText: String? = null, bulletStyle: TextStyle? = null): UnorderedList
fun UnorderedList(vararg listEntries: String, bulletText: String? = null, bulletStyle: TextStyle? = null): UnorderedList
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