layout

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LayoutMode

type LayoutMode int

LayoutMode determines how many panes are visible

const (
	LayoutThreePane LayoutMode = iota // Dashboard + Center + Sidebar
	LayoutTwoPane                     // Dashboard + Center
	LayoutOnePane                     // Dashboard only
)

type Manager

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

Manager handles the three-pane layout

func NewManager

func NewManager() *Manager

NewManager creates a new layout manager

func (*Manager) CenterWidth

func (m *Manager) CenterWidth() int

CenterWidth returns the center pane width

func (*Manager) DashboardWidth

func (m *Manager) DashboardWidth() int

DashboardWidth returns the dashboard pane width

func (*Manager) GapX

func (m *Manager) GapX() int

GapX returns the horizontal gap between panes.

func (*Manager) Height

func (m *Manager) Height() int

Height returns the total height

func (*Manager) LeftGutter

func (m *Manager) LeftGutter() int

LeftGutter returns the left margin before the dashboard pane.

func (*Manager) Mode

func (m *Manager) Mode() LayoutMode

Mode returns the current layout mode

func (*Manager) Render

func (m *Manager) Render(dashboard, center, sidebar string) string

Render combines pane views based on current layout mode

func (*Manager) Resize

func (m *Manager) Resize(width, height int)

Resize recalculates layout based on new dimensions

func (*Manager) RightGutter

func (m *Manager) RightGutter() int

RightGutter returns the right margin after the sidebar pane.

func (*Manager) ShowCenter

func (m *Manager) ShowCenter() bool

ShowCenter returns whether the center pane should be shown

func (*Manager) ShowSidebar

func (m *Manager) ShowSidebar() bool

ShowSidebar returns whether the sidebar should be shown

func (*Manager) SidebarWidth

func (m *Manager) SidebarWidth() int

SidebarWidth returns the sidebar pane width

func (*Manager) TopGutter

func (m *Manager) TopGutter() int

TopGutter returns the top margin above panes.

Jump to

Keyboard shortcuts

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