Versions in this module Expand all Collapse all v1 v1.1.0 Feb 25, 2024 Changes in this version + const AlignCenter + const AlignLeft + const AlignRight + const BoxDrawingsDoubleDownAndHorizontal + const BoxDrawingsDoubleDownAndLeft + const BoxDrawingsDoubleDownAndRight + const BoxDrawingsDoubleHorizontal + const BoxDrawingsDoubleUpAndHorizontal + const BoxDrawingsDoubleUpAndLeft + const BoxDrawingsDoubleUpAndRight + const BoxDrawingsDoubleVertical + const BoxDrawingsDoubleVerticalAndHorizontal + const BoxDrawingsDoubleVerticalAndLeft + const BoxDrawingsDoubleVerticalAndRight + const BoxDrawingsDownDoubleAndHorizontalSingle + const BoxDrawingsDownDoubleAndLeftSingle + const BoxDrawingsDownDoubleAndRightSingle + const BoxDrawingsDownHeacyAndRightUpLight + const BoxDrawingsDownHeavyAndHorizontalLight + const BoxDrawingsDownHeavyAndLeftLight + const BoxDrawingsDownHeavyAndLeftUpLight + const BoxDrawingsDownHeavyAndRightLight + const BoxDrawingsDownHeavyAndUpHorizontalLight + const BoxDrawingsDownLighAndLeftHeavy + const BoxDrawingsDownLighAndRightHeavy + const BoxDrawingsDownLightAnbdRightUpHeavy + const BoxDrawingsDownLightAndHorizontalHeavy + const BoxDrawingsDownLightAndLeftUpHeavy + const BoxDrawingsDownLightAndUpHorizontalHeavy + const BoxDrawingsDownSingleAndHorizontalDouble + const BoxDrawingsDownSingleAndLeftDouble + const BoxDrawingsDownSingleAndRightDouble + const BoxDrawingsHeavyDoubleDashHorizontal + const BoxDrawingsHeavyDoubleDashVertical + const BoxDrawingsHeavyDown + const BoxDrawingsHeavyDownAndHorizontal + const BoxDrawingsHeavyDownAndLeft + const BoxDrawingsHeavyDownAndRight + const BoxDrawingsHeavyHorizontal + const BoxDrawingsHeavyLeft + const BoxDrawingsHeavyLeftAndLightRight + const BoxDrawingsHeavyQuadrupleDashHorizontal + const BoxDrawingsHeavyQuadrupleDashVertical + const BoxDrawingsHeavyRight + const BoxDrawingsHeavyTripleDashHorizontal + const BoxDrawingsHeavyTripleDashVertical + const BoxDrawingsHeavyUp + const BoxDrawingsHeavyUpAndHorizontal + const BoxDrawingsHeavyUpAndLeft + const BoxDrawingsHeavyUpAndLightDown + const BoxDrawingsHeavyUpAndRight + const BoxDrawingsHeavyVertical + const BoxDrawingsHeavyVerticalAndHorizontal + const BoxDrawingsHeavyVerticalAndLeft + const BoxDrawingsHeavyVerticalAndRight + const BoxDrawingsLeftDownHeavyAndRightUpLight + const BoxDrawingsLeftHeavyAndRightDownLight + const BoxDrawingsLeftHeavyAndRightUpLight + const BoxDrawingsLeftHeavyAndRightVerticalLight + const BoxDrawingsLeftLightAndRightDownHeavy + const BoxDrawingsLeftLightAndRightUpHeavy + const BoxDrawingsLeftLightAndRightVerticalHeavy + const BoxDrawingsLeftUpHeavyAndRightDownLight + const BoxDrawingsLightArcDownAndLeft + const BoxDrawingsLightArcDownAndRight + const BoxDrawingsLightArcUpAndLeft + const BoxDrawingsLightArcUpAndRight + const BoxDrawingsLightDiagonalCross + const BoxDrawingsLightDiagonalUpperLeftToLowerRight + const BoxDrawingsLightDiagonalUpperRightToLowerLeft + const BoxDrawingsLightDoubleDashHorizontal + const BoxDrawingsLightDoubleDashVertical + const BoxDrawingsLightDown + const BoxDrawingsLightDownAndHorizontal + const BoxDrawingsLightDownAndLeft + const BoxDrawingsLightDownAndRight + const BoxDrawingsLightHorizontal + const BoxDrawingsLightLeft + const BoxDrawingsLightLeftAndHeavyRight + const BoxDrawingsLightQuadrupleDashHorizontal + const BoxDrawingsLightQuadrupleDashVertical + const BoxDrawingsLightRight + const BoxDrawingsLightTripleDashHorizontal + const BoxDrawingsLightTripleDashVertical + const BoxDrawingsLightUp + const BoxDrawingsLightUpAndHeavyDown + const BoxDrawingsLightUpAndHorizontal + const BoxDrawingsLightUpAndLeft + const BoxDrawingsLightUpAndRight + const BoxDrawingsLightVertical + const BoxDrawingsLightVerticalAndHorizontal + const BoxDrawingsLightVerticalAndLeft + const BoxDrawingsLightVerticalAndRight + const BoxDrawingsRightDownHeavyAndLeftUpLight + const BoxDrawingsRightHeavyAndLeftDownLight + const BoxDrawingsRightHeavyAndLeftUpLight + const BoxDrawingsRightHeavyAndLeftVerticalLight + const BoxDrawingsRightLightAndLeftDownHeavy + const BoxDrawingsRightLightAndLeftUpHeavy + const BoxDrawingsRightLightAndLeftVerticalHeavy + const BoxDrawingsRightUpHeavyAndLeftDownLight + const BoxDrawingsUpDobuleAndLeftSingle + const BoxDrawingsUpDoubleAndHorizontalSingle + const BoxDrawingsUpDoubleAndRightSingle + const BoxDrawingsUpHeavyAndDownHorizontalLight + const BoxDrawingsUpHeavyAndHorizontalLight + const BoxDrawingsUpHeavyAndLeftDownLight + const BoxDrawingsUpHeavyAndLeftLight + const BoxDrawingsUpHeavyAndRightDownLight + const BoxDrawingsUpHeavyAndRightLight + const BoxDrawingsUpLightAndDownHorizontalHeavy + const BoxDrawingsUpLightAndHorizontalHeavy + const BoxDrawingsUpLightAndLeftDownHeavy + const BoxDrawingsUpLightAndLeftHeavy + const BoxDrawingsUpLightAndRightDownHeavy + const BoxDrawingsUpLightAndRightHeavy + const BoxDrawingsUpSingleAndHorizontalDouble + const BoxDrawingsUpSingleAndLeftDouble + const BoxDrawingsUpSingleAndRightDouble + const BoxDrawingsVerticalDoubleAndHorizontalSingle + const BoxDrawingsVerticalDoubleAndLeftSingle + const BoxDrawingsVerticalDoubleAndRightSingle + const BoxDrawingsVerticalHeavyAndHorizontalLight + const BoxDrawingsVerticalHeavyAndRightLight + const BoxDrawingsVerticalLightAndHorizontalHeavy + const BoxDrawingsVerticalLightAndLeftHeavy + const BoxDrawingsVerticalLightAndRightHeavy + const BoxDrawingsVerticalSingleAndHorizontalDouble + const BoxDrawingsVerticalSingleAndLeftDouble + const BoxDrawingsVerticalSingleAndRightDouble + const BoxDrawingsVerticalheavyAndLeftLight + const FlexColumn + const FlexRow + const SemigraphicsHorizontalEllipsis + const StandardDoubleClick + var Borders = struct{ ... } + var ColorUnset = tcell.ColorSpecial | 108 + var DefaultFormFieldWidth = 10 + var InputFieldFloat func(text string, ch rune) bool + var InputFieldInteger func(text string, ch rune) bool + var InputFieldMaxLength func(maxLength int) func(text string, ch rune) bool + var Keys = Key + var ScrollBarArea = []byte("[-:-:-]â–‘") + var ScrollBarAreaFocused = []byte("[-:-:-]â–’") + var ScrollBarHandle = []byte("[-:-:-]â–“") + var ScrollBarHandleFocused = []byte("[::r] [-:-:-]") + var SemigraphicJoints = map[string]rune + var Styles = Theme + var TabSize = 4 + var TrueColorTags = false + func ANSIWriter(writer io.Writer) io.Writer + func ColorHex(c tcell.Color) string + func Escape(text string) string + func EscapeBytes(text []byte) []byte + func HitShortcut(event *tcell.EventKey, keybindings ...[]string) bool + func Print(screen tcell.Screen, text []byte, x, y, maxWidth, align int, color tcell.Color) (int, int) + func PrintJoinedSemigraphics(screen tcell.Screen, x, y int, ch rune, color tcell.Color) + func PrintSimple(screen tcell.Screen, text []byte, x, y int) + func PrintStyle(screen tcell.Screen, text []byte, x, y, maxWidth, align int, style tcell.Style) (int, int) + func RenderScrollBar(screen tcell.Screen, visibility ScrollBarVisibility, x int, y int, height int, ...) + func SetAttributes(style tcell.Style, attrs tcell.AttrMask) tcell.Style + func StripTags(text []byte, colors bool, regions bool) []byte + func TaggedStringWidth(text string) int + func TaggedTextWidth(text []byte) int + func TranslateANSI(text string) string + func WordWrap(text string, width int) (lines []string) + type Application struct + func NewApplication() *Application + func (a *Application) Draw(p ...Primitive) + func (a *Application) EnableBracketedPaste(enable bool) + func (a *Application) EnableMouse(enable bool) + func (a *Application) GetAfterDrawFunc() func(screen tcell.Screen) + func (a *Application) GetAfterResizeFunc() func(width int, height int) + func (a *Application) GetBeforeDrawFunc() func(screen tcell.Screen) bool + func (a *Application) GetFocus() Primitive + func (a *Application) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey + func (a *Application) GetMouseCapture() ... + func (a *Application) GetScreen() tcell.Screen + func (a *Application) GetScreenSize() (width, height int) + func (a *Application) HandlePanic() + func (a *Application) Init() error + func (a *Application) QueueEvent(event tcell.Event) + func (a *Application) QueueUpdate(f func()) + func (a *Application) QueueUpdateDraw(f func(), p ...Primitive) + func (a *Application) ResizeToFullScreen(p Primitive) + func (a *Application) RingBell() + func (a *Application) Run() error + func (a *Application) SetAfterDrawFunc(handler func(screen tcell.Screen)) + func (a *Application) SetAfterFocusFunc(handler func(p Primitive)) + func (a *Application) SetAfterResizeFunc(handler func(width int, height int)) + func (a *Application) SetBeforeDrawFunc(handler func(screen tcell.Screen) bool) + func (a *Application) SetBeforeFocusFunc(handler func(p Primitive) bool) + func (a *Application) SetDoubleClickInterval(interval time.Duration) + func (a *Application) SetFocus(p Primitive) + func (a *Application) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) + func (a *Application) SetMouseCapture(...) + func (a *Application) SetRoot(root Primitive, fullscreen bool) + func (a *Application) SetScreen(screen tcell.Screen) + func (a *Application) Stop() + func (a *Application) Suspend(f func()) bool + type Box struct + func NewBox() *Box + func (b *Box) Blur() + func (b *Box) Draw(screen tcell.Screen) + func (b *Box) Focus(delegate func(p Primitive)) + func (b *Box) GetBackgroundColor() tcell.Color + func (b *Box) GetBorder() bool + func (b *Box) GetDrawFunc() func(screen tcell.Screen, x, y, width, height int) (int, int, int, int) + func (b *Box) GetFocusable() Focusable + func (b *Box) GetInnerRect() (int, int, int, int) + func (b *Box) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey + func (b *Box) GetMouseCapture() ... + func (b *Box) GetPadding() (top, bottom, left, right int) + func (b *Box) GetRect() (int, int, int, int) + func (b *Box) GetTitle() string + func (b *Box) GetVisible() bool + func (b *Box) HasFocus() bool + func (b *Box) InRect(x, y int) bool + func (b *Box) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (b *Box) MouseHandler() ... + func (b *Box) SetBackgroundColor(color tcell.Color) + func (b *Box) SetBackgroundTransparent(transparent bool) + func (b *Box) SetBorder(show bool) + func (b *Box) SetBorderAttributes(attr tcell.AttrMask) + func (b *Box) SetBorderColor(color tcell.Color) + func (b *Box) SetBorderColorFocused(color tcell.Color) + func (b *Box) SetDrawFunc(...) + func (b *Box) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) + func (b *Box) SetMouseCapture(...) + func (b *Box) SetPadding(top, bottom, left, right int) + func (b *Box) SetRect(x, y, width, height int) + func (b *Box) SetTitle(title string) + func (b *Box) SetTitleAlign(align int) + func (b *Box) SetTitleColor(color tcell.Color) + func (b *Box) SetVisible(v bool) + func (b *Box) ShowFocus(showFocus bool) + func (b *Box) WrapInputHandler(inputHandler func(*tcell.EventKey, func(p Primitive))) func(*tcell.EventKey, func(p Primitive)) + func (b *Box) WrapMouseHandler(...) ... + type Button struct + func NewButton(label string) *Button + func (b *Button) Draw(screen tcell.Screen) + func (b *Button) GetLabel() string + func (b *Button) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (b *Button) MouseHandler() ... + func (b *Button) SetBackgroundColorFocused(color tcell.Color) + func (b *Button) SetBlurFunc(handler func(key tcell.Key)) + func (b *Button) SetCursorRune(rune rune) + func (b *Button) SetLabel(label string) + func (b *Button) SetLabelColor(color tcell.Color) + func (b *Button) SetLabelColorFocused(color tcell.Color) + func (b *Button) SetSelectedFunc(handler func()) + type CheckBox struct + func NewCheckBox() *CheckBox + func (c *CheckBox) Draw(screen tcell.Screen) + func (c *CheckBox) GetFieldHeight() int + func (c *CheckBox) GetFieldWidth() int + func (c *CheckBox) GetLabel() string + func (c *CheckBox) GetMessage() string + func (c *CheckBox) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (c *CheckBox) IsChecked() bool + func (c *CheckBox) MouseHandler() ... + func (c *CheckBox) SetChangedFunc(handler func(checked bool)) + func (c *CheckBox) SetChecked(checked bool) + func (c *CheckBox) SetCheckedRune(rune rune) + func (c *CheckBox) SetCursorRune(rune rune) + func (c *CheckBox) SetDoneFunc(handler func(key tcell.Key)) + func (c *CheckBox) SetFieldBackgroundColor(color tcell.Color) + func (c *CheckBox) SetFieldBackgroundColorFocused(color tcell.Color) + func (c *CheckBox) SetFieldTextColor(color tcell.Color) + func (c *CheckBox) SetFieldTextColorFocused(color tcell.Color) + func (c *CheckBox) SetFinishedFunc(handler func(key tcell.Key)) + func (c *CheckBox) SetLabel(label string) + func (c *CheckBox) SetLabelColor(color tcell.Color) + func (c *CheckBox) SetLabelColorFocused(color tcell.Color) + func (c *CheckBox) SetLabelWidth(width int) + func (c *CheckBox) SetMessage(message string) + type ContextMenu struct + func NewContextMenu(parent Primitive) *ContextMenu + func (c *ContextMenu) AddContextItem(text string, shortcut rune, selected func(index int)) + func (c *ContextMenu) ClearContextMenu() + func (c *ContextMenu) ContextMenuList() *List + func (c *ContextMenu) ContextMenuVisible() bool + func (c *ContextMenu) HideContextMenu(setFocus func(Primitive)) + func (c *ContextMenu) SetContextSelectedFunc(handler func(index int, text string, shortcut rune)) + func (c *ContextMenu) ShowContextMenu(item int, x int, y int, setFocus func(Primitive)) + type DropDown struct + func NewDropDown() *DropDown + func (d *DropDown) AddOptions(options ...*DropDownOption) + func (d *DropDown) AddOptionsSimple(options ...string) + func (d *DropDown) Draw(screen tcell.Screen) + func (d *DropDown) Focus(delegate func(p Primitive)) + func (d *DropDown) GetCurrentOption() (int, *DropDownOption) + func (d *DropDown) GetFieldHeight() int + func (d *DropDown) GetFieldWidth() int + func (d *DropDown) GetLabel() string + func (d *DropDown) HasFocus() bool + func (d *DropDown) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (d *DropDown) MouseHandler() ... + func (d *DropDown) SetAlwaysDrawDropDownSymbol(alwaysDraw bool) + func (d *DropDown) SetChangedFunc(handler func(index int, option *DropDownOption)) + func (d *DropDown) SetCurrentOption(index int) + func (d *DropDown) SetDoneFunc(handler func(key tcell.Key)) + func (d *DropDown) SetDropDownBackgroundColor(color tcell.Color) + func (d *DropDown) SetDropDownOpenSymbolRune(symbol rune) + func (d *DropDown) SetDropDownSelectedBackgroundColor(color tcell.Color) + func (d *DropDown) SetDropDownSelectedSymbolRune(symbol rune) + func (d *DropDown) SetDropDownSelectedTextColor(color tcell.Color) + func (d *DropDown) SetDropDownSymbolRune(symbol rune) + func (d *DropDown) SetDropDownTextColor(color tcell.Color) + func (d *DropDown) SetFieldBackgroundColor(color tcell.Color) + func (d *DropDown) SetFieldBackgroundColorFocused(color tcell.Color) + func (d *DropDown) SetFieldTextColor(color tcell.Color) + func (d *DropDown) SetFieldTextColorFocused(color tcell.Color) + func (d *DropDown) SetFieldWidth(width int) + func (d *DropDown) SetFinishedFunc(handler func(key tcell.Key)) + func (d *DropDown) SetLabel(label string) + func (d *DropDown) SetLabelColor(color tcell.Color) + func (d *DropDown) SetLabelColorFocused(color tcell.Color) + func (d *DropDown) SetLabelWidth(width int) + func (d *DropDown) SetOptions(selected func(index int, option *DropDownOption), options ...*DropDownOption) + func (d *DropDown) SetOptionsSimple(selected func(index int, option *DropDownOption), options ...string) + func (d *DropDown) SetPrefixTextColor(color tcell.Color) + func (d *DropDown) SetSelectedFunc(handler func(index int, option *DropDownOption)) + func (d *DropDown) SetTextOptions(prefix, suffix, currentPrefix, currentSuffix, noSelection string) + type DropDownOption struct + func NewDropDownOption(text string) *DropDownOption + func (d *DropDownOption) GetReference() interface{} + func (d *DropDownOption) GetText() string + func (d *DropDownOption) SetReference(reference interface{}) + func (d *DropDownOption) SetSelectedFunc(handler func(index int, option *DropDownOption)) + func (d *DropDownOption) SetText(text string) + type Flex struct + func NewFlex() *Flex + func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) + func (f *Flex) AddItemAtIndex(index int, item Primitive, fixedSize, proportion int, focus bool) + func (f *Flex) Draw(screen tcell.Screen) + func (f *Flex) Focus(delegate func(p Primitive)) + func (f *Flex) GetDirection() int + func (f *Flex) HasFocus() bool + func (f *Flex) MouseHandler() ... + func (f *Flex) RemoveItem(p Primitive) + func (f *Flex) ResizeItem(p Primitive, fixedSize, proportion int) + func (f *Flex) SetDirection(direction int) + func (f *Flex) SetFullScreen(fullScreen bool) + type FocusManager struct + func NewFocusManager(setFocus func(p Primitive)) *FocusManager + func (f *FocusManager) Add(p ...Primitive) + func (f *FocusManager) AddAt(index int, p Primitive) + func (f *FocusManager) Focus(p Primitive) + func (f *FocusManager) FocusAt(index int) + func (f *FocusManager) FocusNext() + func (f *FocusManager) FocusPrevious() + func (f *FocusManager) GetFocusIndex() int + func (f *FocusManager) GetFocusedPrimitive() Primitive + func (f *FocusManager) SetWrapAround(wrapAround bool) + func (f *FocusManager) Transform(tr Transformation) + type Focusable interface + HasFocus func() bool + type Form struct + func NewForm() *Form + func (f *Form) AddButton(label string, selected func()) + func (f *Form) AddCheckBox(label string, message string, checked bool, changed func(checked bool)) + func (f *Form) AddDropDown(label string, initialOption int, ...) + func (f *Form) AddDropDownSimple(label string, initialOption int, ...) + func (f *Form) AddFormItem(item FormItem) + func (f *Form) AddInputField(label, value string, fieldWidth int, ...) + func (f *Form) AddPasswordField(label, value string, fieldWidth int, mask rune, changed func(text string)) + func (f *Form) AddSlider(label string, current, max, increment int, changed func(value int)) + func (f *Form) Clear(includeButtons bool) + func (f *Form) ClearButtons() + func (f *Form) Draw(screen tcell.Screen) + func (f *Form) Focus(delegate func(p Primitive)) + func (f *Form) GetAttributes() *FormItemAttributes + func (f *Form) GetButton(index int) *Button + func (f *Form) GetButtonCount() int + func (f *Form) GetButtonIndex(label string) int + func (f *Form) GetFocusedItemIndex() (formItem, button int) + func (f *Form) GetFormItem(index int) FormItem + func (f *Form) GetFormItemByLabel(label string) FormItem + func (f *Form) GetFormItemCount() int + func (f *Form) GetFormItemIndex(label string) int + func (f *Form) HasFocus() bool + func (f *Form) IndexOfFormItem(item FormItem) int + func (f *Form) MouseHandler() ... + func (f *Form) RemoveButton(index int) + func (f *Form) RemoveFormItem(index int) + func (f *Form) SetButtonBackgroundColor(color tcell.Color) + func (f *Form) SetButtonBackgroundColorFocused(color tcell.Color) + func (f *Form) SetButtonTextColor(color tcell.Color) + func (f *Form) SetButtonTextColorFocused(color tcell.Color) + func (f *Form) SetButtonsAlign(align int) + func (f *Form) SetCancelFunc(callback func()) + func (f *Form) SetFieldBackgroundColor(color tcell.Color) + func (f *Form) SetFieldBackgroundColorFocused(color tcell.Color) + func (f *Form) SetFieldTextColor(color tcell.Color) + func (f *Form) SetFieldTextColorFocused(color tcell.Color) + func (f *Form) SetFocus(index int) + func (f *Form) SetHorizontal(horizontal bool) + func (f *Form) SetItemPadding(padding int) + func (f *Form) SetLabelColor(color tcell.Color) + func (f *Form) SetLabelColorFocused(color tcell.Color) + func (f *Form) SetWrapAround(wrapAround bool) + type FormItem interface + GetFieldHeight func() int + GetFieldWidth func() int + GetLabel func() string + SetBackgroundColor func(tcell.Color) + SetFieldBackgroundColor func(tcell.Color) + SetFieldBackgroundColorFocused func(tcell.Color) + SetFieldTextColor func(tcell.Color) + SetFieldTextColorFocused func(tcell.Color) + SetFinishedFunc func(func(key tcell.Key)) + SetLabelColor func(tcell.Color) + SetLabelColorFocused func(tcell.Color) + SetLabelWidth func(int) + type FormItemAttributes struct + BackgroundColor tcell.Color + FieldBackgroundColor tcell.Color + FieldBackgroundColorFocused tcell.Color + FieldTextColor tcell.Color + FieldTextColorFocused tcell.Color + FinishedFunc func(key tcell.Key) + LabelColor tcell.Color + LabelColorFocused tcell.Color + LabelWidth int + type Frame struct + func NewFrame(primitive Primitive) *Frame + func (f *Frame) AddText(text string, header bool, align int, color tcell.Color) + func (f *Frame) Clear() + func (f *Frame) Draw(screen tcell.Screen) + func (f *Frame) Focus(delegate func(p Primitive)) + func (f *Frame) HasFocus() bool + func (f *Frame) MouseHandler() ... + func (f *Frame) SetBorders(top, bottom, header, footer, left, right int) + type Grid struct + func NewGrid() *Grid + func (g *Grid) AddItem(p Primitive, row, column, rowSpan, colSpan, minGridHeight, minGridWidth int, ...) + func (g *Grid) Blur() + func (g *Grid) Clear() + func (g *Grid) Draw(screen tcell.Screen) + func (g *Grid) Focus(delegate func(p Primitive)) + func (g *Grid) GetOffset() (rows, columns int) + func (g *Grid) HasFocus() bool + func (g *Grid) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (g *Grid) MouseHandler() ... + func (g *Grid) RemoveItem(p Primitive) + func (g *Grid) SetBorders(borders bool) + func (g *Grid) SetBordersColor(color tcell.Color) + func (g *Grid) SetColumns(columns ...int) + func (g *Grid) SetGap(row, column int) + func (g *Grid) SetMinSize(row, column int) + func (g *Grid) SetOffset(rows, columns int) + func (g *Grid) SetRows(rows ...int) + func (g *Grid) SetSize(numRows, numColumns, rowSize, columnSize int) + type InputField struct + func NewInputField() *InputField + func (i *InputField) Autocomplete() + func (i *InputField) Draw(screen tcell.Screen) + func (i *InputField) GetCursorPosition() int + func (i *InputField) GetFieldHeight() int + func (i *InputField) GetFieldWidth() int + func (i *InputField) GetLabel() string + func (i *InputField) GetText() string + func (i *InputField) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (i *InputField) MouseHandler() ... + func (i *InputField) ResetFieldNote() + func (i *InputField) SetAcceptanceFunc(handler func(textToCheck string, lastChar rune) bool) + func (i *InputField) SetAutocompleteFunc(callback func(currentText string) (entries []*ListItem)) + func (i *InputField) SetAutocompleteListBackgroundColor(color tcell.Color) + func (i *InputField) SetAutocompleteListSelectedBackgroundColor(color tcell.Color) + func (i *InputField) SetAutocompleteListSelectedTextColor(color tcell.Color) + func (i *InputField) SetAutocompleteListTextColor(color tcell.Color) + func (i *InputField) SetAutocompleteSuggestionTextColor(color tcell.Color) + func (i *InputField) SetChangedFunc(handler func(text string)) + func (i *InputField) SetCursorPosition(cursorPos int) + func (i *InputField) SetDoneFunc(handler func(key tcell.Key)) + func (i *InputField) SetFieldBackgroundColor(color tcell.Color) + func (i *InputField) SetFieldBackgroundColorFocused(color tcell.Color) + func (i *InputField) SetFieldNote(note string) + func (i *InputField) SetFieldNoteTextColor(color tcell.Color) + func (i *InputField) SetFieldTextColor(color tcell.Color) + func (i *InputField) SetFieldTextColorFocused(color tcell.Color) + func (i *InputField) SetFieldWidth(width int) + func (i *InputField) SetFinishedFunc(handler func(key tcell.Key)) + func (i *InputField) SetLabel(label string) + func (i *InputField) SetLabelColor(color tcell.Color) + func (i *InputField) SetLabelColorFocused(color tcell.Color) + func (i *InputField) SetLabelWidth(width int) + func (i *InputField) SetMaskCharacter(mask rune) + func (i *InputField) SetPlaceholder(text string) + func (i *InputField) SetPlaceholderTextColor(color tcell.Color) + func (i *InputField) SetPlaceholderTextColorFocused(color tcell.Color) + func (i *InputField) SetText(text string) + type Key struct + Cancel []string + MoveDown []string + MoveDown2 []string + MoveFirst []string + MoveFirst2 []string + MoveLast []string + MoveLast2 []string + MoveLeft []string + MoveLeft2 []string + MoveNextField []string + MoveNextPage []string + MovePreviousField []string + MovePreviousPage []string + MoveRight []string + MoveRight2 []string + MoveUp []string + MoveUp2 []string + Select []string + Select2 []string + ShowContextMenu []string + type List struct + func NewList() *List + func (l *List) AddItem(item *ListItem) + func (l *List) Clear() + func (l *List) Draw(screen tcell.Screen) + func (l *List) FindItems(mainSearch, secondarySearch string, mustContainBoth, ignoreCase bool) (indices []int) + func (l *List) Focus(delegate func(p Primitive)) + func (l *List) GetCurrentItem() *ListItem + func (l *List) GetCurrentItemIndex() int + func (l *List) GetItem(index int) *ListItem + func (l *List) GetItemCount() int + func (l *List) GetItemText(index int) (main, secondary string) + func (l *List) GetItems() []*ListItem + func (l *List) GetOffset() (int, int) + func (l *List) HasFocus() bool + func (l *List) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (l *List) InsertItem(index int, item *ListItem) + func (l *List) MouseHandler() ... + func (l *List) RemoveItem(index int) + func (l *List) SetChangedFunc(handler func(index int, item *ListItem)) + func (l *List) SetCurrentItem(index int) + func (l *List) SetDoneFunc(handler func()) + func (l *List) SetHighlightFullLine(highlight bool) + func (l *List) SetHover(hover bool) + func (l *List) SetIndicators(selectedPrefix, selectedSuffix, unselectedPrefix, unselectedSuffix string) + func (l *List) SetItemEnabled(index int, enabled bool) + func (l *List) SetItemText(index int, main, secondary string) + func (l *List) SetMainTextColor(color tcell.Color) + func (l *List) SetOffset(items, columns int) + func (l *List) SetScrollBarColor(color tcell.Color) + func (l *List) SetScrollBarVisibility(visibility ScrollBarVisibility) + func (l *List) SetSecondaryTextColor(color tcell.Color) + func (l *List) SetSelectedAlwaysCentered(alwaysCentered bool) + func (l *List) SetSelectedAlwaysVisible(alwaysVisible bool) + func (l *List) SetSelectedBackgroundColor(color tcell.Color) + func (l *List) SetSelectedFocusOnly(focusOnly bool) + func (l *List) SetSelectedFunc(handler func(int, *ListItem)) + func (l *List) SetSelectedTextAttributes(attr tcell.AttrMask) + func (l *List) SetSelectedTextColor(color tcell.Color) + func (l *List) SetShortcutColor(color tcell.Color) + func (l *List) SetWrapAround(wrapAround bool) + func (l *List) ShowSecondaryText(show bool) + func (l *List) Transform(tr Transformation) + type ListItem struct + func NewListItem(mainText string) *ListItem + func (l *ListItem) GetMainBytes() []byte + func (l *ListItem) GetMainText() string + func (l *ListItem) GetReference() interface{} + func (l *ListItem) GetSecondaryBytes() []byte + func (l *ListItem) GetSecondaryText() string + func (l *ListItem) GetShortcut() rune + func (l *ListItem) SetMainBytes(val []byte) + func (l *ListItem) SetMainText(val string) + func (l *ListItem) SetReference(val interface{}) + func (l *ListItem) SetSecondaryBytes(val []byte) + func (l *ListItem) SetSecondaryText(val string) + func (l *ListItem) SetSelectedFunc(handler func()) + func (l *ListItem) SetShortcut(val rune) + type Modal struct + func NewModal() *Modal + func (m *Modal) AddButtons(labels []string) + func (m *Modal) ClearButtons() + func (m *Modal) Draw(screen tcell.Screen) + func (m *Modal) Focus(delegate func(p Primitive)) + func (m *Modal) GetForm() *Form + func (m *Modal) GetFrame() *Frame + func (m *Modal) HasFocus() bool + func (m *Modal) MouseHandler() ... + func (m *Modal) SetBackgroundColor(color tcell.Color) + func (m *Modal) SetButtonBackgroundColor(color tcell.Color) + func (m *Modal) SetButtonTextColor(color tcell.Color) + func (m *Modal) SetButtonsAlign(align int) + func (m *Modal) SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) + func (m *Modal) SetFocus(index int) + func (m *Modal) SetText(text string) + func (m *Modal) SetTextAlign(align int) + func (m *Modal) SetTextColor(color tcell.Color) + type MouseAction int16 + const MouseLeftClick + const MouseLeftDoubleClick + const MouseLeftDown + const MouseLeftUp + const MouseMiddleClick + const MouseMiddleDoubleClick + const MouseMiddleDown + const MouseMiddleUp + const MouseMove + const MouseRightClick + const MouseRightDoubleClick + const MouseRightDown + const MouseRightUp + const MouseScrollDown + const MouseScrollLeft + const MouseScrollRight + const MouseScrollUp + type Panels struct + func NewPanels() *Panels + func (p *Panels) AddPanel(name string, item Primitive, resize, visible bool) + func (p *Panels) Draw(screen tcell.Screen) + func (p *Panels) Focus(delegate func(p Primitive)) + func (p *Panels) GetFrontPanel() (name string, item Primitive) + func (p *Panels) GetPanelCount() int + func (p *Panels) HasFocus() bool + func (p *Panels) HasPanel(name string) bool + func (p *Panels) HidePanel(name string) + func (p *Panels) MouseHandler() ... + func (p *Panels) RemovePanel(name string) + func (p *Panels) SendToBack(name string) + func (p *Panels) SendToFront(name string) + func (p *Panels) SetChangedFunc(handler func()) + func (p *Panels) SetCurrentPanel(name string) + func (p *Panels) ShowPanel(name string) + type Primitive interface + Blur func() + Draw func(screen tcell.Screen) + Focus func(delegate func(p Primitive)) + GetFocusable func() Focusable + GetRect func() (int, int, int, int) + GetVisible func() bool + InputHandler func() func(event *tcell.EventKey, setFocus func(p Primitive)) + MouseHandler func() ... + SetRect func(x, y, width, height int) + SetVisible func(v bool) + type ProgressBar struct + func NewProgressBar() *ProgressBar + func (p *ProgressBar) AddProgress(progress int) + func (p *ProgressBar) Complete() bool + func (p *ProgressBar) Draw(screen tcell.Screen) + func (p *ProgressBar) GetMax() int + func (p *ProgressBar) GetProgress() int + func (p *ProgressBar) SetEmptyColor(empty tcell.Color) + func (p *ProgressBar) SetEmptyRune(empty rune) + func (p *ProgressBar) SetFilledColor(filled tcell.Color) + func (p *ProgressBar) SetFilledRune(filled rune) + func (p *ProgressBar) SetMax(max int) + func (p *ProgressBar) SetProgress(progress int) + func (p *ProgressBar) SetVertical(vertical bool) + type ScrollBarVisibility int + const ScrollBarAlways + const ScrollBarAuto + const ScrollBarNever + type Slider struct + func NewSlider() *Slider + func (s *Slider) Draw(screen tcell.Screen) + func (s *Slider) GetFieldHeight() int + func (s *Slider) GetFieldWidth() int + func (s *Slider) GetLabel() string + func (s *Slider) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (s *Slider) MouseHandler() ... + func (s *Slider) SetChangedFunc(handler func(value int)) + func (s *Slider) SetDoneFunc(handler func(key tcell.Key)) + func (s *Slider) SetFieldBackgroundColor(color tcell.Color) + func (s *Slider) SetFieldBackgroundColorFocused(color tcell.Color) + func (s *Slider) SetFieldTextColor(color tcell.Color) + func (s *Slider) SetFieldTextColorFocused(color tcell.Color) + func (s *Slider) SetFinishedFunc(handler func(key tcell.Key)) + func (s *Slider) SetIncrement(increment int) + func (s *Slider) SetLabel(label string) + func (s *Slider) SetLabelColor(color tcell.Color) + func (s *Slider) SetLabelColorFocused(color tcell.Color) + func (s *Slider) SetLabelWidth(width int) + type TabbedPanels struct + Switcher *TextView + func NewTabbedPanels() *TabbedPanels + func (t *TabbedPanels) AddTab(name, label string, item Primitive) + func (t *TabbedPanels) Draw(screen tcell.Screen) + func (t *TabbedPanels) GetCurrentTab() string + func (t *TabbedPanels) HasTab(name string) bool + func (t *TabbedPanels) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (t *TabbedPanels) MouseHandler() ... + func (t *TabbedPanels) RemoveTab(name string) + func (t *TabbedPanels) SetChangedFunc(handler func()) + func (t *TabbedPanels) SetCurrentTab(name string) + func (t *TabbedPanels) SetTabBackgroundColor(color tcell.Color) + func (t *TabbedPanels) SetTabBackgroundColorFocused(color tcell.Color) + func (t *TabbedPanels) SetTabLabel(name, label string) + func (t *TabbedPanels) SetTabSwitcherAfterContent(after bool) + func (t *TabbedPanels) SetTabSwitcherDivider(start, mid, end string) + func (t *TabbedPanels) SetTabSwitcherHeight(height int) + func (t *TabbedPanels) SetTabSwitcherVertical(vertical bool) + func (t *TabbedPanels) SetTabTextColor(color tcell.Color) + func (t *TabbedPanels) SetTabTextColorFocused(color tcell.Color) + type Table struct + func NewTable() *Table + func (t *Table) Clear() + func (t *Table) Draw(screen tcell.Screen) + func (t *Table) GetCell(row, column int) *TableCell + func (t *Table) GetColumnCount() int + func (t *Table) GetOffset() (row, column int) + func (t *Table) GetRowCount() int + func (t *Table) GetSelectable() (rows, columns bool) + func (t *Table) GetSelection() (row, column int) + func (t *Table) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (t *Table) InsertColumn(column int) + func (t *Table) InsertRow(row int) + func (t *Table) MouseHandler() ... + func (t *Table) RemoveColumn(column int) + func (t *Table) RemoveRow(row int) + func (t *Table) ScrollToBeginning() + func (t *Table) ScrollToEnd() + func (t *Table) Select(row, column int) + func (t *Table) SetBorders(show bool) + func (t *Table) SetBordersColor(color tcell.Color) + func (t *Table) SetCell(row, column int, cell *TableCell) + func (t *Table) SetCellSimple(row, column int, text string) + func (t *Table) SetDoneFunc(handler func(key tcell.Key)) + func (t *Table) SetEvaluateAllRows(all bool) + func (t *Table) SetFixed(rows, columns int) + func (t *Table) SetOffset(row, column int) + func (t *Table) SetScrollBarColor(color tcell.Color) + func (t *Table) SetScrollBarVisibility(visibility ScrollBarVisibility) + func (t *Table) SetSelectable(rows, columns bool) + func (t *Table) SetSelectedFunc(handler func(row, column int)) + func (t *Table) SetSelectedStyle(foregroundColor, backgroundColor tcell.Color, attributes tcell.AttrMask) + func (t *Table) SetSelectionChangedFunc(handler func(row, column int)) + func (t *Table) SetSeparator(separator rune) + func (t *Table) SetSortClicked(sortClicked bool) + func (t *Table) SetSortFunc(sortFunc func(column, i, j int) bool) + func (t *Table) Sort(column int, descending bool) + type TableCell struct + Align int + Attributes tcell.AttrMask + BackgroundColor tcell.Color + Color tcell.Color + Expansion int + MaxWidth int + NotSelectable bool + Reference interface{} + Text []byte + func NewTableCell(text string) *TableCell + func (c *TableCell) GetBytes() []byte + func (c *TableCell) GetLastPosition() (x, y, width int) + func (c *TableCell) GetReference() interface{} + func (c *TableCell) GetText() string + func (c *TableCell) SetAlign(align int) + func (c *TableCell) SetAttributes(attr tcell.AttrMask) + func (c *TableCell) SetBackgroundColor(color tcell.Color) + func (c *TableCell) SetBytes(text []byte) + func (c *TableCell) SetExpansion(expansion int) + func (c *TableCell) SetMaxWidth(maxWidth int) + func (c *TableCell) SetReference(reference interface{}) + func (c *TableCell) SetSelectable(selectable bool) + func (c *TableCell) SetStyle(style tcell.Style) + func (c *TableCell) SetText(text string) + func (c *TableCell) SetTextColor(color tcell.Color) + type TextView struct + func NewTextView() *TextView + func (t *TextView) Clear() + func (t *TextView) Draw(screen tcell.Screen) + func (t *TextView) Focus(delegate func(p Primitive)) + func (t *TextView) GetBufferSize() (rows int, maxLen int) + func (t *TextView) GetBytes(stripTags bool) []byte + func (t *TextView) GetHighlights() (regionIDs []string) + func (t *TextView) GetRegionText(regionID string) string + func (t *TextView) GetScrollOffset() (row, column int) + func (t *TextView) GetText(stripTags bool) string + func (t *TextView) HasFocus() bool + func (t *TextView) Highlight(regionIDs ...string) + func (t *TextView) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (t *TextView) MouseHandler() ... + func (t *TextView) ScrollTo(row, column int) + func (t *TextView) ScrollToBeginning() + func (t *TextView) ScrollToEnd() + func (t *TextView) ScrollToHighlight() + func (t *TextView) SetBytes(text []byte) + func (t *TextView) SetChangedFunc(handler func()) + func (t *TextView) SetDoneFunc(handler func(key tcell.Key)) + func (t *TextView) SetDynamicColors(dynamic bool) + func (t *TextView) SetHighlightBackgroundColor(color tcell.Color) + func (t *TextView) SetHighlightForegroundColor(color tcell.Color) + func (t *TextView) SetHighlightedFunc(handler func(added, removed, remaining []string)) + func (t *TextView) SetMaxLines(maxLines int) + func (t *TextView) SetRegions(regions bool) + func (t *TextView) SetReindexBuffer(reindex bool) + func (t *TextView) SetScrollBarColor(color tcell.Color) + func (t *TextView) SetScrollBarVisibility(visibility ScrollBarVisibility) + func (t *TextView) SetScrollable(scrollable bool) + func (t *TextView) SetText(text string) + func (t *TextView) SetTextAlign(align int) + func (t *TextView) SetTextColor(color tcell.Color) + func (t *TextView) SetToggleHighlights(toggle bool) + func (t *TextView) SetVerticalAlign(valign VerticalAlignment) + func (t *TextView) SetWordWrap(wrapOnWords bool) + func (t *TextView) SetWrap(wrap bool) + func (t *TextView) SetWrapWidth(width int) + func (t *TextView) Write(p []byte) (n int, err error) + type Theme struct + BorderColor tcell.Color + ButtonCursorRune rune + CheckBoxCheckedRune rune + CheckBoxCursorRune rune + ContextMenuPaddingBottom int + ContextMenuPaddingLeft int + ContextMenuPaddingRight int + ContextMenuPaddingTop int + ContrastBackgroundColor tcell.Color + ContrastPrimaryTextColor tcell.Color + ContrastSecondaryTextColor tcell.Color + DropDownAbbreviationChars string + DropDownOpenSymbol rune + DropDownSelectedSymbol rune + DropDownSymbol rune + GraphicsColor tcell.Color + InverseTextColor tcell.Color + MoreContrastBackgroundColor tcell.Color + PrimaryTextColor tcell.Color + PrimitiveBackgroundColor tcell.Color + ScrollBarColor tcell.Color + SecondaryTextColor tcell.Color + TertiaryTextColor tcell.Color + TitleColor tcell.Color + WindowMinHeight int + WindowMinWidth int + type Transformation int + const TransformFirstItem + const TransformLastItem + const TransformNextItem + const TransformNextPage + const TransformPreviousItem + const TransformPreviousPage + type TreeNode struct + func NewTreeNode(text string) *TreeNode + func (n *TreeNode) AddChild(node *TreeNode) + func (n *TreeNode) ClearChildren() + func (n *TreeNode) Collapse() + func (n *TreeNode) CollapseAll() + func (n *TreeNode) Expand() + func (n *TreeNode) ExpandAll() + func (n *TreeNode) GetChildren() []*TreeNode + func (n *TreeNode) GetColor() tcell.Color + func (n *TreeNode) GetReference() interface{} + func (n *TreeNode) GetText() string + func (n *TreeNode) IsExpanded() bool + func (n *TreeNode) SetChildren(childNodes []*TreeNode) + func (n *TreeNode) SetColor(color tcell.Color) + func (n *TreeNode) SetExpanded(expanded bool) + func (n *TreeNode) SetFocusedFunc(handler func()) + func (n *TreeNode) SetIndent(indent int) + func (n *TreeNode) SetReference(reference interface{}) + func (n *TreeNode) SetSelectable(selectable bool) + func (n *TreeNode) SetSelectedFunc(handler func()) + func (n *TreeNode) SetText(text string) + func (n *TreeNode) Walk(callback func(node, parent *TreeNode) bool) + type TreeView struct + func NewTreeView() *TreeView + func (t *TreeView) Draw(screen tcell.Screen) + func (t *TreeView) GetCurrentNode() *TreeNode + func (t *TreeView) GetRoot() *TreeNode + func (t *TreeView) GetRowCount() int + func (t *TreeView) GetScrollOffset() int + func (t *TreeView) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (t *TreeView) MouseHandler() ... + func (t *TreeView) SetAlign(align bool) + func (t *TreeView) SetChangedFunc(handler func(node *TreeNode)) + func (t *TreeView) SetCurrentNode(node *TreeNode) + func (t *TreeView) SetDoneFunc(handler func(key tcell.Key)) + func (t *TreeView) SetGraphics(showGraphics bool) + func (t *TreeView) SetGraphicsColor(color tcell.Color) + func (t *TreeView) SetPrefixes(prefixes []string) + func (t *TreeView) SetRoot(root *TreeNode) + func (t *TreeView) SetScrollBarColor(color tcell.Color) + func (t *TreeView) SetScrollBarVisibility(visibility ScrollBarVisibility) + func (t *TreeView) SetSelectedBackgroundColor(color tcell.Color) + func (t *TreeView) SetSelectedFunc(handler func(node *TreeNode)) + func (t *TreeView) SetSelectedTextColor(color tcell.Color) + func (t *TreeView) SetTopLevel(topLevel int) + func (t *TreeView) Transform(tr Transformation) + type VerticalAlignment int + const AlignBottom + const AlignMiddle + const AlignTop + type Window struct + func NewWindow(primitive Primitive) *Window + func (w *Window) Blur() + func (w *Window) Draw(screen tcell.Screen) + func (w *Window) Focus(delegate func(p Primitive)) + func (w *Window) HasFocus() bool + func (w *Window) InputHandler() func(event *tcell.EventKey, setFocus func(p Primitive)) + func (w *Window) MouseHandler() ... + func (w *Window) SetFullscreen(fullscreen bool) + type WindowManager struct + func NewWindowManager() *WindowManager + func (wm *WindowManager) Add(w ...*Window) + func (wm *WindowManager) Clear() + func (wm *WindowManager) Draw(screen tcell.Screen) + func (wm *WindowManager) Focus(delegate func(p Primitive)) + func (wm *WindowManager) HasFocus() bool + func (wm *WindowManager) MouseHandler() ...