popup

package
v0.0.0-...-00ab8b8 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 7 Imported by: 0

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

	deadlock.Mutex
	// contains filtered or unexported fields
}

func NewPopupHandler

func NewPopupHandler(
	common *common.Common,
	createPopupPanelFn func(context.Context, types.CreatePopupPanelOpts) error,
	onErrorFn func() error,
	popContextFn func() error,
	currentContextFn func() types.Context,
	createMenuFn func(types.CreateMenuOptions) error,
	withWaitingStatusFn func(message string, f func(gocui.Task) error),
	withWaitingStatusSyncFn func(message string, f func() 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) error

func (*PopupHandler) Confirm

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

func (*PopupHandler) Error

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

func (*PopupHandler) ErrorMsg

func (self *PopupHandler) ErrorMsg(message string) error

func (*PopupHandler) ErrorToast

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) error

func (*PopupHandler) SetToastFunc

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) WithWaitingStatusSync

func (self *PopupHandler) WithWaitingStatusSync(message string, f func() error) error

Jump to

Keyboard shortcuts

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