MCPcopy
hub / github.com/rivo/tview / NewBox

Function NewBox

box.go:72–83  ·  view source on GitHub ↗

NewBox returns a Box without a border.

()

Source from the content-addressed store, hash-verified

70
71// NewBox returns a Box without a border.
72func NewBox() *Box {
73 b := &Box{
74 width: 15,
75 height: 10,
76 innerX: -1, // Mark as uninitialized.
77 backgroundColor: Styles.PrimitiveBackgroundColor,
78 borderStyle: tcell.StyleDefault.Foreground(Styles.BorderColor).Background(Styles.PrimitiveBackgroundColor),
79 titleColor: Styles.TitleColor,
80 titleAlign: AlignCenter,
81 }
82 return b
83}
84
85// SetBorderPadding sets the size of the borders around the box content.
86func (b *Box) SetBorderPadding(top, bottom, left, right int) *Box {

Callers 15

mainFunction · 0.92
NewRadioButtonsFunction · 0.92
mainFunction · 0.92
FlexFunction · 0.92
CoverFunction · 0.92
mainFunction · 0.92
NewInputFieldFunction · 0.85
NewDropDownFunction · 0.85
NewGridFunction · 0.85
NewTextAreaFunction · 0.85
NewPagesFunction · 0.85
NewImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…