diff options
| author | Jeff Carr <[email protected]> | 2021-10-25 05:41:12 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-25 05:41:12 -0500 |
| commit | c4012643faf61722e319e8126b0adc55bd67294d (patch) | |
| tree | 689157c61abf7aa283421fb652c2760ef228a9f9 /find.go | |
| parent | cbb777cb3dabee7fd7a9979bf4690a4ebf593666 (diff) | |
CLEAN: clean up labels
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'find.go')
| -rw-r--r-- | find.go | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -0,0 +1,35 @@ +package gui + +import ( + "log" + +// "github.com/andlabs/ui" +// _ "github.com/andlabs/ui/winmanifest" +// "github.com/davecgh/go-spew/spew" +) + + +func FindWindow(s string) *GuiWindow { + for name, window := range Data.WindowMap { + if name == s { + return window + } + } + log.Printf("COULD NOT FIND WINDOW", s) + return nil +} + +func FindBox(s string) *GuiBox { + for name, window := range Data.WindowMap { + if name != s { + continue + } + for name, abox := range window.BoxMap { + log.Printf("gui.DumpBoxes() \tBOX mapname=%-12s abox.Name=%-12s", name, abox.Name) + return abox + } + log.Println("gui.FindBox() NEED TO INIT WINDOW name =", name) + } + log.Println("gui.FindBox() COULD NOT FIND BOX", s) + return nil +} |
