group

package
v0.0.0-...-db1c41b Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	FocusNext key.Binding
	FocusPrev key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

type Model

type Model struct {
	foam.Common

	KeyMap KeyMap
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Model

func (*Model) Blur

func (g *Model) Blur()

func (*Model) CanGrow

func (m *Model) CanGrow() bool

func (*Model) Current

func (g *Model) Current() foam.Focusable

func (*Model) Focus

func (g *Model) Focus() tea.Cmd

func (*Model) Init

func (g *Model) Init() tea.Cmd

func (*Model) SetSize

func (g *Model) SetSize(width int, height int)

func (*Model) Update

func (g *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (g *Model) View() string

type Option

type Option func(*Model)

func WithItems

func WithItems(items ...foam.Focusable) Option

func WithKeyMap

func WithKeyMap(km KeyMap) Option

func WithLayout

func WithLayout(layout *layout.Layout) Option

Jump to

Keyboard shortcuts

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