gocui/table.go

40 lines
685 B
Go
Raw Normal View History

2025-02-12 15:26:24 -06:00
// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
package main
import (
2025-02-13 20:10:55 -06:00
"go.wit.com/lib/protobuf/guipb"
"go.wit.com/log"
2025-02-13 21:04:37 -06:00
"go.wit.com/toolkits/tree"
2025-02-18 14:58:42 -06:00
"go.wit.com/widget"
2025-02-12 15:26:24 -06:00
)
2025-02-13 20:10:55 -06:00
func showTable(t *guipb.Table) {
2025-02-12 15:26:24 -06:00
log.Info("should show table here")
}
2025-02-13 21:04:37 -06:00
func enableWidget(n *tree.Node) {
tk := n.TK.(*guiWidget)
tk.Enable()
}
func disableWidget(n *tree.Node) {
tk := n.TK.(*guiWidget)
tk.Disable()
}
2025-02-18 14:58:42 -06:00
func showWidget(n *tree.Node) {
tk := n.TK.(*guiWidget)
tk.Show()
}
func hideWidget(n *tree.Node) {
tk := n.TK.(*guiWidget)
if n.WidgetType == widget.Window {
tk.windowFrame.Hide()
tk.hideWidgets()
}
tk.Hide()
}