text

fun ProgressLayoutScope<*>.text(content: String, align: TextAlign = this.align, verticalAlign: VerticalAlign = this.verticalAlign)

Add a fixed text cell to this layout.

The cell is always the same size as the content. For a fixed-width text cell, use marquee.

Parameters

content

The text to display in this cell.

align

The text alignment for this cell. Cells are right-aligned by default.


fun <T> ProgressLayoutScope<T>.text(align: TextAlign = this.align, verticalAlign: VerticalAlign = this.verticalAlign, fps: Int = textFps, content: ProgressState<T>.() -> String)

Add a dynamic text cell to this layout.

The content lambda will be called with the current progress state as its receiver.

The cell is always the same size as the content. For a fixed-width text cell, use marquee.

Example

text { context.toString() }

Parameters

align

The text alignment for this cell. Cells are right-aligned by default.

content

A lambda returning the text to display in this cell.