selection

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SelectionList

type SelectionList struct {
	*text.Text
	// contains filtered or unexported fields
}

SelectionList displays a list of item which can be selected.

Each line represents an actionable item.

Implements widgetapi.Widget. This object is thread-safe.

func New

func New() (*SelectionList, error)

func (*SelectionList) Configure

func (s *SelectionList) Configure(items []string, onSelect func(int, string) error)

func (*SelectionList) Draw added in v0.7.4

func (s *SelectionList) Draw(cvs *canvas.Canvas, meta *widgetapi.Meta) error

func (*SelectionList) Keyboard

func (s *SelectionList) Keyboard(k *terminalapi.Keyboard, meta *widgetapi.EventMeta) error

func (*SelectionList) Mouse added in v0.7.4

func (*SelectionList) Options

func (s *SelectionList) Options() widgetapi.Options

Jump to

Keyboard shortcuts

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