summaryrefslogtreecommitdiff
path: root/toolkit/widget.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-03 10:26:47 -0500
committerJeff Carr <[email protected]>2023-04-03 10:26:47 -0500
commit4b6207743b90968d6b822032a4355e43b6ce6da9 (patch)
tree2cb9f13d5e95f14e165f8e41e8484320b7454177 /toolkit/widget.go
parent0320ebe4bb49ea80761d77af80fa208157ffdb89 (diff)
gocui: working towards correct layout
make a gocui widget binary tree more debugging cleanups sample button app displays in gocui geometry logic closer to correct improvements in gocui layout continued attempts to clean up tabs dump binary tree moving towards proper chan callback() deprecate Widget.Name Signed-off-by: Jeff Carr <[email protected]>
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)