Compare commits

..

No commits in common. "guimaster" and "v1.1.24" have entirely different histories.

10 changed files with 59 additions and 85 deletions

View File

@ -1,4 +1,4 @@
all: goimports vet
all:
@echo
@echo This defines the primitive widgets
@echo
@ -19,7 +19,3 @@ redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
vet:
@GO111MODULE=off go vet
@echo this go library builds okay

View File

@ -8,7 +8,6 @@ Principles:
* Make code using this package simple to use
* Widget names should try to match [Wikipedia Graphical widget]
* It's ok to guess. Try to do something sensible.
* TODO: use protobuf
```
### Links

View File

@ -42,9 +42,6 @@ type Action struct {
// Make widgets fill up the space available
Expand bool
TablePB []byte // a table protobuf
WidgetPB []byte // a tree of widgets
}
type ActionType int // Add, SetText, Click, Hide, Append, Delete, etc
@ -112,22 +109,6 @@ func (s ActionType) String() string {
return "Move"
case Dump:
return "Dump"
case User:
return "User"
case ToolkitLoad:
return "ToolkitLoad"
case ToolkitInit:
return "ToolkitInit"
case ToolkitClose:
return "ToolkitClose"
case ToolkitPanic:
return "ToolkitPanic"
case Heartbeat:
return "Heartbeat"
case UserQuit:
return "UserQuit"
case EnableDebug:
return "EnableDebug"
}
return "gui ActionType.String() Error. must be missing something in the code here"
return "ActionType.String() Error"
}

2
doc.go
View File

@ -5,6 +5,7 @@ There are lots of issues when supporting multiple toolkit plugin
geometries. The geometries vary widely especially between the
graphical displays and the serial console ones. [Graphical Widget](http://en.wikipedia.org/Graphical_Widget)
To simplyfy this, we stick to using the concepts:
------------------------------ ^
@ -43,7 +44,6 @@ Horizontal means layout widgets like books on a bookshelf
---------------------------------
Vertical means layout widgets like books in a stack
----------
| Widget |
----------

View File

@ -25,7 +25,6 @@ Horizontal means layout widgets like books on a bookshelf
---------------------------------
Vertical means layout widgets like books in a stack
----------
| Widget |
----------
@ -52,4 +51,5 @@ func (s Orientation) String() string {
default:
return "Horizontal"
}
return "Horizontal"
}

View File

@ -56,6 +56,7 @@ func GetString(A any) string {
// log.Warn("getString uknown kind", k, "value =", A)
return ""
}
return ""
}
// work like unix os.Exec() ? everything other than 0 is false
@ -88,6 +89,7 @@ func GetBool(A any) bool {
// log.Warn("getString uknown kind", k, "value =", A)
return false
}
return false
}
// work like unix? everything other than 0 is false
@ -119,4 +121,5 @@ func GetInt(A any) int {
// log.Warn("getString uknown kind", k, "value =", A)
return -1
}
return -1
}

View File

@ -1,7 +1,5 @@
package widget
// TODO: redo this with protocol buffers
// This is the state of the widget
// The whole state of the widget is sent

View File

@ -33,7 +33,6 @@ const (
Textbox // is this a Label with edit=true
Slider // like a progress bar
Spinner // like setting the oven temperature
Table // a full window & table
Separator // TODO
Image // TODO
Area // TODO
@ -80,8 +79,6 @@ func (s WidgetType) String() string {
return "Spinner"
case Separator:
return "Separator"
case Table:
return "Table"
case Image:
return "Image"
case Area: