panels

package
v0.6.10-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Panels Layout is a Flex widget with hidable panels and a main content. Can be vert or horz oriendted throught the Flex widget. Panels can be jumped to with <focuskey> and hidden with <shift>-<focuskey> Recommend making the <focuskey> an: '<alt>-<key>' and hidden will be '<shift>-<alt>-<key>' Normal movement and interaction keys within the focussed panel.

main (middle) panel, can be anything, including... - the router (when this is the root view) - another DashAndPanels - a pager, grid, or any other primitive

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

type Layout struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func New

func New() *Layout

func (*Layout) AddFirstPanel

func (L *Layout) AddFirstPanel(name string, item tview.Primitive, fixedSize, proportion,
	focus int, focuskey string, hidden bool, hiddenkey string)

AddFirstPanel adds a Panel to the left or top, depending on orientation.

func (*Layout) AddLastPanel

func (L *Layout) AddLastPanel(name string, item tview.Primitive, fixedSize, proportion,
	focus int, focuskey string, hidden bool, hiddenkey string)

AddLastPanel adds a Panel to the right or bottom, depending on orientation.

func (*Layout) Mount

func (L *Layout) Mount(context map[string]interface{}) error

func (*Layout) SetMainPanel

func (L *Layout) SetMainPanel(name string, item tview.Primitive, fixedSize, proportion, focus int, focuskey string)

type Panel

type Panel struct {
	*tview.Flex

	Name       string
	Item       tview.Primitive
	FixedSize  int
	Proportion int
	Focus      int
	FocusKey   string
	Hidden     bool
	HiddenKey  string
}

Jump to

Keyboard shortcuts

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