Box · Term.jl

# Box

- `Term.box.Box`
- `Term.box.Box`
- `Term.box.BoxLine`
- `Term.box.fit`
- `Term.box.get_row`
- `Term.box.get_title_row`
- `Term.box.loop_last`

`Term.box.Box` — Type

Box

Defines characters to render boxes.

Row names:

┌─┬┐ top │ ││ head ├─┼┤ headrow │ ││ mid ├─┼┤ row ├─┼┤ footrow │ ││ foot └─┴┘ bottom

each row is an instance of `BoxLine`

source
`Term.box.Box` — Method

    Box(string)

Construct a `Box` objet out of a box string.

source
`Term.box.BoxLine` — Type

BoxLine

Stores the characters for a line of a `Box` object.

source
`Term.box.fit` — Method

fit(box::Box, widths::Vector{Int})::String

Creates a box.

The box has one of each level type with columns widths specified by a vector of widhts.

source
`Term.box.get_row` — Method

    get_row(box, [1, 2, 3], :row)

Gets characters for a row of a Box object.

The level Symbol can be used to specify the box level (:top, :footer...)

source
`Term.box.get_title_row` — Method

gettitlerow(row::Symbol, box::Box, title::Union{Nothing, AbstractString}; <keyword arguments>)

Create a box row with a title string.

Can create both titles in the top and bottom row to produce subtitles.

#Arguments:

- width::Int: width of line
- style::Union{Nothing: String}: style of line
- title_style::Union{Nothing: AbstractString}: style of title string
- justify::Symbol=:left: position of title string

See also `get_row`.

source
`Term.box.loop_last` — Method

loop_last(v::Vector)

Returns an iterable yielding tuples (is_last, value).

source

Theme

This document was generated with Documenter.jl version 0.27.14 on Wednesday 9 March 2022. Using Julia version 1.6.5.