Documentation ¶
Index ¶
- Variables
- type CommandBar
- type Croppable
- type Window
- func (w *Window[T]) GetFocusedEntry() (*T, error)
- func (w *Window[T]) OnAutocomplete(handler func(string) string)
- func (w *Window[T]) OnCommand(handler func(string, ...string))
- func (w *Window[T]) OnEntryFocused(handler func(e T))
- func (w *Window[T]) OnEntrySelected(handler func(e T))
- func (w *Window[T]) OnInputChanged(handler func(input string, entries []T))
- func (w *Window[T]) Reset()
- func (w *Window[T]) Run() error
- func (w *Window[T]) SetEntries(es *[]T)
- func (w *Window[T]) SetFooterText(info string)
- func (w *Window[T]) SetPreview(text string)
- func (w *Window[T]) SetTitle(title string)
- func (w *Window[T]) Stop()
- func (w *Window[T]) SuspendWith(f func())
- func (w *Window[T]) UpdateWith(f func())
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorNoFocusedEntry = errors.New("no entry focused in main window")
)
Functions ¶
This section is empty.
Types ¶
type CommandBar ¶
func NewCommandBar ¶
func NewCommandBar(ctx context.Context) *CommandBar
func (*CommandBar) OnAutocomplete ¶
func (c *CommandBar) OnAutocomplete(handler func(string) string)
func (*CommandBar) OnCommand ¶
func (c *CommandBar) OnCommand(handler func(string, ...string))
func (*CommandBar) SetBackgroundColor ¶
func (c *CommandBar) SetBackgroundColor(color tcell.Color) *tview.Box
func (*CommandBar) SetDoneFunc ¶
func (c *CommandBar) SetDoneFunc(done func(tcell.Key))
func (*CommandBar) SetTitle ¶
func (c *CommandBar) SetTitle(title string)
type Window ¶
type Window[T Croppable] struct { // contains filtered or unexported fields }
func NewMainWindow ¶
func (*Window[T]) GetFocusedEntry ¶
func (*Window[T]) OnAutocomplete ¶
func (*Window[T]) OnEntryFocused ¶
func (w *Window[T]) OnEntryFocused(handler func(e T))
func (*Window[T]) OnEntrySelected ¶
func (w *Window[T]) OnEntrySelected(handler func(e T))
func (*Window[T]) OnInputChanged ¶
func (*Window[T]) SetEntries ¶
func (w *Window[T]) SetEntries(es *[]T)
func (*Window[T]) SetFooterText ¶
func (*Window[T]) SetPreview ¶
func (*Window[T]) SuspendWith ¶
func (w *Window[T]) SuspendWith(f func())
func (*Window[T]) UpdateWith ¶
func (w *Window[T]) UpdateWith(f func())
Click to show internal directories.
Click to hide internal directories.