diff options
| author | Jeff Carr <[email protected]> | 2024-01-16 12:55:20 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-16 12:55:20 -0600 |
| commit | ba95c13799740b5f55541fc5e8ab9f1d34f7e421 (patch) | |
| tree | 1e04c62ea4ac6a133978e14c4d33babe46f8fe1e /common/structs.go | |
| parent | 29c39d7a1cbc1f071fa819e589fa6ed93fcb7d80 (diff) | |
use widget.GetString()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'common/structs.go')
| -rw-r--r-- | common/structs.go | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/common/structs.go b/common/structs.go new file mode 100644 index 0000000..32eed8a --- /dev/null +++ b/common/structs.go @@ -0,0 +1,43 @@ +package main + +/* + These code should be common to all gui plugins + + There are some helper functions that are probably going to be + the same everywhere. Mostly due to handling the binary tree structure + and the channel communication + + For now, it's just a symlink to the 'master' version in + ./toolkit/nocui/common.go +*/ + +import ( + "reflect" + "strconv" + + "go.wit.com/log" + "go.wit.com/gui/widget" +) + +// this is the channel we send user events like +// mouse clicks or keyboard events back to the program +var callback chan widget.Action + +// this is the channel we get requests to make widgets +var pluginChan chan widget.Action + +type Node struct { + parent *node + children []*node + + WidgetId int // widget ID + WidgetType widget.WidgetType + ParentId int // parent ID + + State widget.State + + // the internal plugin toolkit structure + // in the gtk plugin, it has gtk things like margin & border settings + // in the text console one, it has text console things like colors for menus & buttons + TK any +} |
