Documentation
¶
Overview ¶
Package ui assembles the terminal interface.
The rule this package follows is that widgets never hold application state. Anything a decision depends on — the current statement, the guard verdict, the result buffer — lives outside tview, so it can be tested without a terminal. Widgets only render what they are handed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the running interface for one datasource.
func New ¶
New builds the interface for an open session.
The session rather than the connection, because switching datasource has to close what it left — and a tunnel closed by nobody outlives the thing it was carrying.
type Deps ¶
type Deps struct {
Keys *keymap.Map
Cache *catalog.Cache
History *history.Store
// Worktree is the directory named by --dir, if any. Nil means the session
// starts unattached, which is the ordinary case.
Worktree *worktree.Worktree
// Recent is the list of directories attached before. Nil costs the
// shortcut and nothing else.
Recent *recent.List
// Connect opens another datasource, for switching mid-session. Nil leaves
// the session on the datasource it started with, and the switch says so
// rather than failing silently.
Connect func(context.Context, *config.DataSource) (*session.Session, error)
}
Deps are the optional collaborators an interface can be given.
They are optional so that the interface still opens when the cache cannot be created — a read-only home directory should cost the user completion, not the whole application.
Source Files
¶
- app.go
- cmdline.go
- completion.go
- cursor.go
- datasource.go
- ddl.go
- dialog.go
- edit.go
- editor.go
- explain.go
- files.go
- fitted.go
- goto.go
- grid.go
- gridcopy.go
- motion.go
- palette.go
- panel.go
- platform.go
- rowview.go
- rule.go
- savefile.go
- search.go
- searchbox.go
- spine.go
- status.go
- tables.go
- theme.go
- topbar.go
- tree.go
- treelabel.go
- useschema.go
- vimedit.go
- vimmotion.go
- vimnav.go
- vimobject.go
- vimrepeat.go
- worktree.go