Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FocusModel ¶
type Item ¶
type Item struct {
// ID is an arbitrary ID, up to caller.
ID string
// Separator is a flag that determines whether the item is a separator or
// not.
Separator bool
// Name is the name of the Item, will be displayed in the menu.
Name string
// Help is the help text for the item, that will be shown when the
// item is highlighted.
Help string
// Model is any model that should be displayed when the item is selected,
// or executed when the user presses enter.
Model FocusModel
// Preview suggests that the Model should attempt to show the preview
// of this item.
Preview bool
// Validate determines whether the item is disabled or not. It should
// complete in reasonable time, as it is called on every render. The
// return error is used in the description for the item.
Validate func() error // when to enable the item
}
Item is an item in a menu.
func (Item) DisabledReason ¶
func (Item) IsDisabled ¶
type Keymap ¶
func DefaultKeymap ¶
func DefaultKeymap() *Keymap
type Model ¶
type Style ¶
func DefaultStyle ¶
func DefaultStyle() *Style
Click to show internal directories.
Click to hide internal directories.