summaryrefslogtreecommitdiff
path: root/toolkit/gocui/widget.go
blob: 758ac3899713e2e3e6b95aabf7b3a48fb9e7c235 (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
package main

// passes information between the toolkit library (plugin)

// All Toolkit interactions should be done via a channel or Queue()

// This is the only thing that is passed between the toolkit plugin

// what names should be used? This is not part of [[Graphical Widget]]
// Event() seems like a good name.
// Could a protobuf be used here? (Can functions be passed?)
type Widget struct {
	i     int
	s     string

	Name   string
	Width  int
	Height int

	Event     func(*Widget) *Widget

	// Probably deprecate these
	OnChanged func(*Widget)
	Custom    func(*Widget)
	OnExit    func(*Widget)
}