summaryrefslogtreecommitdiff
path: root/gocui/click.go
diff options
context:
space:
mode:
Diffstat (limited to 'gocui/click.go')
-rw-r--r--gocui/click.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/gocui/click.go b/gocui/click.go
index 60c2067..c59fc0f 100644
--- a/gocui/click.go
+++ b/gocui/click.go
@@ -26,7 +26,7 @@ func unsetCurrent(n *node) {
// of the current widgets if that widget is supposed
// to be in current display
func (n *node) updateCurrent() {
- log.Log(NOW, "updateCurrent()", n.Name)
+ log.Log(NOW, "updateCurrent()", n.progname)
if n.WidgetType == widget.Tab {
if n.IsCurrent() {
// n.tk.color = &colorActiveT
@@ -84,17 +84,17 @@ func setCurrentTab(n *node) {
w.isCurrent = true
p := n.parent.tk
p.isCurrent = true
- log.Log(NOW, "setCurrent()", n.Name)
+ log.Log(NOW, "setCurrent()", n.progname)
}
func (n *node) doWidgetClick() {
switch n.WidgetType {
case widget.Root:
// THIS IS THE BEGINING OF THE LAYOUT
- log.Log(NOW, "doWidgetClick()", n.Name)
+ log.Log(NOW, "doWidgetClick()", n.progname)
redoWindows(0,0)
case widget.Flag:
- log.Log(NOW, "doWidgetClick() FLAG widget name =", n.Name)
+ log.Log(NOW, "doWidgetClick() FLAG widget name =", n.progname)
log.Log(NOW, "doWidgetClick() if this is the dropdown menu, handle it here?")
case widget.Window:
if (me.currentWindow == n) {
@@ -112,7 +112,7 @@ func (n *node) doWidgetClick() {
n.redoTabs(me.TabW, me.TabH)
for _, child := range n.children {
if (child.currentTab == true) {
- log.Log(NOW, "FOUND CURRENT TAB", child.Name)
+ log.Log(NOW, "FOUND CURRENT TAB", child.progname)
setCurrentTab(child)
child.placeWidgets(me.RawW, me.RawH)
child.showWidgets()
@@ -149,7 +149,7 @@ func (n *node) doWidgetClick() {
// n.placeWidgets(p.tk.startH, newH)
n.toggleTree()
case widget.Checkbox:
- if (n.B) {
+ if (widget.GetBool(n.value)) {
n.setCheckbox(false)
} else {
n.setCheckbox(true)
@@ -166,10 +166,10 @@ func (n *node) doWidgetClick() {
n.showWidgets()
case widget.Box:
// w.showWidgetPlacement(logNow, "drawTree()")
- if (n.horizontal) {
- log.Log(NOW, "BOX IS HORIZONTAL", n.Name)
+ if (n.direction == widget.Horizontal) {
+ log.Log(NOW, "BOX IS HORIZONTAL", n.progname)
} else {
- log.Log(NOW, "BOX IS VERTICAL", n.Name)
+ log.Log(NOW, "BOX IS VERTICAL", n.progname)
}
// n.placeWidgets()
n.toggleTree()
@@ -207,17 +207,17 @@ func (n *node) doWidgetClick() {
} else {
var dnsList string
for i, s := range n.vals {
- log.Log(NOW, "AddText()", n.Name, i, s)
+ log.Log(NOW, "AddText()", n.progname, i, s)
dnsList += s + "\n"
}
me.ddNode = n
log.Log(NOW, "new dns list should be set to:", dnsList)
- me.ddview.Text = dnsList
+ me.ddview.label = dnsList
me.ddview.SetText(dnsList)
me.ddview.SetVisible(true)
}
for i, s := range n.vals {
- log.Log(NOW, "AddText()", n.Name, i, s)
+ log.Log(NOW, "AddText()", n.progname, i, s)
}
default:
}
@@ -262,8 +262,8 @@ func click(g *gocui.Gui, v *gocui.View) error {
// n := me.rootNode.findWidgetName(v.Name())
n := findUnderMouse()
if (n != nil) {
- log.Log(NOW, "click() Found widget =", n.WidgetId, n.Name, ",", n.Text)
- if (n.Name == "DropBox") {
+ log.Log(NOW, "click() Found widget =", n.WidgetId, n.progname, ",", n.label)
+ if (n.progname == "DropBox") {
log.Log(NOW, "click() this is the dropdown menu. set a flag here what did I click? where is the mouse?")
log.Log(NOW, "click() set a global dropdown clicked flag=true here")
me.ddClicked = true
@@ -333,7 +333,7 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error {
found = findUnderMouse()
if (me.ctrlDown == nil) {
setupCtrlDownWidget()
- me.ctrlDown.Text = found.Name
+ me.ctrlDown.label = found.progname
me.ctrlDown.tk.cuiName = "ctrlDown"
// me.ctrlDown.parent = me.rootNode
}
@@ -341,7 +341,7 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error {
if (found == nil) {
found = me.rootNode
}
- me.ctrlDown.Text = found.Name
+ me.ctrlDown.label = found.progname
newR := found.realGocuiSize()
cd.gocuiSize.w0 = newR.w0
cd.gocuiSize.h0 = newR.h0