Documentation
¶
Index ¶
- Constants
- Variables
- func RenderContainer(c PaneContainer, main, cross int) string
- func RenderPane(p Pane, width, height int) string
- func ResolveSize(s Size, total int) int
- type AlignContent
- type AlignItems
- type AlignSelf
- type ContainerStyle
- type FlexDirection
- type FlexWrap
- type Justify
- type Pane
- type PaneBorder
- type PaneContainer
- type PaneStyle
- type Size
- type SizeUnit
Constants ¶
View Source
const ( DirectionRow FlexDirection = "row" DirectionRowR FlexDirection = "row-reverse" DirectionColumn FlexDirection = "column" DirectionColumnR FlexDirection = "column-reverse" WrapNone FlexWrap = "nowrap" WrapWrap FlexWrap = "wrap" WrapReverse FlexWrap = "wrap-reverse" JustifyStart Justify = "flex-start" JustifyEnd Justify = "flex-end" JustifyCenter Justify = "center" JustifyBetween Justify = "space-between" JustifyAround Justify = "space-around" JustifyEvenly Justify = "space-evenly" AlignItemStrech AlignItems = "stretch" AlignItemStart AlignItems = "flex-start" AlignItemEnd AlignItems = "flex-end" AlignItemCenter AlignItems = "center" AlignItemBaseline AlignItems = "baseline" AlignContentStrech AlignContent = "stretch" AlignContentStart AlignContent = "flex-start" AlignContentEnd AlignContent = "flex-end" AlignContentBetween AlignContent = "space-between" AlignContentAround AlignContent = "space-around" AlignContentEvenly AlignContent = "space-evenly" AlignContentCenter AlignContent = "center" AlignSelfAuto AlignSelf = "auto" AlignSelfCenter AlignSelf = "center" AlignSlefStart AlignSelf = "flex-start" AlignSelfEnd AlignSelf = "flex-end" AlignSelfStretch AlignSelf = "stretch" AlignSelfBaseline AlignSelf = "baseline" )
Variables ¶
View Source
var (
DefaultBorder = PaneBorder{Enabled: true, TopLeft: "┌", TopRight: "┐", BottomLeft: "└", BottomRight: "┘", Vertical: "│", Horizontal: "─", Color: lipgloss.Color("#FFFFFF")}
)
Functions ¶
func RenderContainer ¶
func RenderContainer(c PaneContainer, main, cross int) string
func RenderPane ¶
func ResolveSize ¶
Types ¶
type AlignContent ¶
type AlignContent string
type AlignItems ¶
type AlignItems string
type ContainerStyle ¶
type ContainerStyle struct {
FlexDirection FlexDirection
FlexWrap FlexWrap
Justify Justify
AlignItems AlignItems
AlignContent AlignContent
GapRow int
GapColumn int
}
func NewContainerStyle ¶
func NewContainerStyle() ContainerStyle
type FlexDirection ¶
type FlexDirection string
type Pane ¶
type Pane struct {
Height int
Width int
DisplayHeight int
DisplayWidth int
DisplayString string
Style PaneStyle
}
func ResolvePaneSizes ¶
type PaneBorder ¶
type PaneContainer ¶
type PaneContainer struct {
Panes []Pane
Style ContainerStyle
}
func NewContainer ¶
func NewContainer(style ContainerStyle, panes ...Pane) PaneContainer
Click to show internal directories.
Click to hide internal directories.