diff options
| author | Jeff Carr <[email protected]> | 2022-11-06 12:59:24 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-11-06 12:59:24 -0600 |
| commit | e55fb6675d692e3f44fa67b02b12661e476bd028 (patch) | |
| tree | c16084dea9779f5ef244adb3937d33adb17e7bad /toolkit/andlabs/group.go | |
| parent | 099efb6b24caf9eaad50d7386636a7ac23552bde (diff) | |
start trying to make the tookits pluginsv0.4.3
totally minimize helloworld demo
try to make a button plugin example
debug changes
final changes before attempting to use a golang plugin
actually running gocui as a plugin
add gocli-as-plugin example
try to convert the go-cui toolkit into a plugin
doc updates
make a minimal console gui
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/group.go')
| -rw-r--r-- | toolkit/andlabs/group.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/toolkit/andlabs/group.go b/toolkit/andlabs/group.go index f48a78d..5b315a4 100644 --- a/toolkit/andlabs/group.go +++ b/toolkit/andlabs/group.go @@ -10,19 +10,21 @@ import _ "github.com/andlabs/ui/winmanifest" func (t Toolkit) NewGroup(title string) *Toolkit { var newt Toolkit - if (t.uiBox == nil) { - log.Println("gui.ToolboxNode.NewGroup() node.UiBox == nil. I can't add a range UI element without a place to put it") - log.Println("probably could just make a box here?") - os.Exit(0) - return nil - } - if (DebugToolkit) { log.Println("gui.Toolbox.NewGroup() create", title) } g := ui.NewGroup(title) g.SetMargined(margin) - t.uiBox.Append(g, stretchy) + + if (t.uiBox != nil) { + t.uiBox.Append(g, stretchy) + } else if (t.uiWindow != nil) { + t.uiWindow.SetChild(g) + } else { + log.Println("gui.ToolboxNode.NewGroup() node.UiBox == nil. I can't add a range UI element without a place to put it") + log.Println("probably could just make a box here?") + os.Exit(0) + } hbox := ui.NewVerticalBox() hbox.SetPadded(padded) @@ -30,6 +32,7 @@ func (t Toolkit) NewGroup(title string) *Toolkit { newt.uiGroup = g newt.uiBox = hbox + newt.uiWindow = t.uiWindow newt.Name = title t.Dump() |
