summaryrefslogtreecommitdiff
path: root/gocui/widget.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-17 23:39:03 -0600
committerJeff Carr <[email protected]>2024-01-17 23:39:03 -0600
commita0baba0821441d9cf38f0b33fe12fb96925c6236 (patch)
tree2aece2a890c66c36b08524e117753817078ee58c /gocui/widget.go
parentbee272651ad38453aef27f098513f7be652c39bf (diff)
new paths
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gocui/widget.go')
-rw-r--r--gocui/widget.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/gocui/widget.go b/gocui/widget.go
index e739993..ff8df1b 100644
--- a/gocui/widget.go
+++ b/gocui/widget.go
@@ -1,8 +1,8 @@
package main
import (
+ "go.wit.com/lib/widget"
"go.wit.com/log"
- "go.wit.com/gui/widget"
)
func initWidget(n *node) *guiWidget {
@@ -22,8 +22,8 @@ func initWidget(n *node) *guiWidget {
return w
}
- if (n.WidgetType == widget.Grid) {
- w.widths = make(map[int]int) // how tall each row in the grid is
+ if n.WidgetType == widget.Grid {
+ w.widths = make(map[int]int) // how tall each row in the grid is
w.heights = make(map[int]int) // how wide each column in the grid is
}
@@ -43,7 +43,7 @@ func setupCtrlDownWidget() {
func (n *node) deleteView() {
w := n.tk
- if (w.v != nil) {
+ if w.v != nil {
w.v.Visible = false
return
}
@@ -54,7 +54,7 @@ func (n *node) deleteView() {
// searches the binary tree for a WidgetId
func (n *node) findWidgetName(name string) *node {
- if (n == nil) {
+ if n == nil {
return nil
}
@@ -64,7 +64,7 @@ func (n *node) findWidgetName(name string) *node {
for _, child := range n.children {
newN := child.findWidgetName(name)
- if (newN != nil) {
+ if newN != nil {
return newN
}
}
@@ -73,39 +73,39 @@ func (n *node) findWidgetName(name string) *node {
func (n *node) IsCurrent() bool {
w := n.tk
- if (n.WidgetType == widget.Tab) {
+ if n.WidgetType == widget.Tab {
return w.isCurrent
}
- if (n.WidgetType == widget.Window) {
+ if n.WidgetType == widget.Window {
return w.isCurrent
}
- if (n.WidgetType == widget.Root) {
+ if n.WidgetType == widget.Root {
return false
}
return n.parent.IsCurrent()
}
func (n *node) Visible() bool {
- if (n == nil) {
+ if n == nil {
return false
}
- if (n.tk == nil) {
+ if n.tk == nil {
return false
}
- if (n.tk.v == nil) {
+ if n.tk.v == nil {
return false
}
return n.tk.v.Visible
}
func (n *node) SetVisible(b bool) {
- if (n == nil) {
+ if n == nil {
return
}
- if (n.tk == nil) {
+ if n.tk == nil {
return
}
- if (n.tk.v == nil) {
+ if n.tk.v == nil {
return
}
n.tk.v.Visible = b