layouts

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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