Box

class Box(val title: InlineContent?, val type: Box.Type, val padding: Size? = null, val backgroundColor: Color? = null, val foregroundColor: Color? = null, val children: List<Node>) : NestableNode

A generic box that contains content.

Parameters

title

box title. If null, the box is untitled

type

type of the box

padding

padding of the box. If null, the box uses the default value

backgroundColor

background color of the box. If null, the box uses the default value

foregroundColor

foreground color of the box. If null, the box uses the default value

children

content of the box

Constructors

Link copied to clipboard
constructor(title: InlineContent?, type: Box.Type, padding: Size? = null, backgroundColor: Color? = null, foregroundColor: Color? = null, children: List<Node>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Possible type of Box, which determines its style.

Properties

Link copied to clipboard
val backgroundColor: Color? = null
Link copied to clipboard
open override val children: List<Node>
Link copied to clipboard
val foregroundColor: Color? = null
Link copied to clipboard
val padding: Size? = null
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun <T> accept(visitor: NodeVisitor<T>): T

Accepts a visitor.

Link copied to clipboard

Returns a sequence of all nodes in the tree, where this is the root node. The sequence is generated by traversing the tree in depth-first order. The root node is excluded from the sequence.

Link copied to clipboard