GridStringBuilder

class GridStringBuilder(var leftBoundary: Char = '|', var rightBoundary: Char = '|', var horizontalDivider: Char = '-', var lineTerminator: String = NEWLINE)

Provides a class for building strings as part of a grid.

Constructors

Link copied to clipboard
constructor(leftBoundary: Char = '|', rightBoundary: Char = '|', horizontalDivider: Char = '-', lineTerminator: String = NEWLINE)

Properties

Link copied to clipboard

Get the size of the display area.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun drawWrapped(value: String, startX: Int, startY: Int, maxWidth: Int): FramePosition

Draw a wrapped string at a specified startX and startY position with a maxWidth. The end position will be returned.

Link copied to clipboard
fun flush()

Flush the buffer.

Link copied to clipboard
fun getCharacter(x: Int, y: Int): Char

Get a character from the buffer at a specified x and y location.

Link copied to clipboard
fun resize(displaySize: Size)

Resize the display area.

Link copied to clipboard
fun setCell(x: Int, y: Int, character: Char)

Set the cell at a specified x and y position to a specified character.

Link copied to clipboard
open override fun toString(): String