toggle menu
mordant
common
switch theme
search in API
mordant
/
com.github.ajalt.mordant.widgets
/
Caption
Caption
class
Caption
(
val
content
:
Widget
,
val
top
:
Widget
?
=
null
,
val
bottom
:
Widget
?
=
null
)
:
Widget
Add a
top
and/or
bottom
caption to
content
Members
Members & Extensions
Constructors
Caption
Link copied to clipboard
constructor
(
content
:
Widget
,
top
:
String
?
=
null
,
bottom
:
String
?
=
null
,
topAlign
:
TextAlign
=
TextAlign.CENTER
,
bottomAlign
:
TextAlign
=
TextAlign.CENTER
)
constructor
(
content
:
Widget
,
top
:
Widget
?
=
null
,
bottom
:
Widget
?
=
null
)
Properties
bottom
Link copied to clipboard
val
bottom
:
Widget
?
=
null
content
Link copied to clipboard
val
content
:
Widget
top
Link copied to clipboard
val
top
:
Widget
?
=
null
Functions
measure
Link copied to clipboard
open
override
fun
measure
(
t
:
Terminal
,
width
:
Int
)
:
WidthRange
render
Link copied to clipboard
open
override
fun
render
(
t
:
Terminal
,
width
:
Int
)
:
Lines
with
Padding
Link copied to clipboard
fun
Widget
.
withPadding
(
padding
:
Padding
,
padEmptyLines
:
Boolean
=
true
)
:
Widget
Add padding around this widget.
fun
Widget
.
withPadding
(
padEmptyLines
:
Boolean
=
true
,
padding
:
Padding.Builder
.
(
)
->
Unit
)
:
Widget
fun
Widget
.
withPadding
(
all
:
Int
,
padEmptyLines
:
Boolean
=
true
)
:
Widget
fun
Widget
.
withPadding
(
top
:
Int
,
right
:
Int
,
bottom
:
Int
,
left
:
Int
,
padEmptyLines
:
Boolean
=
true
)
:
Widget