gui

package
v0.0.0-...-2eaf2e4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InputPanel int = iota + 1
	ProcessesPanel
	ProcessInfoPanel
	ProcessEnvPanel
	ProcessTreePanel
	ProcessFilePanel
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvView

type EnvView struct {
	*tview.TextView
}

func NewEnvView

func NewEnvView() *EnvView

func (*EnvView) UpdateViewWithPid

func (p *EnvView) UpdateViewWithPid(g *Gui, pid proc.PID)

type Gui

type Gui struct {
	FilterInput     *tview.InputField
	ProcessManager  *ProcessManager
	ProcessInfoView *ProcessInfoView
	ProcessTreeView *ProcessTreeView
	ProcessEnvView  *EnvView
	ProcessFileView *ProcessFileView
	NaviView        *NaviView
	App             *tview.Application
	Pages           *tview.Pages

	Panels
	// contains filtered or unexported fields
}

func New

func New() *Gui

func (*Gui) CloseAndSwitchPanel

func (g *Gui) CloseAndSwitchPanel(removePrimitive string, primitive tview.Primitive)

func (*Gui) Confirm

func (g *Gui) Confirm(message, doneLabel string, primitive tview.Primitive, doneFunc func())

func (*Gui) CurrentPanelKind

func (g *Gui) CurrentPanelKind() int

func (*Gui) FilterInputKeybinds

func (g *Gui) FilterInputKeybinds()

func (*Gui) GlobalKeybind

func (g *Gui) GlobalKeybind(event *tcell.EventKey)

func (*Gui) Modal

func (g *Gui) Modal(p tview.Primitive, width, height int) tview.Primitive

func (*Gui) ProcessEnvViewKeybinds

func (g *Gui) ProcessEnvViewKeybinds()

func (*Gui) ProcessFileViewKeybinds

func (g *Gui) ProcessFileViewKeybinds()

func (*Gui) ProcessInfoViewKeybinds

func (g *Gui) ProcessInfoViewKeybinds()

func (*Gui) ProcessManagerKeybinds

func (g *Gui) ProcessManagerKeybinds()

func (*Gui) ProcessTreeViewKeybinds

func (g *Gui) ProcessTreeViewKeybinds()

func (*Gui) Run

func (g *Gui) Run() error

func (*Gui) SetKeybinds

func (g *Gui) SetKeybinds()

func (*Gui) SwitchPanel

func (g *Gui) SwitchPanel(p tview.Primitive) *tview.Application

func (*Gui) UpdateViews

func (g *Gui) UpdateViews(pid proc.PID)
type NaviView struct {
	*tview.TextView
}

func NewNaviView

func NewNaviView() *NaviView
func (n *NaviView) UpdateView(g *Gui)

type Panels

type Panels struct {
	Current int
	Panels  []tview.Primitive
	Kinds   []int
}

type ProcessFileView

type ProcessFileView struct {
	*tview.TextView
}

func NewProcessFileView

func NewProcessFileView() *ProcessFileView

func (*ProcessFileView) UpdateViewWithPid

func (p *ProcessFileView) UpdateViewWithPid(g *Gui, pid proc.PID)

type ProcessInfoView

type ProcessInfoView struct {
	*tview.TextView
}

func NewProcessInfoView

func NewProcessInfoView() *ProcessInfoView

func (*ProcessInfoView) UpdateInfoWithPid

func (p *ProcessInfoView) UpdateInfoWithPid(g *Gui, pid proc.PID)

type ProcessManager

type ProcessManager struct {
	*tview.Table

	FilterWord string
	// contains filtered or unexported fields
}

func NewProcessManager

func NewProcessManager() *ProcessManager

func (*ProcessManager) GetProcess

func (p *ProcessManager) GetProcess(pid proc.PID) *proc.Process

func (*ProcessManager) GetProcesses

func (p *ProcessManager) GetProcesses() (map[proc.PID]proc.Process, error)

func (*ProcessManager) Selected

func (p *ProcessManager) Selected() *proc.Process

func (*ProcessManager) UpdateView

func (p *ProcessManager) UpdateView() error

type ProcessNode

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

type ProcessTreeView

type ProcessTreeView struct {
	*tview.TreeView
	// contains filtered or unexported fields
}

func NewProcessTreeView

func NewProcessTreeView(
	getProcess func(proc.PID) *proc.Process) *ProcessTreeView

func (*ProcessTreeView) ExpandToggle

func (p *ProcessTreeView) ExpandToggle(node *tview.TreeNode, isExpand bool)

func (*ProcessTreeView) UpdateTree

func (p *ProcessTreeView) UpdateTree(pid proc.PID)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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