layout

package
v0.0.0-...-e4dbe0e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResizeDirectionHorizontal ResizeDirection = iota
	ResizeDirectionVertical

	WidenHorizontallyKey  = tcell.KeyCtrlL
	NarrowHorizontallyKey = tcell.KeyCtrlH
	WidenVerticallyKey    = tcell.KeyCtrlJ
	NarrowVerticallyKey   = tcell.KeyCtrlK
)
View Source
const (
	PageIDTraces        = "Traces"
	PageIDMetrics       = "Metrics"
	PageIDLogs          = "Logs"
	PageIDTraceTopology = "TraceTopology"
	PageIDTimeline      = "Timeline"
	PageIDModal         = "Modal"
)

Variables

View Source
var Colors = []tcell.Color{

	tcell.ColorAliceBlue,
	tcell.ColorBurlyWood,
	tcell.ColorCadetBlue,
	tcell.ColorCoral,
	tcell.ColorCornsilk,
	tcell.ColorGold,
	tcell.ColorLightBlue,
	tcell.ColorLightGreen,
	tcell.ColorLemonChiffon,
	tcell.ColorMediumTurquoise,
}

Functions

func AppendAttrsSorted

func AppendAttrsSorted(parent *tview.TreeNode, attrs pcommon.Map)

AppendAttrsSorted appends attributes to the given parent node in sorted order by key.

func AttachCommandList

func AttachCommandList(commands *tview.TextView, p tview.Primitive) *tview.Flex

func AttachModalForTableRows

func AttachModalForTableRows(table *tview.Table, mapper tableModalMapper, onHide func())

func AttachModalForTreeAttributes

func AttachModalForTreeAttributes(tree *tview.TreeView, onHide func())

func AttachTab

func AttachTab(p tview.Primitive, name string) *tview.Flex

func NewCommandList

func NewCommandList() *tview.TextView

func RegisterCommandList

func RegisterCommandList(commands *tview.TextView, c FocusableBox, origFocusFn func(), keys KeyMaps)

Types

type FocusableBox

type FocusableBox interface {
	SetFocusFunc(func()) *tview.Box
	SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey) *tview.Box
}

type KeyMap

type KeyMap struct {
	Key         *tcell.EventKey
	Arrow       bool
	Hidden      bool
	Description string
	Handler     func(event *tcell.EventKey) *tcell.EventKey
}

type KeyMaps

type KeyMaps []*KeyMap

func (*KeyMaps) Merge

func (m *KeyMaps) Merge(m2 KeyMaps)

type ResizeDirection

type ResizeDirection int

type ResizeManager

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

func NewResizeManager

func NewResizeManager(direction ResizeDirection) *ResizeManager

func (*ResizeManager) KeyMaps

func (m *ResizeManager) KeyMaps() KeyMaps

func (*ResizeManager) Register

func (m *ResizeManager) Register(
	parent *tview.Flex,
	first, second tview.Primitive,
	firstProportion, secondProportion int,
	commands *tview.TextView,
)

Jump to

Keyboard shortcuts

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