Panel
Term.panel.Panel
— TypePanel
Renderable
with a panel surrounding some content: ╭──────────╮ │ my panel │ ╰──────────╯
Term.panel.Panel
— MethodPanel(renderables; kwargs...)
Panel
constructor for creating a panel out of multiple renderables at once.
Term.panel.Panel
— MethodPanel(
content::RenderablesUnion;
title::Union{Nothing, String}=nothing,
title_style::Union{String, Nothing}=nothing,
title_justify::Symbol=:left,
subtitle::Union{String, Nothing}=nothing,
subtitle_style::Union{String, Nothing}=nothing,
subtitle_justify::Symbol=:left,
width::Union{Nothing, Symbol, Int}=:fit,
height::Union{Nothing, Int}=nothing,
style::Union{String, Nothing}=nothing,
box::Symbol=:ROUNDED,
justify=:left
)
Panel
constructor to fit a panel to a piece of (renderable) content.
title
can be used to specify a title to be addded to the top row and title_style
and title_justify
set its appearance and position. Same for subtitle
but for the panel's bottom row. width
and height
are used to set the Panel
's size. If not passed they are computed to fit tot the content
's size.
Term.panel.TextBox
— TypeTextBox
Creates a Panel
and fits input text to it. The pannel is hidden so that the result is just a text box.
Term.panel.TextBox
— MethodTextBox(
text::Union{Vector, AbstractString};
width::Union{Nothing, Int}=nothing,
title::Union{Nothing, String}=nothing,
title_style::Union{String, Nothing}="default",
title_justify::Symbol=:left,
subtitle::Union{String, Nothing}=nothing,
subtitle_style::Union{String, Nothing}="default",
subtitle_justify::Symbol=:left,
justify::Symbol=:left,
fit::Symbol=:fit,
)
Creates an hidden Panel
with text
in it.
If a width
is passed, the input text
is reshaped to have that size, unless fit=:truncate
in which case it's cut to size. If no width
is passed and fit=true
the TextBox
's size matches the size of the input text
. Other arguments behave like Panel
.
See also Panel
.