diff options
Diffstat (limited to 'add.go')
| -rw-r--r-- | add.go | 24 |
1 files changed, 4 insertions, 20 deletions
@@ -2,16 +2,17 @@ package main import ( "go.wit.com/log" + "go.wit.com/toolkits/tree" "go.wit.com/widget" ) -func add(a *widget.Action) { +func add(a *widget.Action) *tree.Node { log.Warn("andlabs add()", a.WidgetId, a.State.ProgName) if a.WidgetType == widget.Root { if me.treeRoot == nil { me.treeRoot = me.myTree.AddNode(a) } - return + return me.treeRoot } n := me.myTree.AddNode(a) @@ -20,52 +21,35 @@ func add(a *widget.Action) { case widget.Window: log.Warn("SPEEDY Add window", n.WidgetId, n.GetProgName()) newWindow(p, n) - return case widget.Group: log.Warn("SPEEDY Add Group", n.WidgetId, n.GetProgName()) newGroup(p, n) - return case widget.Grid: newGrid(n) - return case widget.Box: newBox(n) - return - /* - case widget.Tab: - newTab(n) - return - */ case widget.Label: newLabel(p, n) - return case widget.Button: newButton(p, n) - return case widget.Checkbox: newCheckbox(p, n) - return case widget.Spinner: newSpinner(p, n) - return case widget.Slider: newSlider(p, n) - return case widget.Dropdown: newDropdown(p, n) - return case widget.Combobox: newCombobox(p, n) - return case widget.Textbox: newTextbox(p, n) - return /* case widget.Image: newImage(p, n) - return */ default: log.Log(ERROR, "add() error TODO: ", n.WidgetType, n.State.ProgName) } + return n } |
