Documentation
¶
Overview ¶
package box contains Box a highly configurable building block for retort apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Border ¶
type Border struct {
Style BorderStyle
Background tcell.Color
Foreground tcell.Color
}
type BorderStyle ¶
type BorderStyle int
const ( BorderStyleNone BorderStyle = iota BorderStyleSingle BorderStyleDouble BorderStyleBox // Box drawing characters )
type Label ¶
Label is a decorative string that can be added to the top or bottom border
Margin allows you to move the whole label around, while Padding allows you to define the gap between the Wrap and Value. If no Padding is specified a single column is still added to each side of the Value.
type Properties ¶
type Properties struct {
// ZIndex is the layer this Box is rendered on, with larger numbers appearing
// on top.
ZIndex int
Align Align
// Content Box
// If neither Width,Height or Rows,Columns are set, it will be calculated
// automatically When set this is the percentage width and height.
// Ignored when Rows,Columns is not 0
Width, Height int // 0 = auto
// Set the size fixed in rows and columns.
// Ignored if 0
// If both Rows and Width are set Rows with be used.
Rows, Columns int
Grow int
// Padding Box
Padding Padding
Margin Margin
Direction Direction
// Border
Border Border
Background tcell.Color
Foreground tcell.Color
Overflow Overflow
MinHeight int
MinWidth int
// Title is a Label placed on the top border
Title Label
Footer Label
}
Properties are passed along with box.Box tocreate and configure a Box element
Contents ¶
The contents of the Box is not rendered by this component ¶
Box Sizing ¶
Box Sizing is Border Box only Border and padding is accounted for inside the width and height, meaning the Box can never be bigger than the width or height.
Click to show internal directories.
Click to hide internal directories.