summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-29 03:00:03 -0600
committerJeff Carr <[email protected]>2023-12-29 03:00:03 -0600
commit015847b28ee5dc5c7cfd29dfcbe14e3a2624569c (patch)
treeb69c43edf3c57d9cdc12b29f75a8c43d2059c2d1 /structs.go
parent48dfdf322b2cf379d8deeff678747907b604637f (diff)
add 'gadgets'
attempt func (n *gui.Node) blah() definition better docs for pkg.go.dev how logging should work fix syntax links for pkg.go.dev Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go17
1 files changed, 12 insertions, 5 deletions
diff --git a/structs.go b/structs.go
index 5dc2d5f..b9d4d89 100644
--- a/structs.go
+++ b/structs.go
@@ -61,8 +61,13 @@ type Node struct {
WidgetType toolkit.WidgetType
+ // for NewLabel("hello"), Text = 'hello'
Text string // what is visable to the user
- Name string // a name useful for programming
+
+ // for NewLabel("hello"), if Name = 'HELLO'
+ // this can programatically identify the widget
+ // The name must be unique
+ Name string // a name useful for debugging
// used for Windows in toolkits measured in pixels
width int
@@ -72,19 +77,21 @@ type Node struct {
X int
Y int
- // the grid max width and height
- // ignore max height when there is no space left?
+ // the grid widget max width and height
+ // the max height can be implemented in the toolkit plugin
+ // to restrict the number of rows to display
W int
H int
+
// where the next widget should be put in this grid
NextW int
NextH int
- // if this widget is in a grid, this is the position
+ // if this widget is in a grid, this is the position of a widget
AtW int
AtH int
- // used for values
+ // the current widget value.
I int
S string
B bool