ui

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConsole added in v0.6.1

func InitConsole(title string)

InitConsole initializes the Windows(R) console. This platform doesn't need to do anything.

Types

type Config added in v0.6.2

type Config struct {
	AmbiguousWidth string `flag:"|auto|二义性字符宽度,可选值: auto/single/double/space"`
	HistoryLines   int    `flag:"|100000|历史记录保留行数"`
	RTTVHeight     int    `flag:"|10|历史查看模式下实时文本区域高度"`
}

type Readline added in v0.6.5

type Readline struct {
	*tview.InputField
	// contains filtered or unexported fields
}

func NewReadline added in v0.6.5

func NewReadline() *Readline

func (*Readline) Enter added in v0.6.5

func (r *Readline) Enter() string

func (*Readline) InputCapture added in v0.6.5

func (r *Readline) InputCapture(event *tcell.EventKey) *tcell.EventKey

func (*Readline) SetAutoTrim added in v0.6.5

func (r *Readline) SetAutoTrim(b bool) *Readline

func (*Readline) SetRepeat added in v0.6.5

func (r *Readline) SetRepeat(b bool) *Readline

type UI

type UI struct {
	printer.Printer
	sync.Mutex
	// contains filtered or unexported fields
}

func NewUI

func NewUI(config Config) *UI

func (*UI) Create

func (ui *UI) Create(title string)

func (*UI) Input

func (ui *UI) Input() <-chan string

func (*UI) InputCapture added in v0.6.1

func (ui *UI) InputCapture(event *tcell.EventKey) *tcell.EventKey

func (*UI) Print added in v0.6.1

func (ui *UI) Print(a ...interface{}) (n int, err error)

func (*UI) Printf added in v0.6.1

func (ui *UI) Printf(format string, a ...interface{}) (n int, err error)

func (*UI) Println added in v0.6.1

func (ui *UI) Println(a ...interface{}) (n int, err error)

func (*UI) Run

func (ui *UI) Run()

func (*UI) SetOutput added in v0.6.1

func (ui *UI) SetOutput(w io.Writer)

func (*UI) Stop

func (ui *UI) Stop()

Jump to

Keyboard shortcuts

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