layouts

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoxLayout

type BoxLayout struct {
	// contains filtered or unexported fields
}

BoxLayout is a simple layout that renders a single child model with a specified style. It implements the DimensionModel interface so it can be a convenient way to wrap a model with a style.

func NewBoxLayout

func NewBoxLayout(style lipgloss.Style, content tui.DimensionModel) *BoxLayout

func (*BoxLayout) Init

func (l *BoxLayout) Init() tea.Cmd

func (*BoxLayout) SetHeight

func (l *BoxLayout) SetHeight(height int)

func (*BoxLayout) SetWidth

func (l *BoxLayout) SetWidth(width int)

func (*BoxLayout) Update

func (l *BoxLayout) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*BoxLayout) View

func (l *BoxLayout) View() string

type SidebarLayout

type SidebarLayout struct {
	// contains filtered or unexported fields
}

SidebarLayout is a layout that renders a sidebar, content, and footer. The sidebar can be toggled on and off, and the width of the sidebar and height of the footer can be adjusted.

All the child models are expected to implement the DimensionModel interface, and should therefore handle their own sizing.

func NewSidebarLayout

func NewSidebarLayout(sidebar, content, footer tui.DimensionModel) *SidebarLayout

func (*SidebarLayout) Init

func (l *SidebarLayout) Init() tea.Cmd

func (*SidebarLayout) SetFooterHeight

func (l *SidebarLayout) SetFooterHeight(height int)

func (*SidebarLayout) SetSidebarVisible

func (l *SidebarLayout) SetSidebarVisible(visible bool)

func (*SidebarLayout) SetSidebarWidth

func (l *SidebarLayout) SetSidebarWidth(width int)

func (*SidebarLayout) Update

func (l *SidebarLayout) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*SidebarLayout) View

func (l *SidebarLayout) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL