toggle menu
mordant
common
switch theme
search in API
mordant
/
com.github.ajalt.mordant.widgets
/
HorizontalRule
Horizontal
Rule
class
HorizontalRule
:
Widget
A line drawn across the terminal, with an optional
title
.
Members
Members & Extensions
Constructors
Horizontal
Rule
Link copied to clipboard
constructor
(
title
:
Widget
=
EmptyWidget
,
ruleCharacter
:
String
?
=
null
,
ruleStyle
:
TextStyle
?
=
null
,
titleAlign
:
TextAlign
=
TextAlign.CENTER
,
titlePadding
:
Int
?
=
null
,
titleOverflowTop
:
Boolean
=
true
)
constructor
(
title
:
String
,
ruleCharacter
:
String
?
=
null
,
ruleStyle
:
TextStyle
?
=
null
,
titleAlign
:
TextAlign
=
TextAlign.CENTER
,
titlePadding
:
Int
?
=
null
,
titleOverflowTop
:
Boolean
=
true
)
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