Documentation ¶
Index ¶
- type Config
- type Terminal
- func (t *Terminal) AddListener(listener chan Config)
- func (t *Terminal) CreateRenderer() fyne.WidgetRenderer
- func (t *Terminal) Exit()
- func (t *Terminal) FocusGained()
- func (t *Terminal) FocusLost()
- func (t *Terminal) Focused() bool
- func (t *Terminal) RemoveListener(listener chan Config)
- func (t *Terminal) Resize(s fyne.Size)
- func (t *Terminal) Run() error
- func (t *Terminal) TypedKey(e *fyne.KeyEvent)
- func (t *Terminal) TypedRune(r rune)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config is the state of a terminal, updated upon certain actions or commands. Use Terminal.OnConfigure hook to register for changes.
type Terminal ¶
type Terminal struct { widget.BaseWidget // contains filtered or unexported fields }
Terminal is a terminal widget that loads a shell and handles input/output.
func NewTerminal ¶
func NewTerminal() *Terminal
NewTerminal sets up a new terminal instance with the bash shell
func (*Terminal) AddListener ¶
AddListener registers a new outgoing channel that will have our Config sent each time it changes.
func (*Terminal) CreateRenderer ¶
func (t *Terminal) CreateRenderer() fyne.WidgetRenderer
CreateRenderer requests a new renderer for this terminal (just a wrapper around the TextGrid)
func (*Terminal) Exit ¶
func (t *Terminal) Exit()
Exit requests that this terminal exits. If there are embedded shells it will exit the child one only.
func (*Terminal) FocusGained ¶
func (t *Terminal) FocusGained()
FocusGained notifies the terminal that it has focus
func (*Terminal) FocusLost ¶
func (t *Terminal) FocusLost()
FocusLost tells the terminal it no longer has focus
func (*Terminal) RemoveListener ¶
RemoveListener de-registers a Config channel and closes it
func (*Terminal) Resize ¶
Resize is called when this terminal widget has been resized. It ensures that the virtual terminal is within the bounds of the widget.
func (*Terminal) Run ¶
Run starts the terminal by loading a shell and starting to process the input/output