sneatnav

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MainMenuList(tui *TUI) *tview.List

func ShowErrorModal

func ShowErrorModal(tui *TUI, err error)

func WithFocusTo

func WithFocusTo(focusTo FocusTo) func(o *setPanelsOptions)

Types

type ActionMenuItem

type ActionMenuItem struct {
	ID           string
	Title        string
	SelectedFunc func()
}

type ActionsMenu

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

func (*ActionsMenu) Clear

func (m *ActionsMenu) Clear()

func (*ActionsMenu) RegisterActionMenuItems

func (m *ActionsMenu) RegisterActionMenuItems(items ...ActionMenuItem) error
type Breadcrumbs interface {
	Clear()
	Push(bc sneatv.Breadcrumb)
	GoHome() error
}

type Cell

type Cell interface {
	tview.Primitive
	GetBox() *tview.Box
	TakeFocus()
}

type FocusTo

type FocusTo int
const (
	FocusToNone FocusTo = iota
	FocusToMenu
	FocusToContent
)
type Header struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader(tui *TUI, root sneatv.Breadcrumb) *Header

func (*Header) Breadcrumbs

func (h *Header) Breadcrumbs() Breadcrumbs

func (*Header) SetFocus

func (h *Header) SetFocus(to HeaderFocusedTo, from tview.Primitive)

type HeaderFocusedTo

type HeaderFocusedTo int
const (
	ToBreadcrumbs HeaderFocusedTo
	ToRightMenu
)

type LoginMenu

type LoginMenu struct {
	*sneatv.ButtonWithShortcut
}

func NewLoginMenu

func NewLoginMenu() *LoginMenu

type Panel

type Panel interface {
	PrimitiveWithBox
	TakeFocus()
	Close()
}

func NewPanel

func NewPanel[T tview.Primitive](tui *TUI, p WithBoxType[T]) Panel

type PanelBase

type PanelBase struct {
	PrimitiveWithBox
	// contains filtered or unexported fields
}

func NewPanelBase

func NewPanelBase(tui *TUI, primitive PrimitiveWithBox) PanelBase

func (PanelBase) TUI

func (p PanelBase) TUI() *TUI

type PanelPrimitive

type PanelPrimitive interface {
	tview.Primitive
	Box() string
}

type PrimitiveWithBox

type PrimitiveWithBox interface {
	tview.Primitive
	GetBox() *tview.Box
}

type Row

type Row struct {
}

type Screen

type Screen interface {
	tview.Primitive
	Options() ScreenOptions
	Activate() error
	Close() error
}

type ScreenBase

type ScreenBase struct {
	Tui *TUI

	tview.Primitive
	// contains filtered or unexported fields
}

func (*ScreenBase) Activate

func (screen *ScreenBase) Activate() error

func (*ScreenBase) Close

func (screen *ScreenBase) Close() error

func (*ScreenBase) Options

func (screen *ScreenBase) Options() ScreenOptions

func (*ScreenBase) TakeFocus

func (screen *ScreenBase) TakeFocus()

func (*ScreenBase) Window

func (screen *ScreenBase) Window() tview.Primitive

type ScreenOptions

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

func (ScreenOptions) FullScreen

func (o ScreenOptions) FullScreen() bool

type TUI

type TUI struct {
	App     *tview.Application
	Grid    *tview.Grid
	Header  *Header
	Menu    Panel
	Content Panel
	// contains filtered or unexported fields
}

func NewTUI

func NewTUI(app *tview.Application, root sneatv.Breadcrumb) *TUI

func (*TUI) PopScreen

func (tui *TUI) PopScreen()

func (*TUI) PushScreen

func (tui *TUI) PushScreen(screen Screen)

PushScreen is deprecated. Deprecated

func (*TUI) SetFocus

func (tui *TUI) SetFocus(p tview.Primitive)

func (*TUI) SetPanels

func (tui *TUI) SetPanels(menu, content Panel, options ...func(panelsOptions *setPanelsOptions))

func (*TUI) SetRootScreen

func (tui *TUI) SetRootScreen(screen Screen)

SetRootScreen is deprecated. Deprecated

func (*TUI) StackDepth

func (tui *TUI) StackDepth() int

type WithBoxType

type WithBoxType[T tview.Primitive] struct {
	tview.Primitive
	// contains filtered or unexported fields
}

func WithBox

func WithBox[T tview.Primitive](p T, box *tview.Box) WithBoxType[T]

func WithBoxWithoutBorder

func WithBoxWithoutBorder[T tview.Primitive](p T, box *tview.Box) WithBoxType[T]

func WithBoxWithoutPadding

func WithBoxWithoutPadding[T tview.Primitive](p T, box *tview.Box) WithBoxType[T]

func (WithBoxType[T]) GetBox

func (p WithBoxType[T]) GetBox() *tview.Box

func (WithBoxType[T]) GetPrimitive

func (p WithBoxType[T]) GetPrimitive() T

Jump to

Keyboard shortcuts

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