popup

package
v0.38.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 9 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 FakePopupHandler

type FakePopupHandler struct {
	OnErrorMsg func(message string) error
	OnConfirm  func(opts types.ConfirmOpts) error
	OnPrompt   func(opts types.PromptOpts) error
}

func (*FakePopupHandler) Alert

func (self *FakePopupHandler) Alert(title string, message string) error

func (*FakePopupHandler) Confirm

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

func (*FakePopupHandler) Error

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

func (*FakePopupHandler) ErrorMsg

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

func (*FakePopupHandler) GetPromptInput

func (self *FakePopupHandler) GetPromptInput() string

func (*FakePopupHandler) Menu

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

func (*FakePopupHandler) Prompt

func (self *FakePopupHandler) Prompt(opts types.PromptOpts) error

func (*FakePopupHandler) Toast

func (self *FakePopupHandler) Toast(message string)

func (*FakePopupHandler) WithLoaderPanel

func (self *FakePopupHandler) WithLoaderPanel(message string, f func() error) error

func (*FakePopupHandler) WithWaitingStatus

func (self *FakePopupHandler) WithWaitingStatus(message string, f func() error) error

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() error) error,
	toastFn func(message string),
	getPromptInputFn func() string,
) *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) 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) Toast

func (self *PopupHandler) Toast(message string)

func (*PopupHandler) WithLoaderPanel

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

func (*PopupHandler) WithWaitingStatus

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

Jump to

Keyboard shortcuts

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