Documentation ¶
Index ¶
- type CmdBoxWidget
- func (CB *CmdBoxWidget) AddCommand(command Command)
- func (CB *CmdBoxWidget) AddCommandCallback(command string, callback func(map[string]interface{})) Command
- func (CB *CmdBoxWidget) Id() string
- func (CB *CmdBoxWidget) InputHandler() func(*tcell.EventKey, func(tview.Primitive))
- func (CB *CmdBoxWidget) Mount(context map[string]interface{}) error
- func (CB *CmdBoxWidget) RemoveCommand(command Command)
- func (CB *CmdBoxWidget) Submit(command string, args []string)
- func (CB *CmdBoxWidget) Unmount() error
- type Command
- type DefaultCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdBoxWidget ¶
type CmdBoxWidget struct { *tview.InputField sync.Mutex // contains filtered or unexported fields }
func New ¶
func New(getLastCmd func() string, setLastCmd func(string)) *CmdBoxWidget
func (*CmdBoxWidget) AddCommand ¶
func (CB *CmdBoxWidget) AddCommand(command Command)
func (*CmdBoxWidget) AddCommandCallback ¶
func (CB *CmdBoxWidget) AddCommandCallback(command string, callback func(map[string]interface{})) Command
func (*CmdBoxWidget) Id ¶
func (CB *CmdBoxWidget) Id() string
func (*CmdBoxWidget) InputHandler ¶
func (CB *CmdBoxWidget) InputHandler() func(*tcell.EventKey, func(tview.Primitive))
InputHandler returns the handler for this primitive.
func (*CmdBoxWidget) Mount ¶
func (CB *CmdBoxWidget) Mount(context map[string]interface{}) error
func (*CmdBoxWidget) RemoveCommand ¶
func (CB *CmdBoxWidget) RemoveCommand(command Command)
func (*CmdBoxWidget) Submit ¶
func (CB *CmdBoxWidget) Submit(command string, args []string)
func (*CmdBoxWidget) Unmount ¶
func (CB *CmdBoxWidget) Unmount() error
type DefaultCommand ¶
type DefaultCommand struct { Name string Usage string Help string Callback func(context map[string]interface{}) }
func (*DefaultCommand) CommandCallback ¶
func (DC *DefaultCommand) CommandCallback(context map[string]interface{})
func (*DefaultCommand) CommandHelp ¶
func (DC *DefaultCommand) CommandHelp() string
func (*DefaultCommand) CommandName ¶
func (DC *DefaultCommand) CommandName() string
func (*DefaultCommand) CommandUsage ¶
func (DC *DefaultCommand) CommandUsage() string
Click to show internal directories.
Click to hide internal directories.