summaryrefslogtreecommitdiff
path: root/draw.go
diff options
context:
space:
mode:
Diffstat (limited to 'draw.go')
-rw-r--r--draw.go22
1 files changed, 10 insertions, 12 deletions
diff --git a/draw.go b/draw.go
index 0e485d6..5b92d9e 100644
--- a/draw.go
+++ b/draw.go
@@ -47,22 +47,20 @@ func (w *guiWidget) drawTree(draw bool) {
}
// display's the text of the widget in gocui
-// create or recreate the gocui widget visible
-// will create a new gocui view if there isn't one or if it has been moved
// deletes the old view if it exists and recreates it
-func (w *guiWidget) recreateView() {
+func (w *guiWidget) drawView() {
var err error
- log.Log(INFO, "recreateView() START", w.WidgetType, w.String())
+ log.Log(INFO, "drawView() START", w.WidgetType, w.String())
if me.baseGui == nil {
- log.Log(ERROR, "recreateView() ERROR: me.baseGui == nil", w)
+ log.Log(ERROR, "drawView() ERROR: me.baseGui == nil", w)
return
}
if w.cuiName == "" {
- log.Log(ERROR, "recreateView() w.cuiName was not set for widget", w)
+ log.Log(ERROR, "drawView() w.cuiName was not set for widget", w)
w.cuiName = strconv.Itoa(w.node.WidgetId) + " TK"
}
- log.Log(INFO, "recreateView() labelN =", w.labelN)
+ log.Log(INFO, "drawView() labelN =", w.labelN)
// this deletes the button from gocui
me.baseGui.DeleteView(w.cuiName)
@@ -76,13 +74,13 @@ func (w *guiWidget) recreateView() {
w.v, err = me.baseGui.SetView(w.cuiName, a, b, c, d, 0)
if err == nil {
- w.showWidgetPlacement("recreateView()")
- log.Log(ERROR, "recreateView() internal plugin error err = nil")
+ w.showWidgetPlacement("drawView()")
+ log.Log(ERROR, "drawView() internal plugin error err = nil")
return
}
if !errors.Is(err, gocui.ErrUnknownView) {
- w.showWidgetPlacement("recreateView()")
- log.Log(ERROR, "recreateView() internal plugin error error.IS()", err)
+ w.showWidgetPlacement("drawView()")
+ log.Log(ERROR, "drawView() internal plugin error error.IS()", err)
return
}
@@ -110,5 +108,5 @@ func (w *guiWidget) recreateView() {
w.v.SelFgColor = w.color.selFg
w.v.SelBgColor = w.color.selBg
}
- log.Log(INFO, "recreateView() END")
+ log.Log(INFO, "drawView() END")
}