summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 13:54:06 -0600
committerJeff Carr <[email protected]>2024-01-06 13:54:06 -0600
commit4ed50c9747e76797985952f36a1273300b2ae302 (patch)
tree0a9ec348f8f28ebedc8d4c2e7bc0dc0dde840429
parent30832551c35db0e398cee43d302e44b0de2e65bc (diff)
support Make()/Draw() state
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--basicWindow.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/basicWindow.go b/basicWindow.go
index 2f34513..6385a5e 100644
--- a/basicWindow.go
+++ b/basicWindow.go
@@ -89,6 +89,24 @@ func (w *BasicWindow) Vertical() {
log.Log(INFO, "BasicWindow() w.vertical =", w.vertical)
}
+func (w *BasicWindow) Make() {
+ if ! w.Initialized() {return}
+ // various timeout settings
+ w.win = w.parent.RawWindow(w.name)
+ w.win.Custom = func() {
+ log.Warn("BasicWindow.Custom() closed. TODO: handle this", w.name)
+ }
+ if w.vertical {
+ w.box = w.win.NewBox("bw vbox", false)
+ log.Log(INFO, "BasicWindow.Custom() made vbox")
+ } else {
+ w.box = w.win.NewBox("bw hbox", true)
+ log.Log(INFO, "BasicWindow.Custom() made hbox")
+ }
+
+ w.ready = true
+}
+
func (w *BasicWindow) Draw() {
if ! w.Initialized() {return}
// various timeout settings