diff options
| author | Jeff Carr <[email protected]> | 2025-02-07 03:51:23 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-07 03:51:23 -0600 |
| commit | b6b5df6a18f03822e26a426bf624d1ca7ccbf354 (patch) | |
| tree | b2b7ddbae9780712fb9e79e17e39afdb0e10cc38 /window.go | |
| parent | 13a194dca5d9c6153772d2ef4e1f5ce93f191c6d (diff) | |
forge is finally an app again. this time in the consolev0.22.17
Diffstat (limited to 'window.go')
| -rw-r--r-- | window.go | 52 |
1 files changed, 42 insertions, 10 deletions
@@ -5,8 +5,8 @@ package main import ( "fmt" + "strings" - log "go.wit.com/log" "go.wit.com/toolkits/tree" "go.wit.com/widget" ) @@ -48,13 +48,15 @@ func (tk *guiWidget) redrawWindow(w int, h int) { tk.full.h0 = tk.force.h0 tk.setFullSize() - v, err := me.baseGui.SetView(tk.cuiName, tk.gocuiSize.w0, tk.gocuiSize.h0, tk.gocuiSize.w1, tk.gocuiSize.h1, 0) - if err != nil { - log.Info("crap. got an err", err) - } - if tk.v != v { - log.Info("crap. got another problem v != tk.v") - } + /* + v, err := me.baseGui.SetView(tk.cuiName, tk.gocuiSize.w0, tk.gocuiSize.h0, tk.gocuiSize.w1, tk.gocuiSize.h1, 0) + if err != nil { + log.Info("crap. got an err", err) + } + if tk.v != v { + log.Info("crap. got another problem v != tk.v") + } + */ tk.Show() tk.v.Clear() fmt.Fprint(tk.v, "ZZZ"+tk.GetText()) @@ -95,7 +97,7 @@ func (tk *guiWidget) redrawWindow(w int, h int) { // re-draws the buttons for each of the windows func redoWindows(nextW int, nextH int) { for _, tk := range findWindows() { - tk.dumpWidget(fmt.Sprintf("redoWindowsS (%d,%d)", nextW, nextH)) + // tk.dumpWidget(fmt.Sprintf("redoWindowsS (%d,%d)", nextW, nextH)) if tk.window.wasDragged { // don't move windows around the user has dragged to a certain location tk.redrawWindow(tk.gocuiSize.w0, tk.gocuiSize.h0) @@ -109,7 +111,7 @@ func redoWindows(nextW int, nextH int) { // probably a new window? tk.redrawWindow(nextW, nextH) } - tk.dumpWidget(fmt.Sprintf("redoWindowsE (%d,%d)", nextW, nextH)) + // tk.dumpWidget(fmt.Sprintf("redoWindowsE (%d,%d)", nextW, nextH)) // increment the width for the next window nextW += tk.gocuiSize.Width() + 10 @@ -182,3 +184,33 @@ func (tk *guiWidget) makeWindowActive() { } */ } + +func (tk *guiWidget) makeTK(ddItems []string) { + items := strings.Join(ddItems, "\n") + tk.labelN = items + tk.SetText(items) + tk.gocuiSize.w0 = 100 + tk.gocuiSize.w1 = 120 + tk.gocuiSize.h0 = 15 + tk.gocuiSize.h1 = 18 + /* + var err error + tk.v, err = me.baseGui.SetView(tk.cuiName, + tk.gocuiSize.w0, + tk.gocuiSize.h0, + tk.gocuiSize.w1, + tk.gocuiSize.h1, 0) + if err != nil { + log.Info("makeTK() err", err) + return + } + if tk.v == nil { + return + } + tk.v.Wrap = true + tk.v.Frame = true + tk.v.Clear() + fmt.Fprint(tk.v, items) + */ + tk.Show() +} |
