summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-13 21:30:18 -0600
committerJeff Carr <[email protected]>2024-01-13 21:30:18 -0600
commit9d468879c70f037377e8d901d251fedc0e3c84fd (patch)
treeabc5b03d923e0f1fe3bc4f8f2b4bd2fe8c906c9f
parentf3ae4979587ac7bac8d0686a29fd746e691ca488 (diff)
work on hidden widgetsv0.12.1
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 d866d8e..d4a9766 100644
--- a/basicWindow.go
+++ b/basicWindow.go
@@ -91,6 +91,10 @@ func (w *BasicWindow) Horizontal() {
func (w *BasicWindow) Make() {
if ! w.Initialized() {return}
+ if w.win != nil {
+ log.Warn("BasicWindow.Make() window was already created")
+ return
+ }
// various timeout settings
w.win = w.parent.RawWindow(w.title)
w.win.Custom = func() {
@@ -107,8 +111,22 @@ func (w *BasicWindow) Make() {
w.ready = true
}
+func (w *BasicWindow) TestDraw() {
+ if ! w.Initialized() {return}
+ if w.win == nil {
+ log.Warn("BasicWindow.TestDraw() can't draw on window == nil")
+ return
+ }
+ log.Warn("BasicWindow.TestDraw() RUNNING HERE")
+ w.win.TestDraw()
+}
+
func (w *BasicWindow) Draw() {
if ! w.Initialized() {return}
+ if w.win != nil {
+ log.Warn("BasicWindow.Draw() window was already created")
+ return
+ }
// various timeout settings
w.win = w.parent.NewWindow(w.title)
w.win.Custom = func() {