aboutsummaryrefslogtreecommitdiff
path: root/ui/widget/border.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-03-22 23:03:36 +0200
committerTulir Asokan <tulir@maunium.net>2018-03-22 23:03:36 +0200
commitb93dea2e1c18752b89b09790b390e54c33dda1bf (patch)
treec004fdf58d89b3a832db5df4887f716bf364d3f9 /ui/widget/border.go
parent225dbdba4e1fed5814c0a3d1f34a8aedf87fc445 (diff)
Refactoring and documentation
Diffstat (limited to 'ui/widget/border.go')
-rw-r--r--ui/widget/border.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/widget/border.go b/ui/widget/border.go
index a32f4dd..7c42f3d 100644
--- a/ui/widget/border.go
+++ b/ui/widget/border.go
@@ -21,10 +21,16 @@ import (
"maunium.net/go/tview"
)
+// Border is a simple tview widget that renders a horizontal or vertical bar.
+//
+// If the width of the box is 1, the bar will be vertical.
+// If the height is 1, the bar will be horizontal.
+// If the width nor the height are 1, nothing will be rendered.
type Border struct {
*tview.Box
}
+// NewBorder wraps a new tview Box into a new Border.
func NewBorder() *Border {
return &Border{tview.NewBox()}
}