1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

WTF-389 Log an exception and terminate if widget config is invalid

If, on startup, a widget's positional configuration is invalid (ie:
cannot be displayed onscreen) then terminate the app and inform about
which widget is erroring
This commit is contained in:
Chris Cummer 2019-04-12 05:25:55 -07:00
parent c9c7e124cc
commit aa313bdaa4
30 changed files with 84 additions and 50 deletions

View File

@ -52,7 +52,7 @@ func (widget *Widget) Refresh() {
return return
} }
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
logLines := widget.tailFile() logLines := widget.tailFile()
widget.View.SetText(widget.contentFrom(logLines)) widget.View.SetText(widget.contentFrom(logLines))

19
main.go
View File

@ -151,6 +151,8 @@ func watchForConfigChanges(app *tview.Application, configFilePath string, grid *
loadConfigFile(absPath) loadConfigFile(absPath)
widgets := makeWidgets(app, pages) widgets := makeWidgets(app, pages)
validateWidgets(widgets)
initializeFocusTracker(app, widgets) initializeFocusTracker(app, widgets)
display := wtf.NewDisplay(widgets) display := wtf.NewDisplay(widgets)
@ -284,10 +286,7 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) []wtf.Wtfable {
for mod := range mods { for mod := range mods {
if enabled := Config.UBool("wtf.mods."+mod+".enabled", false); enabled { if enabled := Config.UBool("wtf.mods."+mod+".enabled", false); enabled {
widget := makeWidget(app, pages, mod) widget := makeWidget(app, pages, mod)
widgets = append(widgets, widget)
if widget.IsPositionable() {
widgets = append(widgets, widget)
}
} }
} }
@ -298,6 +297,16 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) []wtf.Wtfable {
return widgets return widgets
} }
// Check that all the loaded widgets are valid for display
func validateWidgets(widgets []wtf.Wtfable) {
for _, widget := range widgets {
if widget.Enabled() && !widget.IsPositionable() {
errStr := fmt.Sprintf("Widget config has invalid values: %s", widget.Key())
log.Fatalln(errStr)
}
}
}
/* -------------------- Main -------------------- */ /* -------------------- Main -------------------- */
func main() { func main() {
@ -322,6 +331,8 @@ func main() {
pages := tview.NewPages() pages := tview.NewPages()
widgets := makeWidgets(app, pages) widgets := makeWidgets(app, pages)
validateWidgets(widgets)
initializeFocusTracker(app, widgets) initializeFocusTracker(app, widgets)
display := wtf.NewDisplay(widgets) display := wtf.NewDisplay(widgets)

View File

@ -40,7 +40,7 @@ func (widget *Widget) Refresh() {
wtf.Now().Format(wtf.DateFormat), wtf.Now().Format(wtf.DateFormat),
) )
widget.View.SetTitle(widget.ContextualTitle(widget.Name)) widget.View.SetTitle(widget.ContextualTitle(widget.Name()))
widget.View.SetText(widget.contentFrom(todayItems)) widget.View.SetText(widget.contentFrom(todayItems))
} }

View File

@ -38,7 +38,7 @@ func (widget *Widget) Refresh() {
builds, err := widget.Client.BuildsFor() builds, err := widget.Client.BuildsFor()
widget.View.SetTitle(fmt.Sprintf("%s - Builds", widget.Name)) widget.View.SetTitle(fmt.Sprintf("%s - Builds", widget.Name()))
var content string var content string
if err != nil { if err != nil {

View File

@ -25,7 +25,7 @@ func NewWidget(app *tview.Application) *Widget {
func (widget *Widget) Refresh() { func (widget *Widget) Refresh() {
monitors, monitorErr := Monitors() monitors, monitorErr := Monitors()
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name())))
widget.View.Clear() widget.View.Clear()
var content string var content string

View File

@ -32,7 +32,7 @@ func (widget *Widget) display() {
widget.mutex.Lock() widget.mutex.Lock()
defer widget.mutex.Unlock() defer widget.mutex.Unlock()
widget.View.SetTitle(widget.ContextualTitle(widget.Name)) widget.View.SetTitle(widget.ContextualTitle(widget.Name()))
widget.View.SetText(widget.contentFrom(widget.calEvents)) widget.View.SetText(widget.contentFrom(widget.calEvents))
} }

View File

@ -14,7 +14,7 @@ func (widget *Widget) display() {
return return
} }
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s- %s", widget.Name, widget.title(project)))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s- %s", widget.Name(), widget.title(project))))
str := wtf.SigilStr(len(widget.GerritProjects), widget.Idx, widget.View) + "\n" str := wtf.SigilStr(len(widget.GerritProjects), widget.Idx, widget.View) + "\n"
str = str + " [red]Stats[white]\n" str = str + " [red]Stats[white]\n"

View File

@ -94,7 +94,7 @@ func (widget *Widget) Refresh() {
gerrit, err := glb.NewClient(gerritUrl, httpClient) gerrit, err := glb.NewClient(gerritUrl, httpClient)
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
return return
} }

View File

@ -15,7 +15,7 @@ func (widget *Widget) display() {
return return
} }
title := fmt.Sprintf("%s - [green]%s[white]", widget.Name, repoData.Repository) title := fmt.Sprintf("%s - [green]%s[white]", widget.Name(), repoData.Repository)
widget.View.SetTitle(widget.ContextualTitle(title)) widget.View.SetTitle(widget.ContextualTitle(title))
str := wtf.SigilStr(len(widget.GitRepos), widget.Idx, widget.View) + "\n" str := wtf.SigilStr(len(widget.GitRepos), widget.Idx, widget.View) + "\n"

View File

@ -14,7 +14,7 @@ func (widget *Widget) display() {
return return
} }
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name, widget.title(repo)))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name(), widget.title(repo))))
str := wtf.SigilStr(len(widget.GithubRepos), widget.Idx, widget.View) + "\n" str := wtf.SigilStr(len(widget.GithubRepos), widget.Idx, widget.View) + "\n"
str = str + " [red]Stats[white]\n" str = str + " [red]Stats[white]\n"

View File

@ -14,7 +14,7 @@ func (widget *Widget) display() {
return return
} }
widget.View.SetTitle(fmt.Sprintf("%s- %s", widget.Name, widget.title(project))) widget.View.SetTitle(fmt.Sprintf("%s- %s", widget.Name(), widget.title(project)))
str := wtf.SigilStr(len(widget.GitlabProjects), widget.Idx, widget.View) + "\n" str := wtf.SigilStr(len(widget.GitlabProjects), widget.Idx, widget.View) + "\n"
str = str + " [red]Stats[white]\n" str = str + " [red]Stats[white]\n"

View File

@ -54,7 +54,7 @@ func (widget *Widget) Refresh() {
room, err := GetRoom(wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby")) room, err := GetRoom(wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby"))
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
return return
} }
@ -67,7 +67,7 @@ func (widget *Widget) Refresh() {
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
} else { } else {
widget.messages = messages widget.messages = messages
@ -86,7 +86,7 @@ func (widget *Widget) display() {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.Clear() widget.View.Clear()
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name, wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby")))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name(), wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby"))))
widget.View.SetText(widget.contentFrom(widget.messages)) widget.View.SetText(widget.contentFrom(widget.messages))
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight() widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
} }

View File

@ -64,7 +64,7 @@ func (widget *Widget) Refresh() {
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
} else { } else {
var stories []Story var stories []Story
@ -94,7 +94,7 @@ func (widget *Widget) display() {
widget.View.SetWrap(false) widget.View.SetWrap(false)
widget.View.Clear() widget.View.Clear()
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %sstories", widget.Name, wtf.Config.UString("wtf.mods.hackernews.storyType", "top")))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %sstories", widget.Name(), wtf.Config.UString("wtf.mods.hackernews.storyType", "top"))))
widget.View.SetText(widget.contentFrom(widget.stories)) widget.View.SetText(widget.contentFrom(widget.stories))
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight() widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
} }

View File

@ -63,7 +63,7 @@ func (widget *Widget) Refresh() {
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.ContextualTitle(widget.Name)) widget.View.SetTitle(widget.ContextualTitle(widget.Name()))
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
} }
@ -80,7 +80,7 @@ func (widget *Widget) display() {
widget.View.SetWrap(false) widget.View.SetWrap(false)
widget.View.Clear() widget.View.Clear()
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s: [red]%s", widget.Name, widget.view.Name))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s: [red]%s", widget.Name(), widget.view.Name)))
widget.View.SetText(widget.contentFrom(widget.view)) widget.View.SetText(widget.contentFrom(widget.view))
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight() widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
} }

View File

@ -57,7 +57,7 @@ func (widget *Widget) Refresh() {
if err != nil { if err != nil {
widget.result = nil widget.result = nil
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
} else { } else {
widget.result = searchResult widget.result = searchResult
@ -74,7 +74,7 @@ func (widget *Widget) display() {
} }
widget.View.SetWrap(false) widget.View.SetWrap(false)
str := fmt.Sprintf("%s- [green]%s[white]", widget.Name, wtf.Config.UString("wtf.mods.jira.project")) str := fmt.Sprintf("%s- [green]%s[white]", widget.Name(), wtf.Config.UString("wtf.mods.jira.project"))
widget.View.Clear() widget.View.Clear()
widget.View.SetTitle(widget.ContextualTitle(str)) widget.View.SetTitle(widget.ContextualTitle(str))

View File

@ -15,7 +15,7 @@ func (widget *Widget) display() {
return return
} }
title := fmt.Sprintf("%s - [green]%s[white]", widget.Name, repoData.Repository) title := fmt.Sprintf("%s - [green]%s[white]", widget.Name(), repoData.Repository)
widget.View.SetTitle(widget.ContextualTitle(title)) widget.View.SetTitle(widget.ContextualTitle(title))
str := wtf.SigilStr(len(widget.Data), widget.Idx, widget.View) + "\n" str := wtf.SigilStr(len(widget.Data), widget.Idx, widget.View) + "\n"

View File

@ -47,7 +47,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
func (widget *Widget) Refresh() { func (widget *Widget) Refresh() {
widget.nbascore() widget.nbascore()
widget.View.SetTitle(widget.ContextualTitle(widget.Name)) widget.View.SetTitle(widget.ContextualTitle(widget.Name()))
} }
func (widget *Widget) nbascore() { func (widget *Widget) nbascore() {

View File

@ -34,7 +34,7 @@ func (widget *Widget) Refresh() {
appName = app.Name appName = app.Name
} }
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - [green]%s[white]", widget.Name, appName))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - [green]%s[white]", widget.Name(), appName)))
widget.View.Clear() widget.View.Clear()
var content string var content string

View File

@ -27,7 +27,7 @@ func (widget *Widget) Refresh() {
wtf.Config.UString("wtf.mods.opsgenie.scheduleIdentifierType"), wtf.Config.UString("wtf.mods.opsgenie.scheduleIdentifierType"),
getSchedules(), getSchedules(),
) )
widget.View.SetTitle(widget.ContextualTitle(widget.Name)) widget.View.SetTitle(widget.ContextualTitle(widget.Name()))
var content string var content string
if err != nil { if err != nil {

View File

@ -38,7 +38,7 @@ func (widget *Widget) Refresh() {
incidents, err2 = GetIncidents() incidents, err2 = GetIncidents()
} }
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name())))
widget.View.Clear() widget.View.Clear()
var content string var content string

View File

@ -55,7 +55,7 @@ func (widget *Widget) Refresh() {
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
} else { } else {
widget.items = &items.Results widget.items = &items.Results
@ -73,7 +73,7 @@ func (widget *Widget) display() {
widget.View.SetWrap(false) widget.View.SetWrap(false)
projectName := wtf.Config.UString("wtf.mods.rollbar.projectName", "Items") projectName := wtf.Config.UString("wtf.mods.rollbar.projectName", "Items")
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name, projectName))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name(), projectName)))
widget.View.SetText(widget.contentFrom(widget.items)) widget.View.SetText(widget.contentFrom(widget.items))
} }

View File

@ -72,7 +72,7 @@ func (widget *Widget) Refresh() {
widget.load() widget.load()
widget.display() widget.display()
widget.View.SetTitle(widget.ContextualTitle(widget.Name)) widget.View.SetTitle(widget.ContextualTitle(widget.Name()))
} }
func (widget *Widget) SetList(newList checklist.Checklist) { func (widget *Widget) SetList(newList checklist.Checklist) {

View File

@ -55,7 +55,7 @@ func (widget *Widget) Refresh() {
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error()) widget.View.SetText(err.Error())
} else { } else {
widget.builds = builds widget.builds = builds
@ -73,7 +73,7 @@ func (widget *Widget) display() {
widget.View.SetWrap(false) widget.View.SetWrap(false)
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - Builds", widget.Name))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - Builds", widget.Name())))
widget.View.SetText(widget.contentFrom(widget.builds)) widget.View.SetText(widget.contentFrom(widget.builds))
} }

View File

@ -35,14 +35,14 @@ func (widget *Widget) Refresh() {
var content string var content string
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name) widget.View.SetTitle(widget.Name())
content = err.Error() content = err.Error()
} else { } else {
widget.View.SetWrap(false) widget.View.SetWrap(false)
widget.View.SetTitle( widget.View.SetTitle(
fmt.Sprintf( fmt.Sprintf(
"[white]%s: [green]%s ", "[white]%s: [green]%s ",
widget.Name, widget.Name(),
wtf.Config.UString("wtf.mods.trello.board"), wtf.Config.UString("wtf.mods.trello.board"),
), ),
) )

View File

@ -23,9 +23,9 @@ func NewWidget(app *tview.Application, name string) *Widget {
func (widget *Widget) Refresh() { func (widget *Widget) Refresh() {
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name))) widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name())))
widget.View.Clear() widget.View.Clear()
content := fmt.Sprintf("Widget %s does not exist", widget.Name) content := fmt.Sprintf("Widget %s does not exist", widget.Name())
widget.View.SetText(content) widget.View.SetText(content)
} }

View File

@ -41,7 +41,7 @@ func (widget *Widget) Refresh() {
} }
teams, err := Fetch() teams, err := Fetch()
widget.View.SetTitle(widget.ContextualTitle(widget.Name)) widget.View.SetTitle(widget.ContextualTitle(widget.Name()))
if err != nil { if err != nil {
widget.View.SetWrap(true) widget.View.SetWrap(true)

View File

@ -43,7 +43,7 @@ func (widget *Widget) Refresh() {
/* -------------------- Unexported Functions -------------------- */ /* -------------------- Unexported Functions -------------------- */
func (widget *Widget) display() { func (widget *Widget) display() {
widget.View.SetTitle(fmt.Sprintf("%s (%d)", widget.Name, widget.result.Count)) widget.View.SetTitle(fmt.Sprintf("%s (%d)", widget.Name(), widget.result.Count))
widget.View.SetText(widget.textContent(widget.result.Tickets)) widget.View.SetText(widget.textContent(widget.result.Tickets))
} }

View File

@ -9,11 +9,13 @@ import (
//BarGraph lets make graphs //BarGraph lets make graphs
type BarGraph struct { type BarGraph struct {
enabled bool enabled bool
focusable bool focusable bool
starChar string key string
maxStars int maxStars int
Name string name string
starChar string
RefreshInt int RefreshInt int
View *tview.TextView View *tview.TextView
@ -31,9 +33,10 @@ func NewBarGraph(app *tview.Application, name string, configKey string, focusabl
widget := BarGraph{ widget := BarGraph{
enabled: Config.UBool(fmt.Sprintf("wtf.mods.%s.enabled", configKey), false), enabled: Config.UBool(fmt.Sprintf("wtf.mods.%s.enabled", configKey), false),
focusable: focusable, focusable: focusable,
starChar: Config.UString(fmt.Sprintf("wtf.mods.%s.graphIcon", configKey), "|"), key: configKey,
maxStars: Config.UInt(fmt.Sprintf("wtf.mods.%s.graphStars", configKey), 20), maxStars: Config.UInt(fmt.Sprintf("wtf.mods.%s.graphStars", configKey), 20),
Name: Config.UString(fmt.Sprintf("wtf.mods.%s.title", configKey), name), name: Config.UString(fmt.Sprintf("wtf.mods.%s.title", configKey), name),
starChar: Config.UString(fmt.Sprintf("wtf.mods.%s.graphIcon", configKey), "|"),
RefreshInt: Config.UInt(fmt.Sprintf("wtf.mods.%s.refreshInterval", configKey), 1), RefreshInt: Config.UInt(fmt.Sprintf("wtf.mods.%s.refreshInterval", configKey), 1),
} }
@ -83,6 +86,14 @@ func (widget *BarGraph) IsPositionable() bool {
return widget.Position.IsValid() return widget.Position.IsValid()
} }
func (widget *BarGraph) Key() string {
return widget.key
}
func (widget *BarGraph) Name() string {
return widget.name
}
func (widget *BarGraph) RefreshInterval() int { func (widget *BarGraph) RefreshInterval() int {
return widget.RefreshInt return widget.RefreshInt
} }
@ -104,7 +115,7 @@ func (widget *BarGraph) addView(app *tview.Application, configKey string) {
view.SetBorder(true) view.SetBorder(true)
view.SetBorderColor(ColorFor(widget.BorderColor())) view.SetBorderColor(ColorFor(widget.BorderColor()))
view.SetDynamicColors(true) view.SetDynamicColors(true)
view.SetTitle(widget.Name) view.SetTitle(widget.Name())
view.SetTitleColor(ColorFor( view.SetTitleColor(ColorFor(
Config.UString( Config.UString(
fmt.Sprintf("wtf.mods.%s.colors.title", configKey), fmt.Sprintf("wtf.mods.%s.colors.title", configKey),

View File

@ -13,8 +13,9 @@ type TextWidget struct {
enabled bool enabled bool
focusable bool focusable bool
focusChar string focusChar string
key string
name string
Name string
RefreshInt int RefreshInt int
View *tview.TextView View *tview.TextView
@ -32,7 +33,8 @@ func NewTextWidget(app *tview.Application, name string, configKey string, focusa
enabled: Config.UBool(fmt.Sprintf("wtf.mods.%s.enabled", configKey), false), enabled: Config.UBool(fmt.Sprintf("wtf.mods.%s.enabled", configKey), false),
focusable: focusable, focusable: focusable,
focusChar: focusChar, focusChar: focusChar,
Name: Config.UString(fmt.Sprintf("wtf.mods.%s.title", configKey), name), key: configKey,
name: Config.UString(fmt.Sprintf("wtf.mods.%s.title", configKey), name),
RefreshInt: Config.UInt(fmt.Sprintf("wtf.mods.%s.refreshInterval", configKey)), RefreshInt: Config.UInt(fmt.Sprintf("wtf.mods.%s.refreshInterval", configKey)),
} }
@ -92,6 +94,14 @@ func (widget *TextWidget) IsPositionable() bool {
return widget.Position.IsValid() return widget.Position.IsValid()
} }
func (widget *TextWidget) Key() string {
return widget.key
}
func (widget *TextWidget) Name() string {
return widget.name
}
func (widget *TextWidget) RefreshInterval() int { func (widget *TextWidget) RefreshInterval() int {
return widget.RefreshInt return widget.RefreshInt
} }
@ -135,7 +145,7 @@ func (widget *TextWidget) addView(app *tview.Application, configKey string) {
app.Draw() app.Draw()
}) })
view.SetDynamicColors(true) view.SetDynamicColors(true)
view.SetTitle(widget.ContextualTitle(widget.Name)) view.SetTitle(widget.ContextualTitle(widget.name))
view.SetWrap(false) view.SetWrap(false)
widget.View = view widget.View = view

View File

@ -11,6 +11,8 @@ type Wtfable interface {
BorderColor() string BorderColor() string
Focusable() bool Focusable() bool
FocusChar() string FocusChar() string
Key() string
Name() string
SetFocusChar(string) SetFocusChar(string)
TextView() *tview.TextView TextView() *tview.TextView