Documentation ¶
Index ¶
- func NewAskModal(question string, submit, cancel func()) *tview.Modal
- func NewErrorModal(cancel func()) *tview.Modal
- func NewModal() *tview.Modal
- func WrapIntoModal(primitive tview.Primitive, width, height int) *tview.Flex
- type DateField
- func (d *DateField) Draw(screen tcell.Screen)
- func (d *DateField) GetFieldHeight() int
- func (d *DateField) GetFieldWidth() int
- func (d *DateField) GetLabel() string
- func (d *DateField) GetTextDate() string
- func (d *DateField) HasFocus() bool
- func (d *DateField) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *DateField) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
- func (d *DateField) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
- func (d *DateField) SetLabel(label string) *DateField
- func (d *DateField) SetTextDate(text string) *DateField
- type Form
- type FormDataProvider
- type Table
- type TableDataProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAskModal ¶
NewAskModal returns new tview.Modal with text and "Yes/No" buttons. Use submit and cancel args to set actions on buttons click.
func NewErrorModal ¶
NewErrorModal returns new tview.Modal with "okay" button. Use cancel variable to set action button.
Types ¶
type DateField ¶
func NewDateField ¶
func NewDateField() *DateField
func (*DateField) Draw ¶
func (d *DateField) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*DateField) GetFieldHeight ¶
GetFieldHeight returns this primitive's field height.
func (*DateField) GetFieldWidth ¶
GetFieldWidth returns this primitive's field screen width.
func (*DateField) GetTextDate ¶
GetText returns the current text of the date field.
func (*DateField) InputHandler ¶
InputHandler returns the handler for this primitive.
func (*DateField) SetFinishedFunc ¶
SetFinishedFunc sets a callback invoked when the user leaves this form item.
func (*DateField) SetFormAttributes ¶
func (d *DateField) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
SetFormAttributes sets attributes shared by all form items.
func (*DateField) SetTextDate ¶
SetText sets the current text of the input field.
type Form ¶
Form an extension for tview.Form. It used to avoid duplication while setting and getting field values.
func NewForm ¶
func NewForm(form *tview.Form, dataProvider FormDataProvider) *Form
NewForm returns new extended Form.
type FormDataProvider ¶
FormDataProvider an interface for getting options for dropdown fields.
type Table ¶
Table an extensioun for tview.Table.
func NewTable ¶
func NewTable(cols []string, dataProvider TableDataProvider) *Table
NewTable returns new extended Table.
func (*Table) GetSelectedRef ¶
GetSelectedRef returns a reference map[string]string of current selected row.
type TableDataProvider ¶
TableDataProvider an interface for table data population.