summaryrefslogtreecommitdiff
path: root/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'view.go')
-rw-r--r--view.go50
1 files changed, 1 insertions, 49 deletions
diff --git a/view.go b/view.go
index 0709a1c..22e0373 100644
--- a/view.go
+++ b/view.go
@@ -49,7 +49,6 @@ func (w *guiWidget) textResize() bool {
}
func (w *guiWidget) hideView() {
- // w.SetVisible(false)
w.deleteView()
}
@@ -62,59 +61,12 @@ func (w *guiWidget) showView() {
}
log.Log(INFO, "showView() labelN =", w.labelN)
- /*
- if w.hidden {
- w.SetVisible(false)
- return
- }
- */
- if w.v != nil {
- return
- }
-
w.recreateView()
+ /*
w.textResize()
w.v.Clear()
fmt.Fprint(w.v, w.labelN)
- /*
- x0, y0, x1, y1, _ := me.baseGui.ViewPosition(w.cuiName)
- // x0, y0, x1, y1, err := me.baseGui.ViewPosition(w.cuiName)
- // log.Log(INFO, "showView() w.v already defined for widget", w.String(), x0, y0, x1, y1, err)
-
- // n.smartGocuiSize()
- // changed := w.textResize()
-
- log.Log(INFO, "showView() Clear() and Fprint() here wId =", w.cuiName)
- w.v.Clear()
- fmt.Fprint(w.v, w.labelN)
- log.Log(INFO, "showView() textResize() changed. Should recreateView here wId =", w.cuiName)
*/
-
- /*
- // if the gocui element has changed where it is supposed to be on the screen
- // recreate it
- if x0 != w.gocuiSize.w0 {
- w.recreateView()
- return
- }
- if y0 != w.gocuiSize.h0 {
- log.Log(ERROR, "showView() start hight mismatch id=", w.cuiName, "gocui h vs computed h =", w.gocuiSize.h0, y0)
- w.recreateView()
- return
- }
- if x1 != w.gocuiSize.w1 {
- log.Log(INFO, "showView() too wide", w.cuiName, "w,w", w.gocuiSize.w1, x1)
- w.recreateView()
- return
- }
- if y1 != w.gocuiSize.h1 {
- log.Log(ERROR, "showView() too high", w.cuiName, "h,h", w.gocuiSize.h1, y1)
- w.recreateView()
- return
- }
- */
-
- // w.SetVisible(true)
}
// create or recreate the gocui widget visible