Versions in this module Expand all Collapse all v0 v0.62.1 May 28, 2026 v0.62.0 May 26, 2026 Changes in this version + const AttrAll + const AttrColorBits + const AttrIsRGBColor + const AttrIsValidColor + const AttrStyleBits + const BOTTOM + const ColorDefault + const DOUBLE_CLICK_THRESHOLD + const DRAGGING + const KeyAltEnter + const KeyArrowDown + const KeyArrowLeft + const KeyArrowRight + const KeyArrowUp + const KeyBackspace + const KeyBacktab + const KeyCtrlTilde + 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 KeyShiftArrowDown + const KeyShiftArrowUp + const KeyTab + const LEFT + const MAYBE_DRAGGING + const ModAlt + const ModCtrl + const ModMeta + const ModMotion + const ModNone + const ModShift + const MouseLeft + const MouseMiddle + const MouseRelease + const MouseRight + const MouseWheelDown + const MouseWheelLeft + const MouseWheelRight + const MouseWheelUp + const NOT_DRAGGING + const RIGHT + const TOP + const WHITESPACES + const WORD_SEPARATORS + var ErrKeybindingNotHandled = standardErrors.New("keybinding not handled") + var ErrNoSuchKeybind = standardErrors.New("no such keybind") + var ErrQuit = standardErrors.New("quit") + var ErrUnknownView = standardErrors.New("unknown view") + var Screen tcell.Screen + func AutoWrapContent(content string, autoWrapWidth int) []int + func IsMouseKey(key Key) bool + func IsMouseScrollKey(keyName KeyName) bool + func SimpleEditor(v *View, key Key) bool + 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) bool + var DefaultEditor Editor = EditorFunc(SimpleEditor) + type EditorFunc func(v *View, key Key) bool + func (f EditorFunc) Edit(v *View, key Key) bool + type FakeTask struct + func NewFakeTask() *FakeTask + func (self *FakeTask) Continue() + func (self *FakeTask) Done() + func (self *FakeTask) FormatStatus() string + func (self *FakeTask) Pause() + func (self *FakeTask) Status() TaskStatus + type GocuiEvent struct + Err error + Focused bool + Height int + Key Key + MouseX int + MouseY int + N int + Start bool + Type gocuiEventType + Width int + type Gui struct + BgColor Attribute + Cursor bool + ErrorHandler func(error) error + FgColor Attribute + FrameColor Attribute + Highlight bool + InputEsc bool + IsPasting bool + Mouse bool + Mutexes GuiMutexes + NextSearchMatchKeys []Key + OnSearchEscape func() error + PrevSearchMatchKeys []Key + ReplayedEvents replayedEvents + SearchEscapeKeys []Key + SelBgColor Attribute + SelFgColor Attribute + SelFrameColor Attribute + ShouldHandleMouseEvent func(view *View, key KeyName) bool + ShowListFooter bool + SupportOverlaps bool + func NewGui(opts NewGuiOpts) (*Gui, error) + func (g *Gui) AddIdleListener(c chan struct{}) + func (g *Gui) Close() + func (g *Gui) CopyContent(fromView *View, toView *View) + func (g *Gui) CurrentView() *View + func (g *Gui) DeleteAllKeybindings() + func (g *Gui) DeleteView(name string) error + func (g *Gui) DeleteViewKeybindings(viewname string) + func (g *Gui) ForceFlushViewsContentOnly(views []*View) error + func (g *Gui) ForceLayoutAndRedraw() error + func (g *Gui) MainLoop() error + func (g *Gui) NewTask() *TaskImpl + func (g *Gui) OnWorker(f func(Task) error) + func (g *Gui) Resume() error + func (g *Gui) SetCurrentView(name string) (*View, error) + func (g *Gui) SetEditKeybindings(moveWordLeft, moveWordRight, backspaceWord, forwardDeleteWord []Key) + func (g *Gui) SetFocusHandler(handler func(bool) error) + func (g *Gui) SetKeybinding(viewname string, key Key, handler func(*Gui, *View) error) + func (g *Gui) SetManager(managers ...Manager) + func (g *Gui) SetManagerFunc(manager func(*Gui) error) + func (g *Gui) SetOnSelectSearchResultFunc(onSelectSearchResultFunc func(*View, int)) + func (g *Gui) SetOpenHyperlinkFunc(openHyperlinkFunc func(string, string) error) + func (g *Gui) SetRenderSearchStatusFunc(renderSearchStatusFunc func(*View, int, int)) + func (g *Gui) SetRune(x, y int, ch rune, fgColor, bgColor Attribute) error + func (g *Gui) SetTabClickBinding(viewName string, handler tabClickHandler) 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) SetViewClickBinding(binding *ViewMouseBinding) error + func (g *Gui) SetViewOnBottom(name string) (*View, error) + func (g *Gui) SetViewOnTop(name string) (*View, error) + func (g *Gui) SetViewOnTopOf(toMove string, other string) error + func (g *Gui) Size() (x, y int) + func (g *Gui) Snapshot() string + func (g *Gui) Suspend() error + func (g *Gui) Update(f func(*Gui) error) + func (g *Gui) UpdateAsync(f func(*Gui) error) + func (g *Gui) UpdateContentOnly(f func(*Gui) error) + func (g *Gui) View(name string) (*View, error) + func (g *Gui) ViewPosition(name string) (x0, y0, x1, y1 int, err error) + func (g *Gui) Views() []*View + func (g *Gui) VisibleViewByPosition(x, y int) (*View, error) + type GuiMutexes struct + ViewsMutex sync.Mutex + type Key struct + func NewKey(keyName KeyName, str string, mod Modifier) Key + func NewKeyName(keyName KeyName) Key + func NewKeyRune(ch rune) Key + func NewKeyStrMod(str string, mod Modifier) Key + func (k Key) Equals(otherKey Key) bool + func (k Key) IsSet() bool + func (k Key) KeyName() KeyName + func (k Key) Mod() Modifier + func (k Key) Str() string + type KeyName 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 + type NewGuiOpts struct + Headless bool + Height int + OutputMode OutputMode + PlayRecording bool + RuneReplacements map[rune]string + SupportOverlaps bool + Width int + type OutputMode int + const Output216 + const Output256 + const OutputGrayscale + const OutputNormal + const OutputTrue + type RecordingConfig struct + Leeway int + Speed float64 + type SearchPosition struct + XEnd int + XStart int + Y int + type Task interface + Continue func() + Done func() + Pause func() + type TaskImpl struct + func (self *TaskImpl) Continue() + func (self *TaskImpl) Done() + func (self *TaskImpl) Pause() + type TaskManager struct + func (self *TaskManager) NewTask() *TaskImpl + type TaskStatus int + const TaskStatusBusy + const TaskStatusDone + const TaskStatusPaused + type TcellKeyEventWrapper struct + Ch string + Key tcell.Key + Mod tcell.ModMask + Timestamp int64 + func NewTcellKeyEventWrapper(event *tcell.EventKey, timestamp int64) *TcellKeyEventWrapper + type TcellMouseEventWrapper struct + ButtonMask tcell.ButtonMask + ModMask tcell.ModMask + Timestamp int64 + X int + Y int + func NewTcellMouseEventWrapper(event *tcell.EventMouse, timestamp int64) *TcellMouseEventWrapper + type TcellResizeEventWrapper struct + Height int + Timestamp int64 + Width int + func NewTcellResizeEventWrapper(event *tcell.EventResize, timestamp int64) *TcellResizeEventWrapper + type TextArea struct + AutoWrap bool + AutoWrapWidth int + func (self *TextArea) BackSpaceChar() + func (self *TextArea) BackSpaceWord() + func (self *TextArea) Clear() + func (self *TextArea) DeleteChar() + func (self *TextArea) DeleteToEndOfLine() + func (self *TextArea) DeleteToStartOfLine() + func (self *TextArea) ForwardDeleteWord() + func (self *TextArea) GetContent() string + func (self *TextArea) GetCursorXY() (int, int) + func (self *TextArea) GetUnwrappedContent() string + func (self *TextArea) GoToEndOfLine() + func (self *TextArea) GoToStartOfLine() + func (self *TextArea) MoveCursorDown() + func (self *TextArea) MoveCursorLeft() + func (self *TextArea) MoveCursorRight() + func (self *TextArea) MoveCursorUp() + func (self *TextArea) MoveLeftWord() + func (self *TextArea) MoveRightWord() + func (self *TextArea) SetCursor2D(x int, y int) + func (self *TextArea) ToggleOverwrite() + func (self *TextArea) TypeCharacter(ch string) + func (self *TextArea) TypeString(str string) + func (self *TextArea) Yank() + type TextAreaCell struct + type View struct + AutoRenderHyperLinks bool + Autoscroll bool + BgColor Attribute + CanScrollPastBottom bool + Editable bool + Editor Editor + FgColor Attribute + Footer string + Frame bool + FrameColor Attribute + FrameRunes []rune + Highlight bool + HighlightInactive bool + InactiveViewSelBgColor Attribute + KeybindOnEdit bool + Mask string + Overlaps byte + Overwrite bool + ParentView *View + SelBgColor Attribute + SelFgColor Attribute + Subtitle string + TabIndex int + TabWidth int + Tabs []string + TextArea *TextArea + Title string + TitleColor Attribute + TitlePrefix string + UnderlineHyperLinksOnlyOnHover bool + Visible bool + Wrap bool + func NewView(name string, x0, y0, x1, y1 int, mode OutputMode) *View + func (v *View) Buffer() string + func (v *View) BufferLines() []string + func (v *View) CancelRangeSelect() + func (v *View) Clear() + func (v *View) ClearSearch() + func (v *View) ClearTextArea() + func (v *View) ContainsColoredText(fgColor string, text string) bool + func (v *View) CopyContent(from *View) + func (v *View) Cursor() (x, y int) + func (v *View) CursorX() int + func (v *View) CursorY() int + func (v *View) Dimensions() (int, int, int, int) + func (v *View) FlushStaleCells() + func (v *View) FocusPoint(cx int, cy int, scrollIntoView bool) + func (v *View) GetClickedTabIndex(x int) int + func (v *View) GetSearchStatus() (int, int) + func (v *View) Height() int + func (v *View) InnerHeight() int + func (v *View) InnerSize() (x, y int) + func (v *View) InnerWidth() int + func (v *View) IsSearching() bool + func (v *View) IsTainted() bool + func (v *View) Line(y int) (string, bool) + func (v *View) LinesHeight() int + func (v *View) Name() string + func (v *View) Origin() (x, y int) + func (v *View) OriginX() int + func (v *View) OriginY() int + func (v *View) OverwriteLines(y int, content string) + func (v *View) OverwriteLinesAndClearEverythingElse(lineCount int, y int, content string) + func (v *View) Read(p []byte) (n int, err error) + func (v *View) ReadPos() (x, y int) + func (v *View) RenderTextArea() + func (v *View) Reset() + func (v *View) Rewind() + func (v *View) ScrollDown(amount int) + func (v *View) ScrollLeft(amount int) + func (v *View) ScrollRight(amount int) + func (v *View) ScrollUp(amount int) + func (v *View) Search(str string, modelSearchResults []SearchPosition) + func (v *View) SelectSearchResult(index int) + func (v *View) SelectedLine() string + func (v *View) SelectedLineIdx() int + func (v *View) SelectedLineRange() (int, int) + func (v *View) SelectedLines() []string + func (v *View) SelectedPoint() (int, int) + func (v *View) SetContent(str string) + func (v *View) SetCursor(x, y int) + func (v *View) SetCursorX(x int) + func (v *View) SetCursorY(y int) + func (v *View) SetHighlight(y int, on bool) + func (v *View) SetNearestSearchPosition() + func (v *View) SetOrigin(x, y int) + func (v *View) SetOriginX(x int) + func (v *View) SetOriginY(y int) + func (v *View) SetRangeSelectStart(rangeSelectStartY int) + func (v *View) SetReadPos(x, y int) + func (v *View) SetWritePos(x, y int) + func (v *View) Size() (x, y int) + func (v *View) UpdateSearchResults(str string, modelSearchResults []SearchPosition) + func (v *View) ViewBuffer() string + func (v *View) ViewBufferLines() []string + func (v *View) ViewLinesHeight() int + func (v *View) Width() int + func (v *View) Word(x, y int) (string, bool) + func (v *View) Write(p []byte) (n int, err error) + func (v *View) WritePos() (x, y int) + func (v *View) WriteString(s string) + type ViewMouseBinding struct + FocusedView string + Handler func(ViewMouseBindingOpts) error + Key KeyName + Modifier Modifier + ViewName string + type ViewMouseBindingOpts struct + IsDoubleClick bool + Key KeyName + X int + Y int