Documentation ¶
Index ¶
- func EventToString(event *tcell.EventKey) string
- func RunShortcutsDialogStandalone()
- func ShowShortcutsDialog(app *tview.Application, onClose func())
- type ShortcutTable
- func (shortcutTable *ShortcutTable) GetPrimitive() tview.Primitive
- func (shortcutTable *ShortcutTable) GetShortcuts() []*shortcuts.Shortcut
- func (shortcutTable *ShortcutTable) IsDefiningShortcut() bool
- func (shortcutTable *ShortcutTable) SetFocusNext(function func())
- func (shortcutTable *ShortcutTable) SetFocusPrevious(function func())
- func (shortcutTable *ShortcutTable) SetShortcuts(shortcuts []*shortcuts.Shortcut)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventToString ¶
EventToString renders a tcell.EventKey as a human readable string
func RunShortcutsDialogStandalone ¶
func RunShortcutsDialogStandalone()
func ShowShortcutsDialog ¶
func ShowShortcutsDialog(app *tview.Application, onClose func())
Types ¶
type ShortcutTable ¶
type ShortcutTable struct {
// contains filtered or unexported fields
}
ShortcutTable is a component that displays shortcuts and allows changing them.
func NewShortcutTable ¶
func NewShortcutTable() *ShortcutTable
NewShortcutTable creates a new shortcut table that doesn't contain any data.
func (*ShortcutTable) GetPrimitive ¶
func (shortcutTable *ShortcutTable) GetPrimitive() tview.Primitive
GetPrimitive returns the primitive to be put onto a layout.
func (*ShortcutTable) GetShortcuts ¶
func (shortcutTable *ShortcutTable) GetShortcuts() []*shortcuts.Shortcut
GetShortcuts returns the array containing the currently displayed shortcuts.
func (*ShortcutTable) IsDefiningShortcut ¶
func (shortcutTable *ShortcutTable) IsDefiningShortcut() bool
IsDefiningShortcut indicates whether the user is currently selecting a shortcut for any function.
func (*ShortcutTable) SetFocusNext ¶
func (shortcutTable *ShortcutTable) SetFocusNext(function func())
SetFocusNext decides which component will be focused when hitting tab
func (*ShortcutTable) SetFocusPrevious ¶
func (shortcutTable *ShortcutTable) SetFocusPrevious(function func())
SetFocusPrevious decides which component will be focused when hitting shift+tab
func (*ShortcutTable) SetShortcuts ¶
func (shortcutTable *ShortcutTable) SetShortcuts(shortcuts []*shortcuts.Shortcut)
SetShortcuts sets the shortcut data and changes the UI accordingly.