diff options
| author | Jeff Carr <[email protected]> | 2021-10-06 05:14:24 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-06 05:14:24 -0500 |
| commit | e93fe915a6747dce10d7314dc968ebb734265ed0 (patch) | |
| tree | e995b23b03d6c4c49cd7a75af8421bb22072a38e | |
| parent | 403dc4780b2c907f3292f4d6504ad5af2a0df7f1 (diff) | |
BUILD: suck it up and try to use go.mod
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | Makefile | 5 | ||||
| -rw-r--r-- | go.mod | 9 | ||||
| -rw-r--r-- | go.sum | 8 | ||||
| -rw-r--r-- | structs.go | 6 | ||||
| -rw-r--r-- | window.go | 4 |
5 files changed, 30 insertions, 2 deletions
@@ -1,4 +1,5 @@ # should update every go dependancy (?) update: - git pull - GO111MODULE="off" go get -v -t -u ./... + # git pull + wit go update + # go get -v -t -u ./... @@ -0,0 +1,9 @@ +module git.wit.org/wit/gui + +go 1.17 + +require ( + github.com/andlabs/ui v0.0.0-20200610043537-70a69d6ae31e + github.com/davecgh/go-spew v1.1.1 + golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d +) @@ -0,0 +1,8 @@ +github.com/andlabs/ui v0.0.0-20200610043537-70a69d6ae31e h1:wSQCJiig/QkoUnpvelSPbLiZNWvh2yMqQTQvIQqSUkU= +github.com/andlabs/ui v0.0.0-20200610043537-70a69d6ae31e/go.mod h1:5G2EjwzgZUPnnReoKvPWVneT8APYbyKkihDVAHUi0II= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d h1:RNPAfi2nHY7C2srAV8A49jpsYr0ADedCk1wq6fTMTvs= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -44,6 +44,12 @@ type GuiData struct { buttonMap map[*ui.Button]*GuiButton } +type GuiTab struct { + Name string // field for human readable name + Number int // the andlabs/ui tab index + Window *GuiWindow // the parent Window +} + // // stores information on the 'window' // @@ -148,6 +148,7 @@ func CreateWindow(title string, tabname string, x int, y int, custom func() ui.C func CreateBlankWindow(title string, x int, y int) *GuiBox { box := mapWindow(nil, title, x, y) + log.Println("gui.CreateBlankWindow() title = box.Name =", box.Name) window := ui.NewWindow(box.Name, x, y, false) window.SetBorderless(false) @@ -178,6 +179,7 @@ func initBlankWindow() ui.Control { var master = 0 func mapWindow(window *ui.Window, title string, x int, y int) *GuiBox { + log.Println("gui.WindowMap START title =", title) if (Data.WindowMap[title] != nil) { log.Println("Data.WindowMap[title] already exists title =", title) master = master + 1 @@ -188,6 +190,7 @@ func mapWindow(window *ui.Window, title string, x int, y int) *GuiBox { panic("Data.WindowMap[newGuiWindow.Name] already exists") return nil } + log.Println("gui.WindowMap START title =", title) var newGuiWindow GuiWindow newGuiWindow.Width = x newGuiWindow.Height = y @@ -201,6 +204,7 @@ func mapWindow(window *ui.Window, title string, x int, y int) *GuiBox { var box GuiBox box.Window = &newGuiWindow + box.Name = title return &box } |
