summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/structs.go
blob: 45b6d1dc44fbd0baecf35c9ca66e405cd789710c (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"

import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"

// stores the raw toolkit internals
type andlabsT struct {
	id     string

	Name   string
	Type   toolkit.WidgetType
	Width  int
	Height int
	tw	*toolkit.Widget
	parent	*andlabsT

	uiBox     *ui.Box
	uiButton  *ui.Button
	uiControl *ui.Control
	uiCombobox *ui.Combobox
	uiCheckbox *ui.Checkbox
	uiEntry   *ui.Entry
	uiGroup   *ui.Group
	uiLabel   *ui.Label
	uiSlider  *ui.Slider
	uiSpinbox *ui.Spinbox
	uiTab     *ui.Tab
	uiWindow  *ui.Window
	// UiWindowBad  *ui.Window // erase this
	uiMultilineEntry   *ui.MultilineEntry
	uiEditableCombobox    *ui.EditableCombobox

	// used as a counter to work around limitations of widgets like combobox
	// this is probably fucked up and in many ways wrong because of unsafe goroutine threading
	// but it's working for now due to the need for need for a correct interaction layer betten toolkits
	c int
	val map[int]string
	text   string
}