summaryrefslogtreecommitdiff
path: root/toolkit/widget.go
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/widget.go')
-rw-r--r--toolkit/widget.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/toolkit/widget.go b/toolkit/widget.go
index 0a1dda3..01215ed 100644
--- a/toolkit/widget.go
+++ b/toolkit/widget.go
@@ -19,7 +19,7 @@ type ActionType int
// "Interaction" as per wikipedia [[User interface]]
// Could a protobuf be used here? (Can functions be passed?)
type Widget struct {
- Name string
+ // Name string
Type WidgetType
// This function is how you interact with the toolkit
@@ -27,7 +27,6 @@ type Widget struct {
// Hopefully this will be the barrier between the goroutines
// TODO: move this interaction to channels
Custom func()
- Callback func()
// re-adding an id to test channels
Id int
@@ -55,7 +54,7 @@ type Action struct {
// this should be the widget
// if the action is New, Hide, Enable, etc
Widget *Widget
- Callback func(int)
+ Callback func(int) bool
// This is how the values are passed back and forth
// values from things like checkboxes & dropdown's
@@ -66,6 +65,8 @@ type Action struct {
// (still probably not, almost certainly not. not possible. layer violation?)
S string // not safe to have 'S'
+ A any
+
// This GUI is intended for simple things
// We are not laying out PDF's here
// This is used for things like a slider(0,100)