diff options
| author | Jeff Carr <[email protected]> | 2022-10-20 06:55:42 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-20 06:55:42 -0500 |
| commit | b8ef0bb05dc14bc4291f3d156b199fa125cdb9d7 (patch) | |
| tree | 71280d7f01805dfbd430f71df16858079686b8fc /toolkit/andlabs/structs.go | |
| parent | f3af1f5b7ff78b3f73d7510622fc9633dec36d35 (diff) | |
Squashed commit of the following:
all non binary tree structs are gone (almost all)
Use names from https://en.wikipedia.org/wiki/Graphical_widget
toolkit andlabs/ui is isolated from being accessable
all direct references to andlabs are removed
working dropdown widgets
add debugging more buttons and windows
Diffstat (limited to 'toolkit/andlabs/structs.go')
| -rw-r--r-- | toolkit/andlabs/structs.go | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/toolkit/andlabs/structs.go b/toolkit/andlabs/structs.go index a089a12..df34194 100644 --- a/toolkit/andlabs/structs.go +++ b/toolkit/andlabs/structs.go @@ -30,6 +30,7 @@ type Toolkit struct { uiBox2 *ui.Box // temporary hack while implementing tabs uiButton *ui.Button uiControl *ui.Control + uiCombobox *ui.Combobox uiEntry *ui.Entry uiGroup *ui.Group uiLabel *ui.Label @@ -39,6 +40,13 @@ type Toolkit struct { uiText *ui.EditableCombobox uiWindow *ui.Window UiWindowBad *ui.Window + + // used as a counter to work around limitations of widgets like combobox + // this is probably fucked up and in many ways wrong because of unsafe goroutine threading + // but it's working for now due to the need for need for a correct interaction layer betten toolkits + c int + val map[int]string + text string } func (t *Toolkit) GetText() string { @@ -53,6 +61,12 @@ func (t *Toolkit) GetText() string { } return t.uiEntry.Text() } + if (t.uiCombobox != nil) { + if (DebugToolkit) { + log.Println("gui.Toolkit.GetText() =", t.text) + } + return t.text + } return "" } @@ -131,6 +145,9 @@ func (t *Toolkit) Dump() { if (t.uiButton != nil) { log.Println("gui.Toolkit.Dump() uiButton =", t.uiButton) } + if (t.uiCombobox != nil) { + log.Println("gui.Toolkit.Dump() uiCombobox =", t.uiCombobox) + } if (t.uiWindow != nil) { log.Println("gui.Toolkit.Dump() uiWindow =", t.uiWindow) } @@ -144,6 +161,11 @@ func (t *Toolkit) Dump() { log.Println("gui.Toolkit.Dump() uiSlider =", t.uiSlider) } if (t.OnExit != nil) { - log.Println("gui.Toolkit.Dump() uiExit =", t.OnExit) + log.Println("gui.Toolkit.Dump() OnExit =", t.OnExit) + } + if (t.Custom != nil) { + log.Println("gui.Toolkit.Dump() Custom =", t.Custom) } + log.Println("gui.Toolkit.Dump() c =", t.c) + log.Println("gui.Toolkit.Dump() val =", t.val) } |
