diff options
Diffstat (limited to 'action.go')
| -rw-r--r-- | action.go | 43 |
1 files changed, 3 insertions, 40 deletions
@@ -54,15 +54,6 @@ func ready(n *tree.Node) bool { } return true } -func (n *node) ready() bool { - if n == nil { - return false - } - if n.tk == nil { - return false - } - return true -} func show(n *tree.Node, b bool) { var tk *guiWidget @@ -101,10 +92,10 @@ func enable(n *tree.Node, b bool) { } } -func (n *node) pad(b bool) { +func pad(n *tree.Node, b bool) { log.Warn("pad() on WidgetId =", n.WidgetId) - t := n.tk + t := n.TK.(*guiWidget) if t == nil { log.Log(ERROR, "pad() toolkit struct == nil. for", n.WidgetId) return @@ -123,33 +114,7 @@ func (n *node) pad(b bool) { case widget.Box: t.uiBox.SetPadded(b) default: - log.Log(ERROR, "TODO: implement pad() for", n.WidgetType, n.progname) - } -} - -func (n *node) move(newParent *node) { - p := n.parent - - switch p.WidgetType { - case widget.Group: - case widget.Tab: - // tabSetMargined(tParent.uiTab, true) - case widget.Window: - // t.uiWindow.SetBorderless(false) - case widget.Grid: - // t.uiGrid.SetPadded(true) - case widget.Box: - log.Log(INFO, "TODO: move() where =", p.ParentId) - log.Log(INFO, "TODO: move() for widget =", n.WidgetId) - - stretchy = true - if p.tk.uiBox != nil { - p.tk.uiBox.Append(n.tk.uiControl, stretchy) - } - default: - log.Log(ERROR, "TODO: need to implement move() for type =", n.WidgetType) - log.Log(ERROR, "TODO: need to implement move() for where =", p.ParentId) - log.Log(ERROR, "TODO: need to implement move() for widget =", n.WidgetId) + log.Log(ERROR, "TODO: implement pad() for", n.WidgetType, n.GetProgName()) } } @@ -197,7 +162,6 @@ func processAction(a *widget.Action) { panic("me.treeRoot == nil") } - if a.ActionType == widget.Add { add(a) return @@ -219,7 +183,6 @@ func processAction(a *widget.Action) { return } - switch a.ActionType { case widget.Delete: widgetDelete(n) |
