diff options
| author | Jeff Carr <[email protected]> | 2024-01-18 00:12:59 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-18 00:12:59 -0600 |
| commit | 0674bd89b798f7512462402817c496e8a80ac3d4 (patch) | |
| tree | 2d520204b18c5cb09481b461642cb183db8bf74a /gocui/add.go | |
| parent | a0baba0821441d9cf38f0b33fe12fb96925c6236 (diff) | |
move everything into seperate repos
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gocui/add.go')
| -rw-r--r-- | gocui/add.go | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/gocui/add.go b/gocui/add.go deleted file mode 100644 index 151d4d2..0000000 --- a/gocui/add.go +++ /dev/null @@ -1,80 +0,0 @@ -package main - -import ( - "go.wit.com/lib/widget" - log "go.wit.com/log" -) - -var fakeStartWidth int = me.FakeW -var fakeStartHeight int = me.TabH + me.FramePadH - -// setup fake labels for non-visible things off screen -func (n *node) setFake() { - w := n.tk - w.isFake = true - - n.gocuiSetWH(fakeStartWidth, fakeStartHeight) - - fakeStartHeight += w.gocuiSize.Height() - // TODO: use the actual max hight of the terminal window - if fakeStartHeight > 24 { - fakeStartHeight = me.TabH - fakeStartWidth += me.FakeW - } - if true { - n.showView() - } -} - -// set the widget start width & height -func (n *node) addWidget() { - nw := n.tk - log.Log(INFO, "setStartWH() w.id =", n.WidgetId, "n.name", n.progname) - switch n.WidgetType { - case widget.Root: - log.Log(INFO, "setStartWH() rootNode w.id =", n.WidgetId, "w.name", n.progname) - nw.color = &colorRoot - n.setFake() - return - case widget.Flag: - nw.color = &colorFlag - n.setFake() - return - case widget.Window: - nw.frame = false - nw.color = &colorWindow - // redoWindows(0,0) - return - case widget.Tab: - nw.color = &colorTab - // redoWindows(0,0) - return - case widget.Button: - nw.color = &colorButton - case widget.Box: - nw.color = &colorBox - nw.isFake = true - n.setFake() - return - case widget.Grid: - nw.color = &colorGrid - nw.isFake = true - n.setFake() - return - case widget.Group: - nw.color = &colorGroup - nw.frame = false - return - case widget.Label: - nw.color = &colorLabel - nw.frame = false - return - default: - /* - if n.IsCurrent() { - n.updateCurrent() - } - */ - } - n.showWidgetPlacement(true, "addWidget()") -} |
