still a no
This commit is contained in:
parent
bf8cbddf1a
commit
8ce9ca882a
|
@ -144,9 +144,8 @@ var notsure *guiWidget
|
|||
// use this to test code ideas
|
||||
func theNotsure(g *gocui.Gui, v *gocui.View) error {
|
||||
log.Info("got keypress 2. now what?")
|
||||
wRoot := me.treeRoot.TK.(*guiWidget)
|
||||
w, h := g.MousePosition()
|
||||
wRoot.redoWindows(w, h)
|
||||
redoWindows(w, h)
|
||||
// closes anything under your mouse
|
||||
if notsure == nil {
|
||||
// notsure = makeDropdownView("addWidget() notsure")
|
||||
|
|
21
plugin.go
21
plugin.go
|
@ -115,8 +115,6 @@ func newaction(n *tree.Node, atype widget.ActionType) {
|
|||
w.deleteNode()
|
||||
}
|
||||
n.DeleteNode()
|
||||
wRoot := me.treeRoot.TK.(*guiWidget)
|
||||
wRoot.redoWindows(0, 0)
|
||||
default:
|
||||
log.Log(ERROR, "newaction() UNHANDLED Action Type =", atype, "WidgetType =", n.WidgetType, "Name =", n.ProgName())
|
||||
}
|
||||
|
@ -183,22 +181,3 @@ func (w *guiWidget) SetText(text string) {
|
|||
w.Show()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
func (w *guiWidget) Set(val any) {
|
||||
if w == nil {
|
||||
log.Log(WARN, "Set() w == nil. val =", val)
|
||||
return
|
||||
}
|
||||
log.Log(INFO, "Set() value =", val)
|
||||
|
||||
w.value = val.(string)
|
||||
if w.node.WidgetType == widget.Checkbox {
|
||||
w.node.State.Checked = widget.GetBool(val)
|
||||
w.setCheckbox()
|
||||
}
|
||||
if w.node.WidgetType == widget.Label {
|
||||
w.labelN = widget.GetString(val)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -48,19 +48,12 @@ func addWidget(n *tree.Node) {
|
|||
nw.frame = false
|
||||
// nw.color = &colorWindow
|
||||
nw.setColor(&colorWindow)
|
||||
wRoot := me.treeRoot.TK.(*guiWidget)
|
||||
wRoot.redoWindows(0, 0)
|
||||
// TODO: record the first window here?
|
||||
// do initial setup of helper widgets here:
|
||||
// if me.dropdownV == nil {
|
||||
// me.dropdownV = makeDropdownView("addWidget() ddview2")
|
||||
// }
|
||||
redoWindows(0, 0)
|
||||
hideHelp()
|
||||
showHelp()
|
||||
return
|
||||
case widget.Tab:
|
||||
nw.color = &colorTab
|
||||
// redoWindows(0,0)
|
||||
return
|
||||
case widget.Button:
|
||||
nw.color = &colorButton
|
||||
|
|
|
@ -25,7 +25,7 @@ func (tk *guiWidget) redrawWindow(w int, h int) {
|
|||
}
|
||||
|
||||
// re-draws the buttons for each of the windows
|
||||
func (tk *guiWidget) redoWindows(nextW int, nextH int) {
|
||||
func redoWindows(nextW int, nextH int) {
|
||||
for _, win := range findWindows() {
|
||||
win.gocuiSize.w0 = nextW
|
||||
win.gocuiSize.h0 = nextH
|
||||
|
|
Loading…
Reference in New Issue