summaryrefslogtreecommitdiff
path: root/common.go
blob: d87d0b50470f9f4c99c33e217d5a03f17c91c400 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main

import (
	"go.wit.com/widget"
)

type node struct {
	parent   *node
	children []*node

	WidgetId   int // widget ID
	WidgetType widget.WidgetType
	ParentId   int // parent ID

	state widget.State

	// a reference name for programming and debuggign. Must be unique
	progname string

	// the text used for button labesl, window titles, checkbox names, etc
	label string

	// horizontal  means layout widgets like books on a bookshelf
	// vertical    means layout widgets like books in a stack
	// direction widget.Orientation
	direction widget.Orientation

	// This is how the values are passed back and forth
	// values from things like checkboxes & dropdown's
	value any

	strings []string

	// This is used for things like a slider(0,100)
	X int
	Y int

	// This is for the grid size & widget position
	W   int
	H   int
	AtW int
	AtH int

	vals []string // dropdown menu items

	// horizontal bool `default:false`

	hasTabs    bool // does the window have tabs?
	currentTab bool // the visible tab

	// the internal plugin toolkit structure
	// in the gtk plugin, it has gtk things like margin & border settings
	// in the text console one, it has text console things like colors for menus & buttons
	tk *guiWidget
}

/*
func (n *node) doUserEvent() {
	log.Log(ERROR, "doUserEvent() ERROR")
}
*/