dialog

package
v0.0.0-...-28a87cb Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JustShowOkDialog

func JustShowOkDialog(gui *gocui.Gui, title, msg string)

func Msg

func Msg(msg string) func(*gocui.View)

func StuffLoader

func StuffLoader(config Config, f func()) (<-chan bool, error)

func Title

func Title(title string) func(*gocui.View)

Types

type CleanUpFunc

type CleanUpFunc func(gui *gocui.Gui) error

func ListSelect

func ListSelect(gui *gocui.Gui, title string, slice interface{}, allowMultipleSelection bool) (
	<-chan []int, CleanUpFunc, error,
)

Displays a list created from given slice / array. If allowMultipleSelection is set, you can select multiple entries with space.

func OkDialog

func OkDialog(config Config) (<-chan struct{}, CleanUpFunc, error)

type Config

type Config struct {
	Gui *gocui.Gui
	Pos
	ViewConfig func(*gocui.View)
}

func FitMessage

func FitMessage(gui *gocui.Gui, msg string, cfgs ...func(*gocui.View)) Config

func FitMessageWithOkButton

func FitMessageWithOkButton(gui *gocui.Gui, msg string, cfgs ...func(*gocui.View)) Config

type Pos

type Pos struct {
	X0, Y0 int
	X1, Y1 int
}

(x0,y0)---------( , )

|               |
|               |
|               |

( , )---------(x1,y1)

Jump to

Keyboard shortcuts

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