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

Rename TextViewer to Wtfable

This commit is contained in:
Chris Cummer
2018-05-09 08:51:21 -07:00
parent b4520f1410
commit d246cb4c4a
3 changed files with 9 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ const (
type FocusTracker struct {
App *tview.Application
Idx int
Widgets []TextViewer
Widgets []Wtfable
}
/* -------------------- Exported Functions -------------------- */
@@ -89,8 +89,8 @@ func (tracker *FocusTracker) focus(idx int) {
view.SetBorderColor(ColorFor(Config.UString("wtf.colors.border.focused", "gray")))
}
func (tracker *FocusTracker) focusables() []TextViewer {
focusable := []TextViewer{}
func (tracker *FocusTracker) focusables() []Wtfable {
focusable := []Wtfable{}
for _, widget := range tracker.Widgets {
if widget.Focusable() {
@@ -101,7 +101,7 @@ func (tracker *FocusTracker) focusables() []TextViewer {
return focusable
}
func (tracker *FocusTracker) focusableAt(idx int) TextViewer {
func (tracker *FocusTracker) focusableAt(idx int) Wtfable {
if idx < 0 || idx >= len(tracker.focusables()) {
return nil
}

View File

@@ -4,8 +4,7 @@ import (
"github.com/rivo/tview"
)
// TODO: I really need to come up with a better name for this now
type TextViewer interface {
type Wtfable interface {
Enabler
Scheduler