diff options
| author | Jeff Carr <[email protected]> | 2023-12-20 17:28:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-20 17:28:00 -0600 |
| commit | 48dfdf322b2cf379d8deeff678747907b604637f (patch) | |
| tree | f813fc169ac1eb050c39533cc9612c74c9caebd7 /toolkit/andlabs-direct/button.go | |
| parent | dd6d1a639b86ab12a2bf537b8588dd5ae60cdad7 (diff) | |
remove direct code since it probably doesn't work
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs-direct/button.go')
| -rw-r--r-- | toolkit/andlabs-direct/button.go | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/toolkit/andlabs-direct/button.go b/toolkit/andlabs-direct/button.go deleted file mode 100644 index e0b7d97..0000000 --- a/toolkit/andlabs-direct/button.go +++ /dev/null @@ -1,79 +0,0 @@ -package toolkit - -import "log" -// import "os" - -import "github.com/andlabs/ui" -import _ "github.com/andlabs/ui/winmanifest" - -// make new Group here -func (t Toolkit) NewButton(name string) *Toolkit { - var newt Toolkit - var b *ui.Button - - if t.broken() { - return nil - } - - if (DebugToolkit) { - log.Println("gui.Toolbox.NewButton() create", name) - } - b = ui.NewButton(name) - newt.uiButton = b - - b.OnClicked(func(*ui.Button) { - log.Println("TODO: IN TOOLKIT GOROUTINE. SHOULD LEAVE HERE VIA channels. button name =", name) - t.Dump() - newt.Dump() - if (DebugToolkit) { - log.Println("wit/gui/toolkit NewButton() Should do something here") - } - if (newt.Custom == nil) { - if (DebugToolkit) { - log.Println("wit/gui/toolkit NewButton() toolkit.Custom == nil") - } - } else { - if (DebugToolkit) { - log.Println("wit/gui/toolkit NewButton() toolkit.Custom() START") - } - newt.Custom() - return - if (DebugToolkit) { - log.Println("wit/gui/toolkit NewButton() toolkit.Custom() END") - } - } - if (t.Custom == nil) { - if (DebugToolkit) { - log.Println("wit/gui/toolkit NewButton() parent toolkit.Custom == nil") - } - } else { - if (DebugToolkit) { - log.Println("wit/gui/toolkit NewButton() running parent toolkit.Custom() START (IS THIS A BAD IDEA?)") - } - t.Custom() - return - if (DebugToolkit) { - log.Println("wit/gui/toolkit NewButton() running parent toolkit.Custom() END (IS THIS A BAD IDEA?)") - } - } - log.Println("TODO: LEFT TOOLKIT GOROUTINE WITH NOTHING TO DO button name =", name) - }) - - if (DebugToolkit) { - log.Println("gui.Toolbox.NewButton() about to append to Box parent t:", name) - t.Dump() - log.Println("gui.Toolbox.NewButton() about to append to Box new t:", name) - newt.Dump() - } - if (t.uiBox != nil) { - t.uiBox.Append(b, stretchy) - } else if (t.uiWindow != nil) { - t.uiWindow.SetChild(b) - } else { - log.Println("ERROR: wit/gui andlabs couldn't place this button in a box or a window") - log.Println("ERROR: wit/gui andlabs couldn't place this button in a box or a window") - return &t - } - - return &newt -} |
