From 015847b28ee5dc5c7cfd29dfcbe14e3a2624569c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 29 Dec 2023 03:00:03 -0600 Subject: 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 --- structs.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'structs.go') 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 -- cgit v1.2.3