ui/text: add LayoutOptions

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-30 23:58:05 +02:00
parent 28f53d8708
commit 0546683720
4 changed files with 22 additions and 19 deletions
+6 -1
View File
@@ -33,8 +33,13 @@ type Layout struct {
Lines []Line
}
type LayoutOptions struct {
MaxWidth int
SingleLine bool
}
type Face interface {
Layout(str string, singleLine bool, maxWidth int) *Layout
Layout(str string, opts LayoutOptions) *Layout
Path(str String) ui.BlockOp
}