Documentation ¶
Index ¶
- type Box
- type Form
- type FormLabel
- type FormModalButton
- func (b *FormModalButton) Blur()
- func (b *FormModalButton) Focus(delegate func(tview.Primitive))
- func (b *FormModalButton) GetFieldWidth() int
- func (b *FormModalButton) GetLabel() string
- func (b *FormModalButton) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
- func (b *FormModalButton) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
- func (b *FormModalButton) SetSelectedFunc(handler func()) *FormModalButton
- type Group
- type Item
- type MenuButton
- type Multiline
- type Separator
- type Spinner
- type Table
- func (t *Table) AddRow(columns ...interface{})
- func (t *Table) GetHeight() int
- func (t *Table) GetValue(row, column int) interface{}
- func (t *Table) HoverRow(row int) bool
- func (t *Table) SelectRow(row int) bool
- func (t *Table) SetHeader(keys ...interface{})
- func (t *Table) SetRowSelectedFunc(callback func(row int))
- type TableHeaders
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Form ¶
Form is a more flexible form component for tview lib.
func (*Form) AddFormItem ¶
AddFormItem adds a new item to the form.
func (*Form) AddFormItems ¶
AddFormItems constructs form from data represented as a list of Item objects.
func (*Form) AddMenuButton ¶
AddMenuButton adds a button to the menu at the bottom of the form.
type FormLabel ¶
FormLabel text paragraph that can be used in form.
func NewFormLabel ¶
NewFormLabel creates a new FormLabel.
func (*FormLabel) GetFieldWidth ¶
GetFieldWidth implements tview.FormItem.
func (*FormLabel) SetFinishedFunc ¶
SetFinishedFunc implements tview.FormItem.
type FormModalButton ¶
FormModalButton the button that opens modal dialog with extended settings.
func NewFormModalButton ¶
func NewFormModalButton(formLabel, buttonLabel string) *FormModalButton
NewFormModalButton creates a new FormModalButton.
func (*FormModalButton) Blur ¶
func (b *FormModalButton) Blur()
Blur override default blur behavior.
func (*FormModalButton) Focus ¶
func (b *FormModalButton) Focus(delegate func(tview.Primitive))
Focus override default focus behavior.
func (*FormModalButton) GetFieldWidth ¶
func (b *FormModalButton) GetFieldWidth() int
GetFieldWidth implements tview.FormItem.
func (*FormModalButton) GetLabel ¶
func (b *FormModalButton) GetLabel() string
GetLabel implements tview.FormItem.
func (*FormModalButton) SetFinishedFunc ¶
func (b *FormModalButton) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
SetFinishedFunc implements tview.FormItem.
func (*FormModalButton) SetFormAttributes ¶
func (b *FormModalButton) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
SetFormAttributes sets form attributes.
func (*FormModalButton) SetSelectedFunc ¶
func (b *FormModalButton) SetSelectedFunc(handler func()) *FormModalButton
SetSelectedFunc forwards that to underlying button component.
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group is an attempt to straighten out built-in tview TAB focus sequence.
func (*Group) AddElement ¶
AddElement to the group.
func (*Group) FocusFirst ¶
func (eg *Group) FocusFirst()
FocusFirst sets focus to the first element.
type Item ¶
type Item struct { Name string // contains filtered or unexported fields }
Item represents a single form item.
func NewSeparator ¶
NewSeparator creates new form special form item which can be used as a sections Separator.
type MenuButton ¶
MenuButton creates a new menu button.
func NewMenuButton ¶
func NewMenuButton(label string) *MenuButton
NewMenuButton creates new menu button.
func (*MenuButton) SetActive ¶
func (b *MenuButton) SetActive(active bool)
SetActive changes menu button active state.
func (*MenuButton) SetActiveColors ¶
func (b *MenuButton) SetActiveColors(colors ...tcell.Color)
SetActiveColors sets active state colors. 1st value is bg color. 2nd value is label color.
func (*MenuButton) SetInactiveColors ¶
func (b *MenuButton) SetInactiveColors(colors ...tcell.Color)
SetInactiveColors sets inactive state colors. 1st value is bg color. 2nd value is label color.
type Multiline ¶
type Multiline interface {
GetHeight() int
}
Multiline interface represents elements that can occupy more than one line.
type Spinner ¶
Spinner a unicode spinner primitive.
func NewSpinner ¶
func NewSpinner(label string, spinner []string, app *tview.Application) *Spinner
NewSpinner creates a new spinner.
type Table ¶
Table list of choices represented in table format.
func (*Table) AddRow ¶
func (t *Table) AddRow(columns ...interface{})
AddRow adds a new row to the table.
func (*Table) SetHeader ¶
func (t *Table) SetHeader(keys ...interface{})
SetHeader sets table header.
func (*Table) SetRowSelectedFunc ¶
SetRowSelectedFunc called when selected row is updated.
type TableHeaders ¶
type TableHeaders []interface{}
TableHeaders represents table headers list for item options which are using table representation.
func NewTableHeaders ¶
func NewTableHeaders(headers ...interface{}) TableHeaders
NewTableHeaders creates TableHeaders object.