createpanel

package
v0.0.0-...-56f1d57 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSuggestionsCmd

func GetSuggestionsCmd() tea.Cmd

GetSuggestionsCmd is triggered when the panel is requesting suggestions

func ObserverCmd

func ObserverCmd(msg ObserverMsg) tea.Cmd

CreateOutputCmd wraps the CreateOutputMsg values

Types

type Focus

type Focus int
const (
	Name Focus = iota
	Path
	Command
	Button
)

type Model

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

func New

func New() *Model

func (*Model) GetSize

func (m *Model) GetSize() (int, int)

func (*Model) Help

func (m *Model) Help() dialog.HelpEntry

func (*Model) Init

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

func (*Model) Overlay

func (m *Model) Overlay() helpers.UseOverlay

func (*Model) SetFocus

func (m *Model) SetFocus(focus Focus)

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

func (*Model) WithObserver

func (m *Model) WithObserver(observer Observing) *Model

func (*Model) WithTitle

func (m *Model) WithTitle(title string, pos viewport.TitlePos) *Model

func (*Model) WithViewAs

func (m *Model) WithViewAs(as ViewAs) *Model

type ObserverMsg

type ObserverMsg struct {
	Name    string
	Path    string
	Command string
	Focus   Focus
	LastKey tea.KeyMsg
}

CreateOutputMsg contains the values from the text input fields wrapped in a tea message

type Observing

type Observing interface {
	// Update notifies the Observing object of any updates coming
	// from the current model
	Update(tea.Msg) (tea.Model, tea.Cmd)
}

type SuggestionsMsg

type SuggestionsMsg struct {
	Command []string
	Name    []string
	Path    []string
	Focus   Focus
	LastKey tea.KeyMsg
}

GetSuggestionsMsg is sent when the panel is requesting new suggestions

type ViewAs

type ViewAs int
const (
	Embedded ViewAs = iota
	Overlay
)

Jump to

Keyboard shortcuts

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