ui

package
v0.0.0-...-b2e586f Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromptMode = iota
	CommandMode
)
View Source
const (
	CommandNone = iota
	CommandQuit
	CommandPrompt
)

Variables

This section is empty.

Functions

func AddKeyEventListener

func AddKeyEventListener(fn listener)

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}
var App *Application

func (*Application) Close

func (app *Application) Close()

func (*Application) Run

func (app *Application) Run()

type Command

type Command int16

func (Command) Name

func (c Command) Name() string

type CommandBuffer

type CommandBuffer struct {
	// contains filtered or unexported fields
}

func NewCommandBuffer

func NewCommandBuffer() *CommandBuffer

func (*CommandBuffer) Process

func (c *CommandBuffer) Process(kv *tcell.EventKey) Command

func (*CommandBuffer) Reset

func (k *CommandBuffer) Reset()

type Layout

type Layout interface {
	// Origin() *Point
	// Width() int
	// Height() int
	IsFocus() bool
	Focus()
	UnFocus()
	Resize()
}
type Menu struct {
	// contains filtered or unexported fields
}
func (m *Menu) Show()
type MenuItem struct {
}

type Mode

type Mode int8

type Point

type Point struct {
	X int
	Y int
}

func (*Point) Add

func (p *Point) Add(x, y int) *Point

func (*Point) Advance

func (p *Point) Advance(x int)

func (*Point) Back

func (p *Point) Back(x int)

func (*Point) Copy

func (p *Point) Copy(s *Point)

type Prompt

type Prompt struct {
	// contains filtered or unexported fields
}

func NewPrompt

func NewPrompt(w *Window, origin *Point, width int) *Prompt

func (*Prompt) Focus

func (p *Prompt) Focus()

func (*Prompt) IsFocus

func (p *Prompt) IsFocus() bool

func (*Prompt) KeyInput

func (p *Prompt) KeyInput(kv *tcell.EventKey)

func (*Prompt) Reset

func (p *Prompt) Reset()

func (*Prompt) Resize

func (p *Prompt) Resize()

func (*Prompt) UnFocus

func (p *Prompt) UnFocus()

type Table

type Table struct {
	// contains filtered or unexported fields
}

func NewTable

func NewTable(w *Window, origin *Point, width, height int) *Table

func (*Table) Focus

func (t *Table) Focus()

func (*Table) IsFocus

func (t *Table) IsFocus() bool

func (*Table) Resize

func (t *Table) Resize()

func (*Table) UnFocus

func (t *Table) UnFocus()

type Window

type Window struct {
	// contains filtered or unexported fields
}

func NewWindow

func NewWindow() *Window

func (*Window) Close

func (w *Window) Close()

func (*Window) Height

func (w *Window) Height() int

func (*Window) Show

func (w *Window) Show()

func (*Window) SwitchMode

func (w *Window) SwitchMode()

func (*Window) Sync

func (w *Window) Sync()

func (*Window) Width

func (w *Window) Width() int

Jump to

Keyboard shortcuts

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