From 9c548faedacfdfbda09d170c6665fcdb988bd877 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Feb 2025 03:28:05 -0600 Subject: try to start with STDOUT offscreen --- stdoutShow.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'stdoutShow.go') diff --git a/stdoutShow.go b/stdoutShow.go index 6316aed..dd5a403 100644 --- a/stdoutShow.go +++ b/stdoutShow.go @@ -91,5 +91,32 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View { me.stdout.tk.v = v me.stdout.tk.DrawAt(me.stdout.lastW, me.stdout.lastH) + relocateStdoutOffscreen() return v } + +func relocateStdoutOffscreen() { + newW := 10 + newH := 0 - me.stdout.h - 4 + me.stdout.tk.relocateStdout(newW, newH) +} + +func (tk *guiWidget) relocateStdout(w int, h int) { + w0 := w + h0 := h + w1 := w + me.stdout.w + h1 := h + me.stdout.h + + tk.gocuiSize.w0 = w0 + tk.gocuiSize.w1 = w1 + tk.gocuiSize.h0 = h0 + tk.gocuiSize.h1 = h1 + + tk.full.w0 = w0 + tk.full.w1 = w1 + tk.full.h0 = h0 + tk.full.h1 = h1 + + me.baseGui.SetView("msg", w0, h0, w1, h1, 0) + // me.baseGui.SetViewOnBottom("msg") +} -- cgit v1.2.3