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
— TypeBox
Defines characters to render boxes.
Row names:
┌─┬┐ top │ ││ head ├─┼┤ headrow │ ││ mid ├─┼┤ row ├─┼┤ footrow │ ││ foot └─┴┘ bottom
each row is an instance of BoxLine
Term.box.Box
— MethodBox(string)
Construct a Box
objet out of a box string.
Term.box.BoxLine
— TypeBoxLine
Stores the characters for a line of a Box
object.
Term.box.fit
— Methodfit(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.
Term.box.get_row
— Methodget_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...)
Term.box.get_title_row
— Methodgettitlerow(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
.
Term.box.loop_last
— Methodloop_last(v::Vector)
Returns an iterable yielding tuples (is_last, value).