MCPcopy
hub / github.com/mum4k/termdash / BorderTitle

Function BorderTitle

private/draw/border.go:99–105  ·  view source on GitHub ↗

BorderTitle sets a title for the border.

(title string, overrun OverrunMode, opts ...cell.Option)

Source from the content-addressed store, hash-verified

97
98// BorderTitle sets a title for the border.
99func BorderTitle(title string, overrun OverrunMode, opts ...cell.Option) BorderOption {
100 return borderOption(func(bOpts *borderOptions) {
101 bOpts.title = title
102 bOpts.titleOM = overrun
103 bOpts.titleCellOpts = opts
104 })
105}
106
107// BorderTitleAlign configures the horizontal alignment for the title.
108func BorderTitleAlign(h align.Horizontal) BorderOption {

Callers 8

drawBorderFunction · 0.92
TestDrawWidgetFunction · 0.92
DrawMethod · 0.92
DrawMethod · 0.92
TestGaugeFunction · 0.92
DrawMethod · 0.92
TestBorderFunction · 0.70

Calls 1

borderOptionFuncType · 0.85

Tested by 4

TestDrawWidgetFunction · 0.74
TestGaugeFunction · 0.74
TestBorderFunction · 0.56