Documentation
¶
Index ¶
- func KeyMapToSlice(t any) (bindings []key.Binding)
- func PlaceOverlay(x, y int, fg, bg string, shadow bool, opts ...WhitespaceOption) string
- type Bindings
- type Container
- type ContainerOption
- func WithBorder(top, right, bottom, left bool) ContainerOption
- func WithBorderAll() ContainerOption
- func WithBorderHorizontal() ContainerOption
- func WithBorderStyle(style lipgloss.Border) ContainerOption
- func WithBorderVertical() ContainerOption
- func WithDoubleBorder() ContainerOption
- func WithPadding(top, right, bottom, left int) ContainerOption
- func WithPaddingAll(padding int) ContainerOption
- func WithPaddingHorizontal(padding int) ContainerOption
- func WithPaddingVertical(padding int) ContainerOption
- func WithRoundedBorder() ContainerOption
- func WithThickBorder() ContainerOption
- type Focusable
- type Sizeable
- type SplitPaneLayout
- type SplitPaneOption
- type WhitespaceOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyMapToSlice ¶
func PlaceOverlay ¶
func PlaceOverlay( x, y int, fg, bg string, shadow bool, opts ...WhitespaceOption, ) string
PlaceOverlay places fg on top of bg.
Types ¶
type Container ¶
func NewContainer ¶
func NewContainer(content tea.Model, options ...ContainerOption) Container
type ContainerOption ¶
type ContainerOption func(*container)
func WithBorder ¶
func WithBorder(top, right, bottom, left bool) ContainerOption
WithBorder allows you to set borders for each side of the container. You can specify different values for top, right, bottom, and left borders.
func WithBorderAll ¶
func WithBorderAll() ContainerOption
WithBorderAll sets borders on all sides of the container.
func WithBorderHorizontal ¶
func WithBorderHorizontal() ContainerOption
WithBorderHorizontal sets borders on the left and right sides of the container.
func WithBorderStyle ¶
func WithBorderStyle(style lipgloss.Border) ContainerOption
WithBorderStyle sets the style of the border.
func WithBorderVertical ¶
func WithBorderVertical() ContainerOption
WithBorderVertical sets borders on the top and bottom sides of the container.
func WithDoubleBorder ¶
func WithDoubleBorder() ContainerOption
WithDoubleBorder sets the style of the border to DoubleBorder.
func WithPadding ¶
func WithPadding(top, right, bottom, left int) ContainerOption
WithPadding allows you to set padding for each side of the container. You can specify different values for top, right, bottom, and left padding.
func WithPaddingAll ¶
func WithPaddingAll(padding int) ContainerOption
WithPaddingAll sets the same padding value for all sides of the container.
func WithPaddingHorizontal ¶
func WithPaddingHorizontal(padding int) ContainerOption
WithPaddingHorizontal sets the same padding value for the left and right sides of the container.
func WithPaddingVertical ¶
func WithPaddingVertical(padding int) ContainerOption
WithPaddingVertical sets the same padding value for the top and bottom sides of the container.
func WithRoundedBorder ¶
func WithRoundedBorder() ContainerOption
WithRoundedBorder sets the style of the border to RoundedBorder.
func WithThickBorder ¶
func WithThickBorder() ContainerOption
WithThickBorder sets the style of the border to ThickBorder.
type SplitPaneLayout ¶
type SplitPaneLayout interface {
tea.Model
Sizeable
Bindings
SetLeftPanel(panel Container) tea.Cmd
SetRightPanel(panel Container) tea.Cmd
SetBottomPanel(panel Container) tea.Cmd
ClearLeftPanel() tea.Cmd
ClearRightPanel() tea.Cmd
ClearBottomPanel() tea.Cmd
}
func NewSplitPane ¶
func NewSplitPane(options ...SplitPaneOption) SplitPaneLayout
type SplitPaneOption ¶
type SplitPaneOption func(*splitPaneLayout)
func WithBottomPanel ¶
func WithBottomPanel(panel Container) SplitPaneOption
func WithLeftPanel ¶
func WithLeftPanel(panel Container) SplitPaneOption
func WithRatio ¶
func WithRatio(ratio float64) SplitPaneOption
func WithRightPanel ¶
func WithRightPanel(panel Container) SplitPaneOption
func WithVerticalRatio ¶
func WithVerticalRatio(ratio float64) SplitPaneOption
type WhitespaceOption ¶
type WhitespaceOption func(*whitespace)
WhitespaceOption sets a styling rule for rendering whitespace.