sneatv

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBlurBorderColor = tcell.ColorGray
View Source
const DefaultFocusedBorderColor = tcell.ColorCornflowerBlue

Variables

This section is empty.

Functions

func DefaultBorderWithPadding

func DefaultBorderWithPadding(box *tview.Box)

func DefaultBorderWithoutPadding

func DefaultBorderWithoutPadding(box *tview.Box)

func SetPanelTitle

func SetPanelTitle(box *tview.Box, title string)

func WithSeparator

func WithSeparator(separator string) func(bc *Breadcrumbs)

Types

type Breadcrumb interface {
	GetTitle() string
	Action() error
}

func NewBreadcrumb

func NewBreadcrumb(title string, action func() error) Breadcrumb
type Breadcrumbs struct {
	*tview.Box
	// contains filtered or unexported fields
}

func NewBreadcrumbs

func NewBreadcrumbs(root Breadcrumb, options ...func(bc *Breadcrumbs)) *Breadcrumbs
func (b *Breadcrumbs) Blur()

Blur is called when this primitive loses focus.

func (b *Breadcrumbs) Clear()
func (b *Breadcrumbs) Draw(screen tcell.Screen)
func (b *Breadcrumbs) Focus(delegate func(p tview.Primitive))

Focus is called when this primitive receives focus.

func (b *Breadcrumbs) GoHome() error
func (b *Breadcrumbs) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))

InputHandler handles keyboard input for navigation and activation.

func (b *Breadcrumbs) IsLastItemSelected() bool
func (b *Breadcrumbs) ItemsCount() int
func (b *Breadcrumbs) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)

MouseHandler handles selection via mouse and focusing on click.

func (b *Breadcrumbs) Push(item Breadcrumb)
func (b *Breadcrumbs) SelectedItemIndex() int
func (b *Breadcrumbs) SetNextFocusTarget(p tview.Primitive) *Breadcrumbs

SetNextFocusTarget sets the primitive to focus when Tab/Down is pressed.

func (b *Breadcrumbs) SetPrevFocusTarget(p tview.Primitive) *Breadcrumbs

SetPrevFocusTarget sets the primitive to focus when Shift+Tab/Up is pressed.

func (b *Breadcrumbs) TakeFocus()

type ButtonWithShortcut

type ButtonWithShortcut struct {
	*tview.Button
	// contains filtered or unexported fields
}

func NewButtonWithShortcut

func NewButtonWithShortcut(label string, shortcut rune) *ButtonWithShortcut

func (*ButtonWithShortcut) Draw

func (b *ButtonWithShortcut) Draw(screen tcell.Screen)

Draw draws this primitive onto the screen.

func (*ButtonWithShortcut) SetShortcutStyle

func (b *ButtonWithShortcut) SetShortcutStyle(style tcell.Style) *ButtonWithShortcut

type Tab

type Tab struct {
	Title string
	tview.Primitive
}

Tab represents a single tab.

type Tabs

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

Tabs is a tab container implemented using tview.Pages.

func NewTabs

func NewTabs() *Tabs

NewTabs creates a new tab container.

func (*Tabs) AddTab

func (t *Tabs) AddTab(tab Tab)

AddTab adds a new tab.

func (*Tabs) SwitchTo

func (t *Tabs) SwitchTo(index int)

SwitchTo switches to a tab by index.

Jump to

Keyboard shortcuts

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