From 355e5ec968427c2b07b78fec12224f31a65df740 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 14 Nov 2022 14:30:28 -0600 Subject: setup building without plugins on windows notes from github remote keep removing os.Exit() rename from andlabs2 back to andlabs rename files for windows andlabs/ui gocui always sets STDOUT a file in /tmp/ Signed-off-by: Jeff Carr --- toolkit/andlabs/structs.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'toolkit/andlabs/structs.go') diff --git a/toolkit/andlabs/structs.go b/toolkit/andlabs/structs.go index 9bba671..2f3fa72 100644 --- a/toolkit/andlabs/structs.go +++ b/toolkit/andlabs/structs.go @@ -1,4 +1,4 @@ -package toolkit +package main import "log" @@ -47,15 +47,15 @@ func GetDebugToolkit () bool { } // stores the raw toolkit internals -type Toolkit struct { +type andlabsT struct { id string Name string Width int Height int - OnChanged func(*Toolkit) - OnExit func(*Toolkit) + OnChanged func(*andlabsT) + OnExit func(*andlabsT) Custom func() @@ -84,18 +84,18 @@ type Toolkit struct { text string } -func (t *Toolkit) String() string { +func (t *andlabsT) String() string { return t.GetText() } -func forceDump(t *Toolkit) { +func forceDump(t *andlabsT) { tmp := DebugToolkit DebugToolkit = true t.Dump() DebugToolkit = tmp } -func (t *Toolkit) GetText() string { +func (t *andlabsT) GetText() string { t.Dump() if (DebugToolkit) { log.Println("gui.Toolkit.Text() Enter") @@ -128,7 +128,7 @@ func (t *Toolkit) GetText() string { return "" } -func (t *Toolkit) SetText(s string) bool { +func (t *andlabsT) SetText(s string) bool { if (DebugToolkit) { log.Println("gui.Toolkit.Text() Enter") scs := spew.ConfigState{MaxDepth: 1} @@ -151,7 +151,7 @@ func (t *Toolkit) SetText(s string) bool { return false } -func sanity(t *Toolkit) bool { +func sanity(t *andlabsT) bool { if (DebugToolkit) { log.Println("gui.Toolkit.Value() Enter") scs := spew.ConfigState{MaxDepth: 1} @@ -166,7 +166,7 @@ func sanity(t *Toolkit) bool { return true } -func (t *Toolkit) SetValue(i int) bool { +func (t *andlabsT) SetValue(i int) bool { log.Println("gui.Toolkit.SetValue() START") if (sanity(t)) { return false @@ -176,7 +176,7 @@ func (t *Toolkit) SetValue(i int) bool { return true } -func (t *Toolkit) Value() int { +func (t *andlabsT) Value() int { if (DebugToolkit) { log.Println("gui.Toolkit.Value() Enter") scs := spew.ConfigState{MaxDepth: 1} @@ -202,7 +202,7 @@ func (t *Toolkit) Value() int { return 0 } -func (t *Toolkit) Dump() { +func (t *andlabsT) Dump() { if ! DebugToolkit { return } -- cgit v1.2.3