Versions in this module Expand all Collapse all v0 v0.3.2 Aug 31, 2018 v0.3.1 Mar 2, 2021 Changes in this version + const AttrBold + const AttrReverse + const AttrUnderline + const ColorBlack + const ColorBlue + const ColorCyan + const ColorDefault + const ColorGreen + const ColorMagenta + const ColorRed + const ColorWhite + const ColorYellow + const KeyArrowDown + const KeyArrowLeft + const KeyArrowRight + const KeyArrowUp + const KeyBackspace + const KeyBackspace2 + const KeyCtrl2 + const KeyCtrl3 + const KeyCtrl4 + const KeyCtrl5 + const KeyCtrl6 + const KeyCtrl7 + const KeyCtrl8 + const KeyCtrlA + const KeyCtrlB + const KeyCtrlBackslash + const KeyCtrlC + const KeyCtrlD + const KeyCtrlE + const KeyCtrlF + const KeyCtrlG + const KeyCtrlH + const KeyCtrlI + const KeyCtrlJ + const KeyCtrlK + const KeyCtrlL + const KeyCtrlLsqBracket + const KeyCtrlM + const KeyCtrlN + const KeyCtrlO + const KeyCtrlP + const KeyCtrlQ + const KeyCtrlR + const KeyCtrlRsqBracket + const KeyCtrlS + const KeyCtrlSlash + const KeyCtrlSpace + const KeyCtrlT + const KeyCtrlTilde + const KeyCtrlU + const KeyCtrlUnderscore + const KeyCtrlV + const KeyCtrlW + const KeyCtrlX + const KeyCtrlY + const KeyCtrlZ + const KeyDelete + const KeyEnd + const KeyEnter + const KeyEsc + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF2 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyHome + const KeyInsert + const KeyPgdn + const KeyPgup + const KeySpace + const KeyTab + const MouseLeft + const MouseMiddle + const MouseRelease + const MouseRight + const MouseWheelDown + const MouseWheelUp + const Output256 + const OutputNormal + var ErrQuit = errors.New("quit") + var ErrUnknownView = errors.New("unknown view") + type Attribute termbox.Attribute + type Editor interface + Edit func(v *View, key Key, ch rune, mod Modifier) + var DefaultEditor Editor = EditorFunc(simpleEditor) + type EditorFunc func(v *View, key Key, ch rune, mod Modifier) + func (f EditorFunc) Edit(v *View, key Key, ch rune, mod Modifier) + type Gui struct + ASCII bool + BgColor Attribute + Cursor bool + FgColor Attribute + Highlight bool + InputEsc bool + Mouse bool + SelBgColor Attribute + SelFgColor Attribute + func NewGui(mode OutputMode) (*Gui, error) + func (g *Gui) Close() + func (g *Gui) CurrentView() *View + func (g *Gui) DeleteKeybinding(viewname string, key interface{}, mod Modifier) error + func (g *Gui) DeleteKeybindings(viewname string) + func (g *Gui) DeleteView(name string) error + func (g *Gui) MainLoop() error + func (g *Gui) Rune(x, y int) (rune, error) + func (g *Gui) SetCurrentView(name string) (*View, error) + func (g *Gui) SetKeybinding(viewname string, key interface{}, mod Modifier, ...) error + func (g *Gui) SetManager(managers ...Manager) + func (g *Gui) SetManagerFunc(manager func(*Gui) error) + func (g *Gui) SetRune(x, y int, ch rune, fgColor, bgColor Attribute) error + func (g *Gui) SetView(name string, x0, y0, x1, y1 int) (*View, error) + func (g *Gui) SetViewOnBottom(name string) (*View, error) + func (g *Gui) SetViewOnTop(name string) (*View, error) + func (g *Gui) Size() (x, y int) + func (g *Gui) Update(f func(*Gui) error) + func (g *Gui) View(name string) (*View, error) + func (g *Gui) ViewByPosition(x, y int) (*View, error) + func (g *Gui) ViewPosition(name string) (x0, y0, x1, y1 int, err error) + func (g *Gui) Views() []*View + type Key termbox.Key + type Manager interface + Layout func(*Gui) error + type ManagerFunc func(*Gui) error + func (f ManagerFunc) Layout(g *Gui) error + type Modifier termbox.Modifier + const ModAlt + const ModNone + type OutputMode termbox.OutputMode + type View struct + Autoscroll bool + BgColor Attribute + Editable bool + Editor Editor + FgColor Attribute + Frame bool + Highlight bool + Mask rune + Overwrite bool + SelBgColor Attribute + SelFgColor Attribute + Title string + Wrap bool + func (v *View) Buffer() string + func (v *View) BufferLines() []string + func (v *View) Clear() + func (v *View) Cursor() (x, y int) + func (v *View) EditDelete(back bool) + func (v *View) EditNewLine() + func (v *View) EditWrite(ch rune) + func (v *View) Line(y int) (string, error) + func (v *View) MoveCursor(dx, dy int, writeMode bool) + func (v *View) Name() string + func (v *View) Origin() (x, y int) + func (v *View) Read(p []byte) (n int, err error) + func (v *View) ReadEditor() []byte + func (v *View) Rewind() + func (v *View) SetCursor(x, y int) error + func (v *View) SetOrigin(x, y int) error + func (v *View) Size() (x, y int) + func (v *View) ViewBuffer() string + func (v *View) ViewBufferLines() []string + func (v *View) Word(x, y int) (string, error) + func (v *View) Write(p []byte) (n int, err error)