Versions in this module Expand all Collapse all v1 v1.0.1 Jul 28, 2022 v1.0.0 Jul 28, 2022 Changes in this version + const AttrAll + const AttrColorBits + const AttrIsRGBColor + const AttrIsValidColor + const AttrStyleBits + const BOTTOM + const ColorDefault + const KeyArrowDown + const KeyArrowLeft + const KeyArrowRight + const KeyArrowUp + const KeyBackspace + const KeyBackspace2 + const KeyBacktab + 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 LEFT + const ModAlt + const ModMouseCtrl + const ModNone + const ModShift + const MouseLeft + const MouseMiddle + const MouseRelease + const MouseRight + const MouseWheelDown + const MouseWheelLeft + const MouseWheelRight + const MouseWheelUp + const RIGHT + const TOP + var ErrAlreadyBlacklisted = errors.New("keybind already blacklisted") + var ErrBlacklisted = errors.New("keybind blacklisted") + var ErrInvalidPoint = errors.New("invalid point") + var ErrNoSuchKeybind = errors.New("no such keybind") + var ErrNotBlacklisted = errors.New("keybind not blacklisted") + var ErrQuit = errors.New("quit") + var ErrUnknownView = errors.New("unknown view") + func Loader() cell + func MustParseAll(input []string) map[interface{}]Modifier + func ParseAll(input []string) (map[interface{}]Modifier, error) + func Resume() error + func Suspend() + type Attribute uint64 + const AttrBlink + const AttrBold + const AttrDim + const AttrItalic + const AttrNone + const AttrReverse + const AttrStrikeThrough + const AttrUnderline + const ColorBlack + const ColorBlue + const ColorCyan + const ColorGreen + const ColorMagenta + const ColorRed + const ColorWhite + const ColorYellow + func Get256Color(color int32) Attribute + func GetColor(color string) Attribute + func GetRGBColor(color int32) Attribute + func NewRGBColor(r, g, b int32) Attribute + func (a Attribute) Hex() int32 + func (a Attribute) IsValidColor() bool + func (a Attribute) RGB() (int32, int32, int32) + 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 + FrameColor Attribute + Highlight bool + InputEsc bool + Mouse bool + SelBgColor Attribute + SelFgColor Attribute + SelFrameColor Attribute + SupportOverlaps bool + func NewGui(mode OutputMode, supportOverlaps bool) (*Gui, error) + func (g *Gui) BlacklistKeybinding(k Key) 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) GetTestingScreen() TestingScreen + func (g *Gui) MainLoop() error + func (g *Gui) MousePosition() (x, y int) + 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, overlaps byte) (*View, error) + func (g *Gui) SetViewBeneath(name string, aboveViewName string, height 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) UpdateAsync(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 + func (g *Gui) WhitelistKeybinding(k Key) error + type Key tcell.Key + type Manager interface + Layout func(*Gui) error + type ManagerFunc func(*Gui) error + func (f ManagerFunc) Layout(g *Gui) error + type Modifier tcell.ModMask + func MustParse(input string) (interface{}, Modifier) + func Parse(input string) (interface{}, Modifier, error) + type OutputMode int + const Output216 + const Output256 + const OutputGrayscale + const OutputNormal + const OutputSimulator + const OutputTrue + type TestingScreen struct + func (t *TestingScreen) GetViewContent(viewName string) (string, error) + func (t *TestingScreen) SendKey(key Key) + func (t *TestingScreen) SendKeySync(key Key) + func (t *TestingScreen) SendStringAsKeys(input string) + func (t *TestingScreen) StartGui() func() + func (t *TestingScreen) WaitSync() + type View struct + Autoscroll bool + BgColor Attribute + Editable bool + Editor Editor + FgColor Attribute + Frame bool + FrameColor Attribute + FrameRunes []rune + HasLoader bool + Highlight bool + KeybindOnEdit bool + Mask rune + Overlaps byte + Overwrite bool + SelBgColor Attribute + SelFgColor Attribute + Subtitle string + Title string + TitleColor Attribute + Visible bool + 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) Dimensions() (int, int, int, int) + func (v *View) EditDelete(back bool) + func (v *View) EditDeleteToStartOfLine() + func (v *View) EditGotoToEndOfLine() + func (v *View) EditGotoToStartOfLine() + func (v *View) EditNewLine() + func (v *View) EditWrite(ch rune) + func (v *View) IsTainted() bool + func (v *View) Line(y int) (string, error) + func (v *View) LinesHeight() int + func (v *View) MoveCursor(dx, dy int) + 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) ReadPos() (x, y int) + func (v *View) Rewind() + func (v *View) SetCursor(x, y int) error + func (v *View) SetCursorUnrestricted(x, y int) error + func (v *View) SetHighlight(y int, on bool) error + func (v *View) SetLine(y int, text string) error + func (v *View) SetOrigin(x, y int) error + func (v *View) SetReadPos(x, y int) error + func (v *View) SetWritePos(x, y int) error + func (v *View) Size() (x, y int) + func (v *View) ViewBuffer() string + func (v *View) ViewBufferLines() []string + func (v *View) ViewLinesHeight() int + func (v *View) Word(x, y int) (string, error) + func (v *View) Write(p []byte) (n int, err error) + func (v *View) WritePos() (x, y int) + func (v *View) WriteRunes(p []rune) + func (v *View) WriteString(s string)