diff options
| author | Jeff Carr <[email protected]> | 2024-01-11 19:32:40 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-11 19:32:40 -0600 |
| commit | ed951e0234d428298bd6b76b07e371ce2ab3cb60 (patch) | |
| tree | 200c77deef52245e59dc96f591e16843a8125927 /structs.go | |
| parent | 5f6afb8cf8293f819711ccdf791296edfd7ce7d6 (diff) | |
var value anyv0.12.2
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -15,7 +15,7 @@ import ( // Native Windows and MacOS toolkits // // If that is the case, this code abstracts the concept of -// windows and makes each window a 'tabs' in a single window. +// windows and makes each window a 'tab' in a single window. // // Reminder from Goals: This is for simple GUI's. // For example, a "Mouse Control Panel" not the GIMP or blender. @@ -23,6 +23,17 @@ import ( var me guiConfig +// Range(1, 10) includes the values 1 and 10 +// almost all toolkits use integers so there doesn't +// seem to be a good idea to use 'type any' here as it +// just makes things more complicated for no good reason +type Range struct { + Low int + High int +} + +type List []string + type guiConfig struct { initOnce sync.Once @@ -56,13 +67,12 @@ type Node struct { WidgetType widget.WidgetType - // for NewLabel("hello"), Text = 'hello' - Text string // what is visable to the user + // the current widget value. + value any - // for NewLabel("hello"), if Name = 'HELLO' // this can programatically identify the widget // The name must be unique - Name string // a name useful for debugging + progname string // a name useful for debugging // used for Windows in toolkits measured in pixels width int @@ -86,11 +96,6 @@ type Node struct { AtW int AtH int - // the current widget value. - I int - S string - B bool - value any // this function is run when there are mouse or keyboard events Custom func() |
