summaryrefslogtreecommitdiff
path: root/toolkit/nocui/event.go
blob: fca1d0162c8873601fbd260e27178ccf3e8f7004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package main

import (
	"go.wit.com/gui/toolkit"
)

func (n *node) doWidgetClick() {
	switch n.WidgetType {
	case toolkit.Root:
		// THIS IS THE BEGINING OF THE LAYOUT
		// rootNode.nextW = 0
		// rootNode.nextH = 0
		// rootNode.redoTabs(true)
	case toolkit.Flag:
		// me.rootNode.redoColor(true)
		// rootNode.dumpTree(true)
	case toolkit.Window:
		// setCurrentWindow(w)
		n.doUserEvent()
	case toolkit.Tab:
		// setCurrentTab(w)
	case toolkit.Group:
		// n.placeWidgets()
		// n.toggleTree()
	case toolkit.Checkbox:
		if (n.B) {
			// n.setCheckbox(false)
		} else {
			// n.setCheckbox(true)
		}
		n.doUserEvent()
	case toolkit.Grid:
		// rootNode.hideWidgets()
		// n.placeGrid()
		// n.showWidgets()
	case toolkit.Box:
		// n.showWidgetPlacement(logNow, "drawTree()")
		if (n.B) {
			log("BOX IS HORIZONTAL", n.Name)
		} else {
			log("BOX IS VERTICAL", n.Name)
		}
	case toolkit.Button:
		n.doUserEvent()
	default:
	}
}