summaryrefslogtreecommitdiff
path: root/toolkit/nocui/structs.go
blob: ed004de7991ce7f60d9fc9304502e616c1c79dfa (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
package main

import "git.wit.org/wit/gui/toolkit"

var callback chan toolkit.Action

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

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

	Name   string
	Text   string

	// This is how the values are passed back and forth
	// values from things like checkboxes & dropdown's
	B	bool
	I	int
	S	string

	A	any // switch to this or deprecate this? pros/cons?

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

	// the internal plugin toolkit structure
	tk *nocuiT
}

// stores the raw toolkit internals
type nocuiT struct {
	Width  int
	Height int

	c int
	val map[int]string
}