popup

package
v0.65.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PopupHandler

type PopupHandler struct {
	*common.Common
	// contains filtered or unexported fields
}

func NewPopupHandler

func NewPopupHandler(
	common *common.Common,
	createPopupPanelFn func(context.Context, types.CreatePopupPanelOpts),
	onErrorFn func() error,
	popContextFn func(),
	currentContextFn func() types.Context,
	createMenuFn func(types.CreateMenuOptions) error,
	withWaitingStatusFn func(message string, f func(gocui.Task) error),
	withWaitingStatusBlockingInputFn func(opts types.WaitingStatusOpts, f func(gocui.Task) error),
	toastFn func(message string, kind types.ToastKind),
	getPromptInputFn func() string,
	inDemo func() bool,
) *PopupHandler

func (*PopupHandler) Alert

func (self *PopupHandler) Alert(title string, message string)

func (*PopupHandler) Confirm

func (self *PopupHandler) Confirm(opts types.ConfirmOpts)

func (*PopupHandler) ConfirmIf added in v0.54.0

func (self *PopupHandler) ConfirmIf(condition bool, opts types.ConfirmOpts) error

func (*PopupHandler) ErrorHandler added in v0.42.0

func (self *PopupHandler) ErrorHandler(err error) error

func (*PopupHandler) ErrorToast added in v0.41.0

func (self *PopupHandler) ErrorToast(message string)

func (*PopupHandler) GetPromptInput

func (self *PopupHandler) GetPromptInput() string

returns the content that has currently been typed into the prompt. Useful for asynchronously updating the suggestions list under the prompt.

func (*PopupHandler) Menu

func (self *PopupHandler) Menu(opts types.CreateMenuOptions) error

func (*PopupHandler) Prompt

func (self *PopupHandler) Prompt(opts types.PromptOpts)

func (*PopupHandler) SetToastFunc added in v0.41.0

func (self *PopupHandler) SetToastFunc(f func(string, types.ToastKind))

func (*PopupHandler) Toast

func (self *PopupHandler) Toast(message string)

func (*PopupHandler) WithWaitingStatus

func (self *PopupHandler) WithWaitingStatus(message string, f func(gocui.Task) error) error

func (*PopupHandler) WithWaitingStatusBlockingInput added in v0.64.0

func (self *PopupHandler) WithWaitingStatusBlockingInput(opts types.WaitingStatusOpts, f func(gocui.Task) error) error

Jump to

Keyboard shortcuts

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