Versions in this module Expand all Collapse all v0 v0.15.0 Jan 24, 2021 v0.15.0-rc3 Jan 24, 2021 v0.15.0-rc2 Jan 21, 2021 v0.15.0-rc1 Jan 20, 2021 v0.14.1 Aug 16, 2020 v0.14.0 Jul 5, 2020 Changes in this version + func CategorizeSmallWord(r rune) int + func IsAlnum(r rune) bool type AppSpec + SmallWordAbbreviations func(f func(abbr, full string)) type CodeAreaSpec + SmallWordAbbreviations func(f func(abbr, full string)) v0.14.0-rc3 Jul 5, 2020 v0.14.0-rc2 Jul 4, 2020 v0.14.0-rc1 Jul 1, 2020 v0.13.1 Jan 12, 2020 Changes in this version type App + RedrawFull func() v0.13.0 Jan 1, 2020 Changes in this version + const Selected + var StdTTY = NewTTY(os.Stdin, os.Stderr) + func Left(s ListBoxState) int + func ModeLine(content string, space bool) ui.Text + func ModePrompt(content string, space bool) func() ui.Text + func Next(s ListBoxState) int + func NextPage(s ListBoxState) int + func NextWrap(s ListBoxState) int + func Prev(s ListBoxState) int + func PrevPage(s ListBoxState) int + func PrevWrap(s ListBoxState) int + func Right(s ListBoxState) int + func SetAddon(a App, addon Widget) + func SetCodeBuffer(a App, buf CodeBuffer) + func TestHandle(t *testing.T, tests []HandleTest) + func TestRender(t *testing.T, tests []RenderTest) + func WriteListing(b *term.BufferBuilder, name, filter string, lines ...string) + type App interface + CodeArea func() CodeArea + CommitCode func() + CommitEOF func() + CopyState func() State + MutateState func(f func(*State)) + Notify func(note string) + ReadCode func() (string, error) + Redraw func() + func NewApp(spec AppSpec) App + type AppSpec struct + Abbreviations func(f func(abbr, full string)) + AfterReadline []func(string) + BeforeReadline []func() + CodeAreaState CodeAreaState + Highlighter Highlighter + MaxHeight func() int + OverlayHandler Handler + Prompt Prompt + QuotePaste func() bool + RPrompt Prompt + RPromptPersistent func() bool + State State + TTY TTY + type CodeArea interface + CopyState func() CodeAreaState + MutateState func(f func(*CodeAreaState)) + Submit func() + func NewCodeArea(spec CodeAreaSpec) CodeArea + type CodeAreaSpec struct + Abbreviations func(f func(abbr, full string)) + Highlighter func(code string) (ui.Text, []error) + OnSubmit func() + OverlayHandler Handler + Prompt func() ui.Text + QuotePaste func() bool + RPrompt func() ui.Text + State CodeAreaState + type CodeAreaState struct + Buffer CodeBuffer + HideRPrompt bool + Pending PendingCode + func (s *CodeAreaState) ApplyPending() + type CodeBuffer struct + Content string + Dot int + func GetCodeBuffer(a App) CodeBuffer + func (c *CodeBuffer) InsertAtDot(text string) + type ColView interface + CopyState func() ColViewState + Left func() + MutateState func(f func(*ColViewState)) + Right func() + func NewColView(spec ColViewSpec) ColView + type ColViewSpec struct + OnLeft func(w ColView) + OnRight func(w ColView) + OverlayHandler Handler + State ColViewState + Weights func(n int) []int + type ColViewState struct + Columns []Widget + FocusColumn int + type ComboBox interface + CodeArea func() CodeArea + ListBox func() ListBox + Refilter func() + func NewComboBox(spec ComboBoxSpec) ComboBox + type ComboBoxSpec struct + CodeArea CodeAreaSpec + ListBox ListBoxSpec + OnFilter func(ComboBox, string) + type DummyHandler struct + func (DummyHandler) Handle(term.Event) bool + type Empty struct + func (Empty) Handle(event term.Event) bool + func (Empty) Render(width, height int) *term.Buffer + type Focuser interface + Focus func() bool + type FuncHandler func(term.Event) bool + func (f FuncHandler) Handle(event term.Event) bool + type HScrollbar struct + High int + Low int + Total int + func (h HScrollbar) Render(width, height int) *term.Buffer + type HandleTest struct + Event term.Event + Events []term.Event + Given Handler + Name string + WantNewState interface{} + WantUnhandled bool + type Handler interface + Handle func(event term.Event) bool + type Highlighter interface + Get func(code string) (ui.Text, []error) + LateUpdates func() <-chan struct{} + type Items interface + Len func() int + Show func(i int) ui.Text + type Label struct + Content ui.Text + func (l Label) Handle(event term.Event) bool + func (l Label) Render(width, height int) *term.Buffer + type ListBox interface + Accept func() + CopyState func() ListBoxState + Reset func(it Items, selected int) + Select func(f func(ListBoxState) int) + func NewListBox(spec ListBoxSpec) ListBox + type ListBoxSpec struct + ExtendStyle bool + Horizontal bool + OnAccept func(it Items, i int) + OnSelect func(it Items, i int) + OverlayHandler Handler + Padding int + Placeholder ui.Text + State ListBoxState + type ListBoxState struct + First int + Height int + Items Items + Selected int + type MapHandler map[term.Event]func() + func (m MapHandler) Handle(event term.Event) bool + type PendingCode struct + Content string + From int + To int + type Prompt interface + Get func() ui.Text + LateUpdates func() <-chan struct{} + Trigger func(force bool) + func NewConstPrompt(t ui.Text) Prompt + type RenderTest struct + Given Renderer + Height int + Name string + Want interface{ ... } + Width int + type Renderer interface + Render func(width, height int) *term.Buffer + type State struct + Addon Widget + Notes []string + type TTY interface + Buffer func() *term.Buffer + NotifySignals func() <-chan os.Signal + ReadEvent func() (term.Event, error) + ResetBuffer func() + SetRawInput func(n int) + Setup func() (restore func(), err error) + Size func() (h, w int) + StopInput func() + StopSignals func() + UpdateBuffer func(bufNotes, bufMain *term.Buffer, full bool) error + func NewTTY(in, out *os.File) TTY + type TestItems struct + NItems int + Prefix string + Style ui.Styling + func (it TestItems) Len() int + func (it TestItems) Show(i int) ui.Text + type TextView interface + CopyState func() TextViewState + MutateState func(f func(*TextViewState)) + ScrollBy func(delta int) + func NewTextView(spec TextViewSpec) TextView + type TextViewSpec struct + OverlayHandler Handler + Scrollable bool + State TextViewState + type TextViewState struct + First int + Lines []string + type VScrollbar struct + High int + Low int + Total int + func (v VScrollbar) Render(width, height int) *term.Buffer + type VScrollbarContainer struct + Content Renderer + Scrollbar VScrollbar + func (v VScrollbarContainer) Render(width, height int) *term.Buffer + type Widget interface + func Addon(a App) Widget